-rw-r--r-- | kaddressbook/kabcore.cpp | 10 | ||||
-rw-r--r-- | microkde/kdeui/ktoolbar.cpp | 6 | ||||
-rw-r--r-- | microkde/kdeui/ktoolbar.h | 3 |
3 files changed, 15 insertions, 4 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 76f9ab6..15cab73 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -359,14 +359,18 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const infrared = 0; #endif //toggleBeamReceive( ); - + //mMainWindow->toolBar()->show(); // we have a toolbar repainting error on the Zaurus when starting KA/Pi - QTimer::singleShot( 10000, this , SLOT ( updateToolBar())); + QTimer::singleShot( 10, this , SLOT ( updateToolBar())); } void KABCore::updateToolBar() { - mMainWindow->toolBar()->update(); + static int iii = 0; + ++iii; + mMainWindow->toolBar()->repaintMe(); + if ( iii < 5 ) + QTimer::singleShot( 10, this , SLOT ( updateToolBar())); } KABCore::~KABCore() { diff --git a/microkde/kdeui/ktoolbar.cpp b/microkde/kdeui/ktoolbar.cpp index 79b0f9d..e9226c0 100644 --- a/microkde/kdeui/ktoolbar.cpp +++ b/microkde/kdeui/ktoolbar.cpp @@ -1410,6 +1410,12 @@ void KToolBar::insertWidgetInternal( QWidget *w, int &index, int id ) id2widget.insert( id, w ); widget2id.insert( w, id ); } +void KToolBar::repaintMe() +{ + setUpdatesEnabled( true ); + QToolBar::repaint( true ); + qDebug(" KToolBar::repaintMe() "); +} void KToolBar::showEvent( QShowEvent *e ) { diff --git a/microkde/kdeui/ktoolbar.h b/microkde/kdeui/ktoolbar.h index 2c061b5..61b5ea3 100644 --- a/microkde/kdeui/ktoolbar.h +++ b/microkde/kdeui/ktoolbar.h @@ -1045,6 +1045,7 @@ public: /** * @return global setting for "Highlight buttons under mouse" */ + void repaintMe(); static bool highlightSetting(); /** @@ -1060,6 +1061,7 @@ public: public slots: virtual void setIconText( const QString &txt ) { QToolBar::setIconText( txt ); } + void slotRepaint(); protected: void mousePressEvent( QMouseEvent * ); @@ -1075,7 +1077,6 @@ private slots: void slotReadConfig (); void slotAppearanceChanged(); void slotIconChanged(int); - void slotRepaint(); void toolBarPosChanged( QToolBar *tb ); void slotContextAboutToShow(); void widgetDestroyed(); |