[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/apps/konqueror/src
From:       Rafael Fernández López <ereslibre () kde ! org>
Date:       2008-08-27 9:29:36
Message-ID: 1219829376.464021.30552.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 853124 by ereslibre:

Remove unneeded timer and that was causing the toolbar of the window to be smaller \
each time for example a tab was being closed


 M  +2 -21     konqviewmanager.cpp  
 M  +0 -2      konqviewmanager.h  


--- trunk/KDE/kdebase/apps/konqueror/src/konqviewmanager.cpp #853123:853124
@@ -62,13 +62,8 @@
   m_pamProfiles = 0L;
   m_bProfileListDirty = true;
   m_bLoadingProfile = false;
-
-  m_activePartChangedTimer = new QTimer(this);
-  m_activePartChangedTimer->setSingleShot(true);
-
   m_tabContainer = 0;
 
-  connect(m_activePartChangedTimer, SIGNAL(timeout()), this, SLOT( \
emitActivePartChanged()));  connect( this, SIGNAL( activePartChanged ( KParts::Part * \
) ),  this, SLOT( slotActivePartChanged ( KParts::Part * ) ) );
 }
@@ -313,6 +308,7 @@
   KonqMainWindow *mainWindow = new KonqMainWindow(KUrl(), m_pMainWindow->xmlFile());
 
   mainWindow->viewManager()->loadViewProfileFromGroup( profileGroup, QString() );
+  mainWindow->applyMainWindowSettings( m_pMainWindow->autoSaveConfigGroup() );
 
   KonqFrameTabs * kft = mainWindow->viewManager()->tabContainer();
   KonqFrameBase *newFrame = dynamic_cast<KonqFrameBase*>(kft->currentWidget());
@@ -976,8 +972,6 @@
     //if ( part )
     //    kDebug(1202) << part->metaObject()->className() << part->name();
 
-    // Due to the single-shot timer below, we need to also make sure that
-    // the mainwindow also has the right part active already
     KParts::Part* mainWindowActivePart = m_pMainWindow->currentView()
                                          ? m_pMainWindow->currentView()->part() : 0;
     if (part == activePart() && (!immediate || mainWindowActivePart == part))
@@ -1008,20 +1002,7 @@
     if (part && part->widget())
         part->widget()->setFocus();
 
-    if (!immediate && reason() != ReasonRightClick) {
-        // We use a 0s single shot timer so that when left-clicking on a part,
-        // we process the mouse event before rebuilding the GUI.
-        // Otherwise, when e.g. dragging icons, the mouse pointer can already
-        // be very far from where it was...
-        // TODO: use a QTimer member var, so that if two conflicting calls to
-        // setActivePart(part,immediate=false) happen, the 1st one gets canceled.
-        m_activePartChangedTimer->start( 0 );
-        // This is not done with right-clicking so that the part is activated before \
                the
-        // popup appears (#75201)
-    } else {
-        m_activePartChangedTimer->stop();
-        emitActivePartChanged();
-    }
+    emitActivePartChanged();
 }
 
 void KonqViewManager::slotActivePartChanged ( KParts::Part *newPart )
--- trunk/KDE/kdebase/apps/konqueror/src/konqviewmanager.h #853123:853124
@@ -414,8 +414,6 @@
   QString m_currentProfileText;
 
     QMap<QString /*display name*/, QString /*path to file*/> m_mapProfileNames;
-
-  QTimer *m_activePartChangedTimer;
 };
 
 #endif


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic