diff options
Diffstat (limited to 'src/designer/src/lib/shared/iconselector.cpp')
-rw-r--r-- | src/designer/src/lib/shared/iconselector.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/designer/src/lib/shared/iconselector.cpp b/src/designer/src/lib/shared/iconselector.cpp index d9d50e782..ccfdc5c18 100644 --- a/src/designer/src/lib/shared/iconselector.cpp +++ b/src/designer/src/lib/shared/iconselector.cpp @@ -55,6 +55,7 @@ #include <QtWidgets/qlabel.h> #include <QtGui/qvalidator.h> #include <QtCore/qdebug.h> +#include <QtCore/qvector.h> QT_BEGIN_NAMESPACE @@ -189,7 +190,7 @@ public: void slotResetAllActivated(); void slotUpdate(); - QList<QPair<QPair<QIcon::Mode, QIcon::State>, QString> > m_stateToName; // could be static map + QVector<QPair<QPair<QIcon::Mode, QIcon::State>, QString> > m_stateToName; // could be static map QMap<QPair<QIcon::Mode, QIcon::State>, int> m_stateToIndex; QMap<int, QPair<QIcon::Mode, QIcon::State> > m_indexToState; @@ -329,7 +330,7 @@ bool IconSelector::checkPixmap(const QString &fileName, CheckMode cm, QString *e static QString imageFilter() { QString filter = QApplication::translate("IconSelector", "All Pixmaps ("); - const QList<QByteArray> supportedImageFormats = QImageReader::supportedImageFormats(); + const auto supportedImageFormats = QImageReader::supportedImageFormats(); const QString jpeg = QStringLiteral("JPEG"); const int count = supportedImageFormats.count(); for (int i = 0; i< count; ++i) { @@ -590,8 +591,7 @@ void IconThemeEditor::updatePreview(const QString &t) { // Update preview label with icon. if (t.isEmpty() || !QIcon::hasThemeIcon(t)) { // Empty - const QPixmap *currentPixmap = d->m_themeLabel->pixmap(); - if (currentPixmap == nullptr || currentPixmap->cacheKey() != d->m_emptyPixmap.cacheKey()) + if (d->m_themeLabel->pixmap(Qt::ReturnByValue).cacheKey() != d->m_emptyPixmap.cacheKey()) d->m_themeLabel->setPixmap(d->m_emptyPixmap); } else { const QIcon icon = QIcon::fromTheme(t); |