-rw-r--r-- | kaddressbook/kabcore.cpp | 6 | ||||
-rw-r--r-- | kaddressbook/kaddressbookmain.cpp | 2 | ||||
-rw-r--r-- | kmicromail/accountview.cpp | 2 | ||||
-rw-r--r-- | microkde/kdeui/kmainwindow.cpp | 11 | ||||
-rw-r--r-- | microkde/kdeui/kmainwindow.h | 2 |
5 files changed, 12 insertions, 11 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 77321aa..af12f2b 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -387,67 +387,67 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const SLOT( browse( const QString& ) ) ); mAddressBookService = new KAddressBookService( this ); #endif //KAB_EMBEDDED mMessageTimer = new QTimer( this ); connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) ); mEditorDialog = 0; createAddresseeEditorDialog( this ); setModified( false ); mBRdisabled = false; #ifndef DESKTOP_VERSION infrared = 0; #endif //toggleBeamReceive( ); mMainWindow->toolBar()->show(); // we have a toolbar repainting error on the Zaurus when starting KA/Pi //QTimer::singleShot( 10, this , SLOT ( updateToolBar())); QTimer::singleShot( 100, this, SLOT ( loadDataAfterStart() )); } void KABCore::receiveStart( const QCString& cmsg, const QByteArray& data ) { - qDebug("KO: QCOP start message received: %s ", cmsg.data() ); + //qDebug("KO: QCOP start message received: %s ", cmsg.data() ); mCStringMess = cmsg; mByteData = data; } void KABCore::loadDataAfterStart() { - qDebug("KABCore::loadDataAfterStart() "); + //qDebug("KABCore::loadDataAfterStart() "); ((StdAddressBook*)mAddressBook)->init( true ); mViewManager->refreshView(); #ifndef DESKTOP_VERSION disconnect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT (receiveStart ( const QCString &, const QByteArray & ))); QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); if ( !mCStringMess.isEmpty() ) ExternalAppHandler::instance()->appMessage( mCStringMess, mByteData ); #endif - QTimer::singleShot( 10, this , SLOT ( updateToolBar())); + // QTimer::singleShot( 10, this , SLOT ( updateToolBar())); setCaptionBack(); } void KABCore::updateToolBar() { static int iii = 0; ++iii; mMainWindow->toolBar()->repaintMe(); if ( iii < 4 ) QTimer::singleShot( 100*iii, this , SLOT ( updateToolBar())); } KABCore::~KABCore() { // save(); //saveSettings(); //KABPrefs::instance()->writeConfig(); delete AddresseeConfig::instance(); mAddressBook = 0; KABC::StdAddressBook::close(); delete syncManager; #ifndef DESKTOP_VERSION if ( infrared ) delete infrared; #endif diff --git a/kaddressbook/kaddressbookmain.cpp b/kaddressbook/kaddressbookmain.cpp index 8fe3ee0..c417226 100644 --- a/kaddressbook/kaddressbookmain.cpp +++ b/kaddressbook/kaddressbookmain.cpp @@ -19,49 +19,49 @@ As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #ifdef KAB_EMBEDDED #include "kabprefs.h" #include <kglobal.h> #include <qmessagebox.h> #include <qtoolbar.h> #include <qapplication.h> #else //KAB_EMBEDDED #include <kedittoolbar.h> #include <kkeydialog.h> #include <kmessagebox.h> #include <kstatusbar.h> #endif //KAB_EMBEDDED #include <klocale.h> #include "kabcore.h" #include "kaddressbookmain.h" #include "kactioncollection.h" #ifdef KAB_EMBEDDED -KAddressBookMain::KAddressBookMain() : KMainWindow( 0, "adrressbook" ) +KAddressBookMain::KAddressBookMain() : KMainWindow( 0, "abmain" ) #else //KAB_EMBEDDED //MOC_SKIP_BEGIN KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainWindow( 0 ) //MOC_SKIP_END #endif //KAB_EMBEDDED { setIcon(SmallIcon( "ka24" ) ); #if 0 //US for embedded systems, create the toolbar before we initiate KABCore. // KABCore will fill the toolbar with menues and icons QMainWindow::ToolBarDock tbd; tbd = Top; iconToolBar = new QToolBar( this ); addToolBar (iconToolBar , tbd ); iconToolBar->setHorizontalStretchable(true); //US iconToolBar->setWidth(300); #endif // 0 mCore = new KABCore( this, true, this ); #ifdef KAB_EMBEDDED setCaption( i18n( "KAddressbook/Pi" ) ); #else //KAB_EMBEDDED setCaption( i18n( "Address Book Browser" ) ); diff --git a/kmicromail/accountview.cpp b/kmicromail/accountview.cpp index 4879d57..d1d4f7e 100644 --- a/kmicromail/accountview.cpp +++ b/kmicromail/accountview.cpp @@ -77,49 +77,49 @@ void AccountView::populate( QList<Account> list ) { IMAPaccount *imap = static_cast<IMAPaccount *>(it); imapAccounts.append(new IMAPviewItem( imap, this )); } else if ( it->getType() == MAILLIB::A_POP3 ) { POP3account *pop3 = static_cast<POP3account *>(it); /* must not be hold 'cause it isn't required */ (void) new POP3viewItem( pop3, this ); } else if ( it->getType() == MAILLIB::A_NNTP ) { NNTPaccount *nntp = static_cast<NNTPaccount *>(it); /* must not be hold 'cause it isn't required */ (void) new NNTPviewItem( nntp, this ); } } } void AccountView::refresh(QListViewItem *item) { if ( item ) { bool ask = true; - qDebug("text -%s- ",item->text( 0 ).latin1() ); + //qDebug("text -%s- ",item->text( 0 ).latin1() ); if ( item->text( 0 ) == i18n (" Local Mailfolders") ) ask = false; else { if ( item->parent() ) if ( item->parent()->text( 0 ) == i18n (" Local Mailfolders") ) ask = false; } if ( ask ) { int result = KMessageBox::warningContinueCancel(this, i18n("Refresh\n%1\n?").arg( item->text(0) ), i18n("Refresh"),i18n("Refresh"),i18n("Cancel"), true); if (result != KMessageBox::Continue) return; } m_currentItem = item; topLevelWidget()->setCaption( i18n ( "Refreshing %1 ... please wait" ). arg ( m_currentItem->text( 0 ) ) ) ; QTimer::singleShot( 500, this, SLOT ( refreshCurrentSelected() ) ); } } void AccountView::refreshOutgoing() { m_currentItem = currentItem(); if ( !m_currentItem ) return; diff --git a/microkde/kdeui/kmainwindow.cpp b/microkde/kdeui/kmainwindow.cpp index 3ae4c87..fa678f2 100644 --- a/microkde/kdeui/kmainwindow.cpp +++ b/microkde/kdeui/kmainwindow.cpp @@ -32,49 +32,49 @@ #include "kdebug.h" #include "kmainwindow.h" #include "kglobalsettings.h" #include "kactioncollection.h" class KMainWindowPrivate { public: //US bool showHelpMenu:1; bool autoSaveSettings:1; bool settingsDirty:1; bool autoSaveWindowSize:1; bool care_about_geometry:1; QString autoSaveGroup; //US KAccel * kaccel; //US KMainWindowInterface *m_interface; KDEPrivate::ToolBarHandler *toolBarHandler; QTimer* settingsTimer; KToggleAction *showStatusBarAction; QRect defaultWindowSize; }; static bool no_query_exit = false; -KMainWindow::KMainWindow( QWidget* parent, const char *name, WFlags f ) +KMainWindow::KMainWindow( QWidget* parent, const char *name ) : QMainWindow( parent, name ) /*LR, f ) with the default widget flag we cannot have fastload */ /*US, KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 )*/ { mQToolBar = 0; initKMainWindow(name); } void KMainWindow::parseGeometry(bool parsewidth) { //US the following code is not getting used in the embedded version !! So disable it for now /*US assert ( !kapp->geometryArgument().isNull() ); assert ( d->care_about_geometry ); #ifndef Q_WS_QWS // FIXME: (E) Implement something similar for Qt Embedded (or decide we don't need it) int x, y; int w, h; int m = XParseGeometry( kapp->geometryArgument().latin1(), &x, &y, (unsigned int*)&w, (unsigned int*)&h); if (parsewidth) { QSize minSize = minimumSize(); QSize maxSize = maximumSize(); if ( (m & WidthValue) == 0 ) w = width(); @@ -826,52 +826,53 @@ void KMainWindow::setSettingsDirty() d->settingsDirty = true; if ( d->autoSaveSettings ) { // Use a timer to save "immediately" user-wise, but not too immediately // (to compress calls and save only once, in case of multiple changes) if ( !d->settingsTimer ) { d->settingsTimer = new QTimer( this ); connect( d->settingsTimer, SIGNAL( timeout() ), SLOT( saveAutoSaveSettings() ) ); } d->settingsTimer->start( 500, true ); } } bool KMainWindow::settingsDirty() const { return d->settingsDirty; } QString KMainWindow::settingsGroup() const { return d->autoSaveGroup; } -void KMainWindow::resizeEvent( QResizeEvent * ) +void KMainWindow::resizeEvent( QResizeEvent * e) { if ( d->autoSaveWindowSize ) - setSettingsDirty(); + setSettingsDirty(); + QMainWindow::resizeEvent( e ); } bool KMainWindow::hasMenuBar() { return (internalMenuBar()); } //US KMenuBar *KMainWindow::menuBar() QMenuBar *KMainWindow::menuBar() { //US KMenuBar * mb = internalMenuBar(); QMenuBar * mb = internalMenuBar(); if ( !mb ) { //US mb = new KMenuBar( this ); mb = new QMenuBar( this ); // trigger a re-layout and trigger a call to the private // setMenuBar method. QMainWindow::menuBar(); } return mb; } //US KStatusBar *KMainWindow::statusBar() QStatusBar *KMainWindow::statusBar() @@ -919,51 +920,51 @@ QMenuBar *KMainWindow::internalMenuBar() return m; } //US KStatusBar *KMainWindow::internalStatusBar() QStatusBar *KMainWindow::internalStatusBar() { //US QObjectList *l = queryList( "KStatusBar", 0, false, false ); QObjectList *l = queryList( "QStatusBar", 0, false, false ); if ( !l || !l->first() ) { delete l; return 0; } //US KStatusBar *s = (KStatusBar*)l->first(); QStatusBar *s = (QStatusBar*)l->first(); delete l; return s; } void KMainWindow::childEvent( QChildEvent* e) { QMainWindow::childEvent( e ); } -void KMainWindow::paintEvent( QPaintEvent * ) +void KMainWindow::paintEvent( QPaintEvent * e) { - // do nothing + QMainWindow::paintEvent( e ); } QSize KMainWindow::sizeForCentralWidgetSize(QSize size) { KToolBar *tb = (KToolBar*)child( "mainToolBar", "KToolBar" ); if (tb && !tb->isHidden()) { switch( tb->barPos() ) { case KToolBar::Top: case KToolBar::Bottom: size += QSize(0, tb->sizeHint().height()); break; case KToolBar::Left: case KToolBar::Right: size += QSize(toolBar()->sizeHint().width(), 0); break; case KToolBar::Flat: //US size += QSize(0, 3+kapp->style().pixelMetric( QStyle::PM_DockWindowHandleExtent )); size += QSize(0, tb->sizeHint().height()); break; default: diff --git a/microkde/kdeui/kmainwindow.h b/microkde/kdeui/kmainwindow.h index 2aafb9d..2dc8033 100644 --- a/microkde/kdeui/kmainwindow.h +++ b/microkde/kdeui/kmainwindow.h @@ -73,49 +73,49 @@ public: * secondary window. * * @param name The object name. For session management and window management to work * properly, all main windows in the application should have a * different name. When passing 0 (the default), KMainWindow will create * a unique name, but it's recommended to explicitly pass a window name that will * also describe the type of the window. If there can be several windows of the same * type, append '#' (hash) to the name, and KMainWindow will append numbers to make * the names unique. For example, for a mail client which has one main window showing * the mails and folders, and which can also have one or more windows for composing * mails, the name for the folders window should be e.g. "mainwindow" and * for the composer windows "composer#". * * @param f Specify the widget flags. The default is * WType_TopLevel and WDestructiveClose. TopLevel indicates that a * main window is a toplevel window, regardless of whether it has a * parent or not. DestructiveClose indicates that a main window is * automatically destroyed when its window is closed. Pass 0 if * you do not want this behavior. * * KMainWindows must be created on the heap with 'new', like: * <pre> KMainWindow *kmw = new KMainWindow (...</pre> **/ //LR remove WDestructiveClose - KMainWindow( QWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel /*| WDestructiveClose*/ ); + KMainWindow( QWidget* parent = 0, const char *name = 0 ); //, WFlags f = WType_TopLevel /*| WDestructiveClose*/ ; /** * Destructor. * * Will also destroy the toolbars, and menubar if * needed. */ virtual ~KMainWindow(); /** * Retrieve the standard help menu. * * It contains entires for the * help system (activated by F1), an optional "What's This?" entry * (activated by Shift F1), an application specific dialog box, * and an "About KDE" dialog box. * * Example (adding a standard help menu to your application): * <pre> * KPopupMenu *help = helpMenu( <myTextString> ); * menuBar()->insertItem( i18n("&Help"), help ); * </pre> * |