Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit ae543af8 authored by Laurent Montel's avatar Laurent Montel 😁

Don't use KCombobox here

parent 1016b13a
......@@ -21,7 +21,7 @@
#include "ui_imagescalingwidget.h"
#include "settings/messagecomposersettings.h"
#include <KComboBox>
#include <QComboBox>
#include <KLocalizedString>
#include <KMessageBox>
......@@ -73,11 +73,11 @@ ImageScalingWidget::ImageScalingWidget(QWidget *parent)
connect(d->ui->skipImageSizeLower, &QCheckBox::clicked, this, &ImageScalingWidget::changed);
connect(d->ui->imageSize, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &ImageScalingWidget::changed);
connect(d->ui->pattern, &KLineEdit::textChanged, this, &ImageScalingWidget::changed);
connect(d->ui->CBMaximumWidth, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &ImageScalingWidget::slotComboboxChanged);
connect(d->ui->CBMaximumHeight, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &ImageScalingWidget::slotComboboxChanged);
connect(d->ui->CBMinimumWidth, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &ImageScalingWidget::slotComboboxChanged);
connect(d->ui->CBMinimumHeight, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &ImageScalingWidget::slotComboboxChanged);
connect(d->ui->WriteToImageFormat, static_cast<void (KComboBox::*)(int)>(&KComboBox::activated), this, &ImageScalingWidget::changed);
connect(d->ui->CBMaximumWidth, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &ImageScalingWidget::slotComboboxChanged);
connect(d->ui->CBMaximumHeight, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &ImageScalingWidget::slotComboboxChanged);
connect(d->ui->CBMinimumWidth, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &ImageScalingWidget::slotComboboxChanged);
connect(d->ui->CBMinimumHeight, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &ImageScalingWidget::slotComboboxChanged);
connect(d->ui->WriteToImageFormat, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), this, &ImageScalingWidget::changed);
connect(d->ui->renameResizedImage, &QCheckBox::clicked, this, &ImageScalingWidget::changed);
connect(d->ui->renameResizedImage, &QCheckBox::clicked, d->ui->renameResizedImagePattern, &KLineEdit::setEnabled);
connect(d->ui->renameResizedImagePattern, &KLineEdit::textChanged, this, &ImageScalingWidget::changed);
......@@ -151,7 +151,7 @@ void ImageScalingWidget::slotRecipientFilterClicked(int button)
void ImageScalingWidget::slotComboboxChanged(int index)
{
KComboBox *combo = qobject_cast< KComboBox * >(sender());
QComboBox *combo = qobject_cast< QComboBox * >(sender());
if (combo) {
const bool isCustom = combo->itemData(index) == -1;
if (combo == d->ui->CBMaximumWidth) {
......@@ -167,7 +167,7 @@ void ImageScalingWidget::slotComboboxChanged(int index)
}
}
void ImageScalingWidget::initComboBox(KComboBox *combo)
void ImageScalingWidget::initComboBox(QComboBox *combo)
{
const QList<int> size = { 240, 320, 512, 640, 800, 1024, 1600, 2048 };
for (int val : size) {
......
......@@ -22,7 +22,7 @@
#include <QWidget>
#include "messagecomposer_export.h"
class KComboBox;
class QComboBox;
namespace Ui
{
class ImageScalingWidget;
......@@ -53,7 +53,7 @@ private Q_SLOTS:
private:
void updateFilterSourceTypeSettings();
void initComboBox(KComboBox *combo);
void initComboBox(QComboBox *combo);
void initWriteImageFormat();
void updateEmailsFilterTypeSettings();
void updateSettings();
......
......@@ -52,7 +52,7 @@
</widget>
</item>
<item>
<widget class="KComboBox" name="WriteToImageFormat"/>
<widget class="QComboBox" name="WriteToImageFormat"/>
</item>
</layout>
</item>
......@@ -122,10 +122,10 @@
<item row="0" column="1">
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="KComboBox" name="CBMaximumWidth"/>
<widget class="QComboBox" name="CBMaximumWidth"/>
</item>
<item row="2" column="0">
<widget class="KComboBox" name="CBMaximumHeight"/>
<widget class="QComboBox" name="CBMaximumHeight"/>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="customMaximumWidth">
......@@ -187,10 +187,10 @@
<item row="0" column="1">
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="KComboBox" name="CBMinimumWidth"/>
<widget class="QComboBox" name="CBMinimumWidth"/>
</item>
<item row="2" column="0">
<widget class="KComboBox" name="CBMinimumHeight"/>
<widget class="QComboBox" name="CBMinimumHeight"/>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="customMinimumWidth">
......@@ -479,12 +479,6 @@
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KComboBox</class>
<extends>QComboBox</extends>
<header>kcombobox.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>KLineEdit</class>
<extends>QLineEdit</extends>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment