summaryrefslogtreecommitdiffstats
path: root/src/widgets/qpopupmenu.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2020-01-30 20:17:32 +0900
committerMichele Calgaro <[email protected]>2020-01-30 20:17:32 +0900
commit99e56ba8db70324cc5c7ab416a3b48171613bd59 (patch)
tree52fe52817fe45a81a7e03254b614b67587d83e37 /src/widgets/qpopupmenu.cpp
parent630dcedfb398b350522742f0ab4d1255ac84da85 (diff)
downloadtqt3-99e56ba8db70324cc5c7ab416a3b48171613bd59.tar.gz
tqt3-99e56ba8db70324cc5c7ab416a3b48171613bd59.zip
Removed explicit usage of the 'register' keyword.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'src/widgets/qpopupmenu.cpp')
-rw-r--r--src/widgets/qpopupmenu.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/widgets/qpopupmenu.cpp b/src/widgets/qpopupmenu.cpp
index 79812185e..61f144f6e 100644
--- a/src/widgets/qpopupmenu.cpp
+++ b/src/widgets/qpopupmenu.cpp
@@ -631,7 +631,7 @@ void TQPopupMenu::popup( const TQPoint &pos, int indexAtPoint )
h = height();
if(indexAtPoint >= 0) {
if(off_top) { //scroll to it
- register TQMenuItem *mi = NULL;
+ TQMenuItem *mi = NULL;
TQMenuItemListIt it(*mitems);
for(int tmp_y = 0; tmp_y < off_top && (mi=it.current()); ) {
TQSize sz = style().sizeFromContents(TQStyle::CT_PopupMenuItem, this,
@@ -794,7 +794,7 @@ void TQPopupMenu::hilitSig( int id )
void TQPopupMenu::setFirstItemActive()
{
TQMenuItemListIt it(*mitems);
- register TQMenuItem *mi;
+ TQMenuItem *mi;
int ai = 0;
if(d->scroll.scrollable)
ai = d->scroll.topScrollableIndex;
@@ -817,7 +817,7 @@ void TQPopupMenu::setFirstItemActive()
void TQPopupMenu::hideAllPopups()
{
- register TQMenuData *top = this; // find top level popup
+ TQMenuData *top = this; // find top level popup
if ( !preventAnimation )
TQTimer::singleShot( 10, this, SLOT(allowAnimation()) );
preventAnimation = TRUE;
@@ -851,7 +851,7 @@ void TQPopupMenu::hidePopups()
preventAnimation = TRUE;
TQMenuItemListIt it(*mitems);
- register TQMenuItem *mi;
+ TQMenuItem *mi;
while ( (mi=it.current()) ) {
++it;
if ( mi->popup() && mi->popup()->parentMenu == this ) //avoid circularity
@@ -873,7 +873,7 @@ void TQPopupMenu::hidePopups()
bool TQPopupMenu::tryMenuBar( TQMouseEvent *e )
{
- register TQMenuData *top = this; // find top level
+ TQMenuData *top = this; // find top level
while ( top->parentMenu )
top = top->parentMenu;
#ifndef TQT_NO_MENUBAR
@@ -909,7 +909,7 @@ bool TQPopupMenu::tryMouseEvent( TQPopupMenu *p, TQMouseEvent * e)
void TQPopupMenu::byeMenuBar()
{
#ifndef TQT_NO_MENUBAR
- register TQMenuData *top = this; // find top level
+ TQMenuData *top = this; // find top level
while ( top->parentMenu )
top = top->parentMenu;
#endif
@@ -1075,7 +1075,7 @@ TQSize TQPopupMenu::updateSize(bool force_update, bool do_resize)
int height = 0;
int max_width = 0, max_height = 0;
TQFontMetrics fm = fontMetrics();
- register TQMenuItem *mi;
+ TQMenuItem *mi;
maxPMWidth = 0;
int maxWidgetWidth = 0;
tab = 0;
@@ -1258,7 +1258,7 @@ TQSize TQPopupMenu::updateSize(bool force_update, bool do_resize)
void TQPopupMenu::updateAccel( TQWidget *parent )
{
TQMenuItemListIt it(*mitems);
- register TQMenuItem *mi;
+ TQMenuItem *mi;
if ( parent ) {
delete autoaccel;
@@ -1349,7 +1349,7 @@ void TQPopupMenu::enableAccel( bool enable )
autoaccel->setEnabled( enable );
accelDisabled = !enable; // rememeber when updateAccel
TQMenuItemListIt it(*mitems);
- register TQMenuItem *mi;
+ TQMenuItem *mi;
while ( (mi=it.current()) ) { // do the same for sub popups
++it;
if ( mi->popup() ) // call recursively
@@ -1651,7 +1651,7 @@ void TQPopupMenu::mousePressEvent( TQMouseEvent *e )
}
return;
}
- register TQMenuItem *mi = mitems->at(item);
+ TQMenuItem *mi = mitems->at(item);
if ( item != actItem ) // new item activated
setActiveItem( item );
@@ -1702,7 +1702,7 @@ void TQPopupMenu::mouseReleaseEvent( TQMouseEvent *e )
else
byeMenuBar();
} else { // selected menu item!
- register TQMenuItem *mi = mitems->at(actItem);
+ TQMenuItem *mi = mitems->at(actItem);
if ( mi ->widget() ) {
TQWidget* widgetAt = TQApplication::widgetAt( e->globalPos(), TRUE );
if ( widgetAt && widgetAt != this ) {
@@ -1815,7 +1815,7 @@ void TQPopupMenu::mouseMoveEvent( TQMouseEvent *e )
if ( (e->state() & TQt::MouseButtonMask) && !mouseBtDn )
mouseBtDn = TRUE; // so mouseReleaseEvent will pop down
- register TQMenuItem *mi = mitems->at( item );
+ TQMenuItem *mi = mitems->at( item );
if ( mi->widget() ) {
TQWidget* widgetAt = TQApplication::widgetAt( e->globalPos(), TRUE );
@@ -2034,7 +2034,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
TQMenuItem* currentSelected = 0;
TQMenuItem* firstAfterCurrent = 0;
- register TQMenuItem *m;
+ TQMenuItem *m;
mi = 0;
int indx = 0;
int clashCount = 0;
@@ -2101,7 +2101,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
}
#ifndef TQT_NO_MENUBAR
if ( !ok_key ) { // send to menu bar
- register TQMenuData *top = this; // find top level
+ TQMenuData *top = this; // find top level
while ( top->parentMenu )
top = top->parentMenu;
if ( top->isMenuBar ) {
@@ -2118,7 +2118,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
} else if ( dy < 0 ) {
TQMenuItemListIt it(*mitems);
it.toLast();
- register TQMenuItem *mi;
+ TQMenuItem *mi;
int ai = count() - 1;
while ( (mi=it.current()) ) {
--it;
@@ -2134,7 +2134,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
}
if ( dy ) { // highlight next/prev
- register int i = actItem;
+ int i = actItem;
int c = mitems->count();
for(int n = c; n; n--) {
i = i + dy;
@@ -2520,7 +2520,7 @@ void TQPopupMenu::connectModal( TQPopupMenu* receiver, bool doConnect )
receiver, SLOT(modalActivation(int)) );
TQMenuItemListIt it(*mitems);
- register TQMenuItem *mi;
+ TQMenuItem *mi;
while ( (mi=it.current()) ) {
++it;
if ( mi->popup() && mi->popup() != receiver
@@ -2641,12 +2641,12 @@ bool TQPopupMenu::customWhatsThis() const
*/
bool TQPopupMenu::focusNextPrevChild( bool next )
{
- register TQMenuItem *mi;
+ TQMenuItem *mi;
int dy = next? 1 : -1;
if ( dy && actItem < 0 ) {
setFirstItemActive();
} else if ( dy ) { // highlight next/prev
- register int i = actItem;
+ int i = actItem;
int c = mitems->count();
int n = c;
while ( n-- ) {