diff options
| author | 2024-03-24 11:39:46 +0100 | |
|---|---|---|
| committer | 2024-03-24 11:39:46 +0100 | |
| commit | e68e34095057a9d7d7aedbaf8ad9773913aa4794 (patch) | |
| tree | d4953cef4477a68cacf76259a129653f2f080da8 /src/modules/objects/KvsObject_pixmap.cpp | |
| parent | Fix Wayland appId (#2621) (diff) | |
| download | KVIrc-e68e34095057a9d7d7aedbaf8ad9773913aa4794.tar.gz KVIrc-e68e34095057a9d7d7aedbaf8ad9773913aa4794.tar.bz2 KVIrc-e68e34095057a9d7d7aedbaf8ad9773913aa4794.zip | |
More qt6 porting (#2622)
* Port QColor::setNamedColor to QColor::fromString
* Port from QVariant::Type to QmetaType::Type
* KviCoreActions: port from QAction::parentWidget to qobject_cast + QAction::parent
* KviIrcView: port QString::fromUtf16 usage to the non-obsolete char16_t* overload
* KviTopicWidget: port QMouseEvent to a non-obsolete overload
* Port QMouseEvent from old pos(), x(), y(), to position()
* Port obsolete QMessageBox usage to custom buttons
* KviApplication: initialize the dbus notify message "replace ID" to 0
* KviIrcConnection: port deprecated QString::count() to QString::size()
* KvsObject_*: port QColor::setNamedColor to QColor::fromString
* KvsObject_widget: port QWidget::isTopLevel to QWidget::isWindow
* KviMainWindow: use QKeyCombination instead of int for shortcuts
* QHttp: avoid deprecated methods for QCryptographicHash
* ScriptEditorWidget: use the new signature for QMenu::addAction()
* KviInputEditor: Extract ACCEL_KEY from header and avoid warning
* KviStringConversion: convert old Qt5 font weights to new "css" font weights
* syntax fix
Diffstat (limited to 'src/modules/objects/KvsObject_pixmap.cpp')
| -rw-r--r-- | src/modules/objects/KvsObject_pixmap.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/modules/objects/KvsObject_pixmap.cpp b/src/modules/objects/KvsObject_pixmap.cpp index 9bd184479..15377194b 100644 --- a/src/modules/objects/KvsObject_pixmap.cpp +++ b/src/modules/objects/KvsObject_pixmap.cpp @@ -150,7 +150,11 @@ KVSO_CLASS_FUNCTION(pixmap, fill) return true; } } +#if (QT_VERSION < QT_VERSION_CHECK(6, 4, 0)) col.setNamedColor(szColor); +#else + col = QColor::fromString(szColor); +#endif col.setAlpha(iOpacity); } else @@ -265,7 +269,11 @@ KVSO_CLASS_FUNCTION(pixmap, setPixel) return true; } } +#if (QT_VERSION < QT_VERSION_CHECK(6, 4, 0)) col.setNamedColor(szColor); +#else + col = QColor::fromString(szColor); +#endif col.setAlpha(iOpacity); } else |
