krazy fixes: Qt classes that should not be used

svn path=/trunk/KDE/kdepim/; revision=886734
wilder-work
Bertjan Broeksema 18 years ago
parent bf18ff6ba8
commit 538cab795b
  1. 9
      messagelistview/core/comboboxutils.cpp
  2. 12
      messagelistview/core/comboboxutils.h
  3. 6
      messagelistview/core/themeeditor.cpp
  4. 6
      messagelistview/core/themeeditor.h

@ -20,9 +20,10 @@
#include "messagelistview/core/comboboxutils.h"
#include <QComboBox>
#include <QVariant>
#include <KComboBox>
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 )

@ -24,7 +24,7 @@
#include <QList>
#include <QPair>
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

@ -31,7 +31,6 @@
#include <QActionGroup>
#include <QCheckBox>
#include <QColorDialog>
#include <QComboBox>
#include <QCursor>
#include <QDrag>
#include <QGridLayout>
@ -48,6 +47,7 @@
#include <QPushButton>
#include <QStringList>
#include <KComboBox>
#include <KLocale>
#include <KFontDialog>
#include <KMenu>
@ -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 );

@ -31,7 +31,7 @@
#include <KDialog>
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.

Loading…
Cancel
Save