From c869b80d53d736a0547ae12d1c53f3a650b7e064 Mon Sep 17 00:00:00 2001 From: mlaurent Date: Thu, 27 Oct 2005 15:00:50 +0000 Subject: [PATCH] Fix some error git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/KDE/kdeartwork@474888 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kwin-styles/cde/cdeclient.cpp | 4 ++-- kwin-styles/cde/config/config.cpp | 6 +++--- kwin-styles/glow/glowbutton.cpp | 2 +- kwin-styles/icewm/config/config.cpp | 10 +++++----- kwin-styles/icewm/icewm.cpp | 2 +- kwin-styles/kde1/kde1client.cpp | 18 +++++++++--------- kwin-styles/riscos/Button.cpp | 2 +- kwin-styles/riscos/MaximiseButton.cpp | 2 +- kwin-styles/riscos/StickyButton.cpp | 2 +- kwin-styles/system/systemclient.cpp | 2 +- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/kwin-styles/cde/cdeclient.cpp b/kwin-styles/cde/cdeclient.cpp index 5bc17a3c..0b87766e 100644 --- a/kwin-styles/cde/cdeclient.cpp +++ b/kwin-styles/cde/cdeclient.cpp @@ -407,7 +407,7 @@ void CdeClient::maximizeChange() if ( button[BtnMax] ) { bool m = maximizeMode() == MaximizeFull; QToolTip::remove(button[BtnMax]); - QToolTip::add(button[BtnMax], m ? i18n("Restore") : i18n("Maximize")); + button[BtnMax]->setToolTip( m ? i18n("Restore") : i18n("Maximize")); button[BtnMax]->repaint(); } } @@ -791,7 +791,7 @@ CdeButton::CdeButton(CdeClient* parent, m_parent = parent; setCursor(ArrowCursor); - QToolTip::add(this, tip); + this->setToolTip( tip); m_realize_buttons = realize_btns; } diff --git a/kwin-styles/cde/config/config.cpp b/kwin-styles/cde/config/config.cpp index 1d44d796..6e904493 100644 --- a/kwin-styles/cde/config/config.cpp +++ b/kwin-styles/cde/config/config.cpp @@ -2,7 +2,7 @@ #include "config.h" #include #include -#include + #include //Added by qt3to4: #include @@ -32,14 +32,14 @@ CdeConfig::CdeConfig( KConfig* conf, QWidget* parent ) bgAlign = new Q3ButtonGroup( 3, Qt::Horizontal, i18n("Text &Alignment"), groupBox ); bgAlign->setExclusive( true ); - Q3WhatsThis::add( bgAlign, i18n("Use these buttons to set the alignment of the titlebar caption text.") ); + bgAlign->setWhatsThis( i18n("Use these buttons to set the alignment of the titlebar caption text.") ); new QRadioButton( i18n("Left"), bgAlign, "AlignLeft" ); QRadioButton *radio2 = new QRadioButton( i18n("Centered"), bgAlign, "AlignHCenter" ); radio2->setChecked( true ); new QRadioButton( i18n("Right"), bgAlign, "AlignRight" ); cbColorBorder = new QCheckBox( i18n("Draw window frames using &titlebar colors"), groupBox ); - Q3WhatsThis::add( cbColorBorder, i18n("When selected, the window decoration borders " + cbColorBorder->setWhatsThis( i18n("When selected, the window decoration borders " "are drawn using the titlebar colors. Otherwise, they are " "drawn using normal border colors instead.") ); diff --git a/kwin-styles/glow/glowbutton.cpp b/kwin-styles/glow/glowbutton.cpp index 35bc4918..5e22a0b6 100644 --- a/kwin-styles/glow/glowbutton.cpp +++ b/kwin-styles/glow/glowbutton.cpp @@ -111,7 +111,7 @@ void GlowButton::setTipText( const QString& tip ) if (KDecoration::options()->showTooltips()) { QToolTip::remove( this ); - QToolTip::add( this, tip ); + this->setToolTip( tip ); } } diff --git a/kwin-styles/icewm/config/config.cpp b/kwin-styles/icewm/config/config.cpp index 36cdb56b..860035b3 100644 --- a/kwin-styles/icewm/config/config.cpp +++ b/kwin-styles/icewm/config/config.cpp @@ -28,7 +28,7 @@ #include #include #include -#include + //Added by qt3to4: #include #include @@ -68,13 +68,13 @@ IceWMConfig::IceWMConfig( KConfig* conf, QWidget* parent ) mainWidget->setSpacing( KDialog::spacingHint() ); themeListBox = new Q3ListBox( mainWidget ); - Q3WhatsThis::add( themeListBox, + themeListBox->setWhatsThis( i18n("Make your IceWM selection by clicking on a theme here. ") ); cbThemeTitleTextColors = new QCheckBox( i18n("Use theme &title text colors"), mainWidget ); - Q3WhatsThis::add( cbThemeTitleTextColors, + cbThemeTitleTextColors->setWhatsThis( i18n("When selected, titlebar colors will follow those set " "in the IceWM theme. If not selected, the current KDE " "titlebar colors will be used instead.") ); @@ -82,7 +82,7 @@ IceWMConfig::IceWMConfig( KConfig* conf, QWidget* parent ) cbTitleBarOnTop = new QCheckBox( i18n("&Show title bar on top of windows"), mainWidget ); - Q3WhatsThis::add( cbTitleBarOnTop, + cbTitleBarOnTop->setWhatsThis( i18n("When selected, all window titlebars will be shown " "at the top of each window, otherwise they will be " "shown at the bottom.") ); @@ -90,7 +90,7 @@ IceWMConfig::IceWMConfig( KConfig* conf, QWidget* parent ) cbShowMenuButtonIcon = new QCheckBox( i18n("&Menu button always shows application mini icon"), mainWidget ); - Q3WhatsThis::add( cbShowMenuButtonIcon, + cbShowMenuButtonIcon->setWhatsThis( i18n("When selected, all titlebar menu buttons will have " "the application icon shown. If not selected, the current " "theme's defaults are used instead.") ); diff --git a/kwin-styles/icewm/icewm.cpp b/kwin-styles/icewm/icewm.cpp index c6447e49..e36c9651 100644 --- a/kwin-styles/icewm/icewm.cpp +++ b/kwin-styles/icewm/icewm.cpp @@ -789,7 +789,7 @@ IceWMButton::IceWMButton(IceWMClient *parent, const char *name, QPixmap* (*p)[2] void IceWMButton::setTipText(const QString &tip) { if(KDecoration::options()->showTooltips()) { QToolTip::remove(this ); - QToolTip::add(this, tip ); + this->setToolTip( tip ); } } diff --git a/kwin-styles/kde1/kde1client.cpp b/kwin-styles/kde1/kde1client.cpp index f20b67d6..85a70f06 100644 --- a/kwin-styles/kde1/kde1client.cpp +++ b/kwin-styles/kde1/kde1client.cpp @@ -305,7 +305,7 @@ void StdClient::addButtons(QBoxLayout *hb, const QString& s) case 'M': // Menu button if (!button[ButtonMenu]) { button[ButtonMenu] = new QToolButton( widget(), 0 ); - QToolTip::add( button[ButtonMenu], i18n("Menu") ); + button[ButtonMenu]->setToolTip( i18n("Menu") ); button[ButtonMenu]->setCursor(ArrowCursor); if( icon().pixmap( QIconSet::Small, QIconSet::Normal ).isNull()) button[ButtonMenu]->setIconSet(isActive() ? *menu_pix : *dis_menu_pix); @@ -320,7 +320,7 @@ void StdClient::addButtons(QBoxLayout *hb, const QString& s) if (!button[ButtonSticky]) { button[ButtonSticky] = new QToolButton( widget(), 0 ); button[ButtonSticky]->setIconSet( isOnAllDesktops()?*pindown_pix:*pinup_pix ); - QToolTip::add( button[ButtonSticky], isOnAllDesktops()?i18n("Not On All Desktops"):i18n("On All Desktops") ); + button[ButtonSticky]->setToolTip( isOnAllDesktops()?i18n("Not On All Desktops"):i18n("On All Desktops") ); button[ButtonSticky]->setCursor(ArrowCursor); button[ButtonSticky]->setIconSet(isOnAllDesktops() ? isActive() ? *pindown_pix : *dis_pindown_pix : isActive() ? *pinup_pix : *dis_pinup_pix ); @@ -332,7 +332,7 @@ void StdClient::addButtons(QBoxLayout *hb, const QString& s) case 'H': // Help button if ((!button[ButtonHelp]) && providesContextHelp()) { button[ButtonHelp] = new QToolButton( widget(), 0 ); - QToolTip::add( button[ButtonHelp], i18n("Help") ); + button[ButtonHelp]->setToolTip( i18n("Help") ); button[ButtonHelp]->setIconSet( isActive() ? *question_mark_pix : *dis_question_mark_pix); connect( button[ButtonHelp], SIGNAL( clicked() ), this, ( SLOT( showContextHelp() ) ) ); button[ButtonHelp]->setCursor(ArrowCursor); @@ -343,7 +343,7 @@ void StdClient::addButtons(QBoxLayout *hb, const QString& s) case 'I': // Minimize button if ((!button[ButtonMinimize]) && isMinimizable()) { button[ButtonMinimize] = new QToolButton( widget(), 0 ); - QToolTip::add( button[ButtonMinimize], i18n("Minimize") ); + button[ButtonMinimize]->setToolTip( i18n("Minimize") ); button[ButtonMinimize]->setCursor(ArrowCursor); button[ButtonMinimize]->setIconSet(isActive() ? *minimize_pix : *dis_minimize_pix); connect( button[ButtonMinimize], SIGNAL( clicked() ), this, ( SLOT( minimize() ) ) ); @@ -355,7 +355,7 @@ void StdClient::addButtons(QBoxLayout *hb, const QString& s) if ((!button[ButtonMaximize]) && isMaximizable()) { const bool max = maximizeMode()!=MaximizeRestore; button[ButtonMaximize] = new ThreeButtonButton( widget(), 0 ); - QToolTip::add( button[ButtonMaximize], max?i18n("Restore"):i18n("Maximize") ); + button[ButtonMaximize]->setToolTip( max?i18n("Restore"):i18n("Maximize") ); button[ButtonMaximize]->setCursor(ArrowCursor); button[ButtonMaximize]->setIconSet( max?(isActive() ? *normalize_pix : *dis_normalize_pix):(isActive() ? *maximize_pix : *dis_maximize_pix) ); connect( button[ButtonMaximize], SIGNAL( clicked(ButtonState) ), @@ -367,7 +367,7 @@ void StdClient::addButtons(QBoxLayout *hb, const QString& s) case 'X': // Close button if ((!button[ButtonClose]) && isCloseable()) { button[ButtonClose] = new QToolButton( widget(), 0 ); - QToolTip::add( button[ButtonClose], i18n("Close") ); + button[ButtonClose]->setToolTip( i18n("Close") ); button[ButtonClose]->setCursor(ArrowCursor); button[ButtonClose]->setIconSet(isActive() ? *close_pix : *dis_close_pix); connect( button[ButtonClose], SIGNAL( clicked() ), this, ( SLOT( closeWindow() ) ) ); @@ -441,7 +441,7 @@ void StdClient::maximizeChange() if (button[ButtonMaximize]) { button[ButtonMaximize]->setIconSet( m?*normalize_pix:*maximize_pix ); QToolTip::remove( button[ButtonMaximize] ); - QToolTip::add( button[ButtonMaximize], m ? i18n("Restore") : i18n("Maximize") ); + button[ButtonMaximize]->setToolTip( m ? i18n("Restore") : i18n("Maximize") ); } } @@ -454,7 +454,7 @@ void StdClient::desktopChange() if (button[ButtonSticky]) { button[ButtonSticky]->setIconSet( s?*pindown_pix:*pinup_pix ); QToolTip::remove( button[ButtonSticky] ); - QToolTip::add( button[ButtonSticky], s ? i18n("Not On All Desktops") : i18n("On All Desktops") ); + button[ButtonSticky]->setToolTip( s ? i18n("Not On All Desktops") : i18n("On All Desktops") ); } } @@ -602,7 +602,7 @@ void StdToolClient::init() g->addRowSpacing(2, 1); closeBtn = new QToolButton( widget(), 0 ); - QToolTip::add( closeBtn, i18n("Close") ); + closeBtn->setToolTip( i18n("Close") ); connect( closeBtn, SIGNAL( clicked() ), this, ( SLOT( closeWindow() ) ) ); closeBtn->setFixedSize( 13, 13); reset( -1U ); diff --git a/kwin-styles/riscos/Button.cpp b/kwin-styles/riscos/Button.cpp index d2bf2ea3..cb1a9005 100644 --- a/kwin-styles/riscos/Button.cpp +++ b/kwin-styles/riscos/Button.cpp @@ -40,7 +40,7 @@ Button::Button(QWidget *parent, const QString& tip, down_ (false), active_ (false) { - QToolTip::add(this, tip); + this->setToolTip( tip); setBackgroundColor(Qt::black); setFixedSize(Static::instance()->titleHeight() - 1, diff --git a/kwin-styles/riscos/MaximiseButton.cpp b/kwin-styles/riscos/MaximiseButton.cpp index 85e8d7ef..ccb97293 100644 --- a/kwin-styles/riscos/MaximiseButton.cpp +++ b/kwin-styles/riscos/MaximiseButton.cpp @@ -83,7 +83,7 @@ void MaximiseButton::setOn(bool on) : QPixmap((const char **)maximise_xpm)); repaint(); QToolTip::remove(this); - QToolTip::add(this, on_ ? i18n("Restore") : i18n("Maximize")); + this->setToolTip( on_ ? i18n("Restore") : i18n("Maximize")); } void MaximiseButton::mouseReleaseEvent(QMouseEvent *e) diff --git a/kwin-styles/riscos/StickyButton.cpp b/kwin-styles/riscos/StickyButton.cpp index 2d757543..a84688e8 100644 --- a/kwin-styles/riscos/StickyButton.cpp +++ b/kwin-styles/riscos/StickyButton.cpp @@ -82,7 +82,7 @@ void StickyButton::setOn(bool on) QPixmap((const char **)sticky_xpm)); repaint(); QToolTip::remove(this); - QToolTip::add(this, on_ ? i18n("Not on all desktops") + this->setToolTip( on_ ? i18n("Not on all desktops") : i18n("On all desktops")); } diff --git a/kwin-styles/system/systemclient.cpp b/kwin-styles/system/systemclient.cpp index 1090bba5..cef5448a 100644 --- a/kwin-styles/system/systemclient.cpp +++ b/kwin-styles/system/systemclient.cpp @@ -216,7 +216,7 @@ void SystemButton::setTipText(const QString &tip) if (KDecoration::options()->showTooltips()) { QToolTip::remove(this ); - QToolTip::add(this, tip ); + this->setToolTip( tip ); } } -- 2.11.4.GIT