From 538cab795ba148123e9d32287e0e88ff498aff08 Mon Sep 17 00:00:00 2001 From: Bertjan Broeksema Date: Wed, 19 Nov 2008 22:42:35 +0000 Subject: [PATCH] krazy fixes: Qt classes that should not be used svn path=/trunk/KDE/kdepim/; revision=886734 --- messagelistview/core/comboboxutils.cpp | 9 +++++---- messagelistview/core/comboboxutils.h | 12 ++++++------ messagelistview/core/themeeditor.cpp | 6 +++--- messagelistview/core/themeeditor.h | 6 +++--- 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/messagelistview/core/comboboxutils.cpp b/messagelistview/core/comboboxutils.cpp index c65752dcd..49907314d 100644 --- a/messagelistview/core/comboboxutils.cpp +++ b/messagelistview/core/comboboxutils.cpp @@ -20,9 +20,10 @@ #include "messagelistview/core/comboboxutils.h" -#include #include +#include + namespace KMail { @@ -35,7 +36,7 @@ namespace Core namespace ComboBoxUtils { -void fillIntegerOptionCombo( QComboBox *combo, const QList< QPair< QString, int > > &optionDescriptors ) +void fillIntegerOptionCombo( KComboBox *combo, const QList< QPair< QString, int > > &optionDescriptors ) { int val = getIntegerOptionComboValue( combo, -1 ); combo->clear(); @@ -62,7 +63,7 @@ void fillIntegerOptionCombo( QComboBox *combo, const QList< QPair< QString, int } } -void setIntegerOptionComboValue( QComboBox *combo, int value ) +void setIntegerOptionComboValue( KComboBox *combo, int value ) { if ( !combo->isEnabled() ) return; @@ -88,7 +89,7 @@ void setIntegerOptionComboValue( QComboBox *combo, int value ) combo->setCurrentIndex( 0 ); // default } -int getIntegerOptionComboValue( QComboBox *combo, int defaultValue ) +int getIntegerOptionComboValue( KComboBox *combo, int defaultValue ) { int idx = combo->currentIndex(); if ( idx < 0 ) diff --git a/messagelistview/core/comboboxutils.h b/messagelistview/core/comboboxutils.h index 785b3b868..e732da45e 100644 --- a/messagelistview/core/comboboxutils.h +++ b/messagelistview/core/comboboxutils.h @@ -24,7 +24,7 @@ #include #include -class QComboBox; +class KComboBox; namespace KMail { @@ -36,28 +36,28 @@ namespace Core { /** - * Namespace containing some helper functions for QComboBox widgets. + * Namespace containing some helper functions for KComboBox widgets. */ namespace ComboBoxUtils { /** - * Fills the specified QComboBox with the options available in optionDescriptors. + * Fills the specified KComboBox with the options available in optionDescriptors. * Each option descriptor contains a description string and a distinct integer (possibly enum) * identifier value. */ - void fillIntegerOptionCombo( QComboBox *combo, const QList< QPair< QString, int > > &optionDescriptors ); + void fillIntegerOptionCombo( KComboBox *combo, const QList< QPair< QString, int > > &optionDescriptors ); /** * Returns the identifier of the currently selected option in the specified combo. * If the combo has no current selection or something goes wrong then the defaultValue * is returned instead. */ - int getIntegerOptionComboValue( QComboBox *combo, int defaultValue ); + int getIntegerOptionComboValue( KComboBox *combo, int defaultValue ); /** * Sets the currently selected option in the specified combo. */ - void setIntegerOptionComboValue( QComboBox *combo, int value ); + void setIntegerOptionComboValue( KComboBox *combo, int value ); } // namespace ComboBoxUtils diff --git a/messagelistview/core/themeeditor.cpp b/messagelistview/core/themeeditor.cpp index 733f07881..3ee70b4c8 100644 --- a/messagelistview/core/themeeditor.cpp +++ b/messagelistview/core/themeeditor.cpp @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include @@ -48,6 +47,7 @@ #include #include +#include #include #include #include @@ -95,7 +95,7 @@ ThemeColumnPropertiesDialog::ThemeColumnPropertiesDialog( QWidget * parent, Them l = new QLabel( i18n( "Header Click Sorts Messages" ), base ); g->addWidget( l, 1, 0 ); - mMessageSortingCombo = new QComboBox( base ); + mMessageSortingCombo = new KComboBox( base ); mMessageSortingCombo->setToolTip( i18n( "The sorting order that cliking on this column header will switch to." ) ); g->addWidget( mMessageSortingCombo, 1, 1 ); @@ -1452,7 +1452,7 @@ ThemeEditor::ThemeEditor( QWidget *parent ) l = new QLabel( i18n( "Header:" ), tab ); tabg->addWidget( l, 0, 0 ); - mViewHeaderPolicyCombo = new QComboBox( tab ); + mViewHeaderPolicyCombo = new KComboBox( tab ); tabg->addWidget( mViewHeaderPolicyCombo, 0, 1 ); tabg->setColumnStretch( 1, 1 ); diff --git a/messagelistview/core/themeeditor.h b/messagelistview/core/themeeditor.h index f8b1abd61..8aecfef28 100644 --- a/messagelistview/core/themeeditor.h +++ b/messagelistview/core/themeeditor.h @@ -31,7 +31,7 @@ #include -class QComboBox; +class KComboBox; class QPaintDevice; class QCheckBox; @@ -60,7 +60,7 @@ protected: QLineEdit * mNameEdit; QCheckBox * mVisibleByDefaultCheck; QCheckBox * mIsSenderOrReceiverCheck; - QComboBox * mMessageSortingCombo; + KComboBox * mMessageSortingCombo; protected slots: void slotOkButtonClicked(); @@ -200,7 +200,7 @@ private: ThemePreviewWidget * mPreviewWidget; // Advanced tab - QComboBox * mViewHeaderPolicyCombo; + KComboBox * mViewHeaderPolicyCombo; public: /** * Sets the option set to be edited.