[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdepim/kontact/src
From: Tobias Koenig <tokoe () kde ! org>
Date: 2005-03-23 10:06:14
Message-ID: 20050323100614.2A3273CD () office ! kde ! org
[Download RAW message or body]
CVS commit by tokoe:
Remove layzy loading and the keypresseater hack which caused a lot of other bugs.
BUGS:101093
M +7 -43 mainwindow.cpp 1.169
M +0 -3 mainwindow.h 1.67
--- kdepim/kontact/src/mainwindow.cpp #1.168:1.169
@@ -74,32 +74,9 @@
#include "broadcaststatus.h"
-class KeyPressEater : public QObject
-{
- public:
- KeyPressEater( QObject *parent )
- : QObject( parent, "KeyPressEater" )
- {
- }
-
- protected:
- bool eventFilter( QObject*, QEvent *event )
- {
- if ( event->type() == QEvent::KeyPress ||
- event->type() == QEvent::KeyRelease ||
- event->type() == QEvent::MouseButtonPress ||
- event->type() == QEvent::MouseButtonRelease ||
- event->type() == QEvent::MouseButtonDblClick )
- return true;
- else
- return false;
- }
-};
-
using namespace Kontact;
MainWindow::MainWindow()
: Kontact::Core(), mTopWidget( 0 ), mSplitter( 0 ),
- mCurrentPlugin( 0 ), mAboutDialog( 0 ), mReallyClose( false ),
- mStartupCompleted( false )
+ mCurrentPlugin( 0 ), mAboutDialog( 0 ), mReallyClose( false )
{
// Set this to be the group leader for all subdialogs - this means
@@ -107,10 +84,6 @@ MainWindow::MainWindow()
setWFlags( getWFlags() | WGroupLeader );
- // Prevent user input during loading the plugins
- mKeyPressEater = new KeyPressEater( this );
- kapp->installEventFilter( mKeyPressEater );
-
initGUI();
- QTimer::singleShot( 0, this, SLOT( initObject() ) );
+ initObject();
}
@@ -157,6 +130,5 @@ void MainWindow::initObject()
loadPlugins();
- if ( mSidePane )
- {
+ if ( mSidePane ) {
mSidePane->updatePlugins();
plugActionList( "navigator_actionlist", mSidePane->actions() );
@@ -184,7 +156,4 @@ void MainWindow::initObject()
activatePluginModule();
- // keep this above the lastVersionSeen check!
- mStartupCompleted = true;
-
if ( Prefs::lastVersionSeen() == kapp->aboutData()->version() ) {
selectPlugin( mCurrentPlugin );
@@ -193,7 +162,4 @@ void MainWindow::initObject()
paintAboutScreen( introductionString() );
Prefs::setLastVersionSeen( kapp->aboutData()->version() );
-
- kapp->removeEventFilter( mKeyPressEater );
- delete mKeyPressEater;
}
@@ -578,8 +544,6 @@ void MainWindow::selectPlugin( Kontact::
if ( view ) {
- if ( mStartupCompleted ) {
mPartsStack->raiseWidget( view );
view->show();
- }
if ( mFocusWidgets.contains( plugin->identifier() ) ) {
--- kdepim/kontact/src/mainwindow.h #1.66:1.67
@@ -151,7 +151,4 @@ class MainWindow : public Kontact::Core,
AboutDialog *mAboutDialog;
bool mReallyClose;
- bool mStartupCompleted;
-
- KeyPressEater *mKeyPressEater;
};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic