diff --git a/Editor/common_features/crashhandler.ui b/Editor/common_features/crashhandler.ui
index afc6ddbd2..1b1276ff3 100644
--- a/Editor/common_features/crashhandler.ui
+++ b/Editor/common_features/crashhandler.ui
@@ -14,8 +14,8 @@
Crash
-
- :/toolbar/dock/bookmarks.png:/toolbar/dock/bookmarks.png
+
+ :/toolbar/dock/bug.png:/toolbar/dock/bug.png
-
@@ -149,6 +149,7 @@
+
diff --git a/Editor/common_features/json_settings_widget.cpp b/Editor/common_features/json_settings_widget.cpp
index 6af9ad874..5555e9b7f 100644
--- a/Editor/common_features/json_settings_widget.cpp
+++ b/Editor/common_features/json_settings_widget.cpp
@@ -249,24 +249,24 @@ void JsonSettingsWidget::SetupStack::setValue(const QString &propertyId, const Q
o = o[t].toObject();
}
- switch(value.type())
+ switch(value.Q_QVariantType())
{
- case QVariant::Rect:
+ case Q_QVariantTypeEnum::Rect:
o[top] = rectToArray(value);
break;
- case QVariant::RectF:
+ case Q_QVariantTypeEnum::RectF:
o[top] = rectfToArray(value);
break;
- case QVariant::Point:
+ case Q_QVariantTypeEnum::Point:
o[top] = pointToArray(value);
break;
- case QVariant::PointF:
+ case Q_QVariantTypeEnum::PointF:
o[top] = pointfToArray(value);
break;
- case QVariant::Size:
+ case Q_QVariantTypeEnum::Size:
o[top] = sizeToArray(value);
break;
- case QVariant::SizeF:
+ case Q_QVariantTypeEnum::SizeF:
o[top] = sizefToArray(value);
break;
default:
@@ -514,39 +514,39 @@ QVariant JsonSettingsWidget::retrieve_property(const JsonSettingsWidget::SetupSt
return defaultValue;
}
- switch(defaultValue.type())
+ switch(defaultValue.Q_QVariantType())
{
- case QVariant::Size:
+ case Q_QVariantTypeEnum::Size:
{
QJsonObject sz = o[prop].toObject();
out = QSize(sz["w"].toInt(), sz["h"].toInt());
break;
}
- case QVariant::SizeF:
+ case Q_QVariantTypeEnum::SizeF:
{
QJsonObject sz = o[prop].toObject();
out = QSizeF(sz["w"].toDouble(), sz["h"].toDouble());
break;
}
- case QVariant::Point:
+ case Q_QVariantTypeEnum::Point:
{
QJsonObject sz = o[prop].toObject();
out = QPoint(sz["x"].toInt(), sz["y"].toInt());
break;
}
- case QVariant::PointF:
+ case Q_QVariantTypeEnum::PointF:
{
QJsonObject sz = o[prop].toObject();
out = QPointF(sz["x"].toDouble(), sz["y"].toDouble());
break;
}
- case QVariant::Rect:
+ case Q_QVariantTypeEnum::Rect:
{
QJsonObject sz = o[prop].toObject();
out = QRect(sz["x"].toInt(), sz["y"].toInt(), sz["w"].toInt(), sz["h"].toInt());
break;
}
- case QVariant::RectF:
+ case Q_QVariantTypeEnum::RectF:
{
QJsonObject sz = o[prop].toObject();
out = QRectF(sz["x"].toDouble(), sz["y"].toDouble(), sz["w"].toDouble(), sz["h"].toDouble());
@@ -642,13 +642,13 @@ static QColor colorFromHexValue(QString color)
if(color.size() >= 6)
{
- newRgba.setRed(color.midRef(0, 2).toInt(nullptr, 16));
- newRgba.setGreen(color.midRef(2, 2).toInt(nullptr, 16));
- newRgba.setBlue(color.midRef(4, 2).toInt(nullptr, 16));
+ newRgba.setRed(Q_QStringRef(color, 0, 2).toInt(nullptr, 16));
+ newRgba.setGreen(Q_QStringRef(color, 2, 2).toInt(nullptr, 16));
+ newRgba.setBlue(Q_QStringRef(color, 4, 2).toInt(nullptr, 16));
}
if(color.size() == 8)
- newRgba.setAlpha(color.midRef(6, 2).toInt(nullptr, 16));
+ newRgba.setAlpha(Q_QStringRef(color, 6, 2).toInt(nullptr, 16));
else
newRgba.setAlpha(255);
diff --git a/Editor/editing/_components/history/historyelementreplaceplayerpoint.cpp b/Editor/editing/_components/history/historyelementreplaceplayerpoint.cpp
index 2f80de026..48973555a 100644
--- a/Editor/editing/_components/history/historyelementreplaceplayerpoint.cpp
+++ b/Editor/editing/_components/history/historyelementreplaceplayerpoint.cpp
@@ -2,6 +2,7 @@
#include
#include
#include "itemsearcher.h"
+#include
HistoryElementReplacePlayerPoint::HistoryElementReplacePlayerPoint(PlayerPoint plr, QVariant oldPos, QObject *parent) :
@@ -70,7 +71,7 @@ void HistoryElementReplacePlayerPoint::historyRemovePlayerPoint(const PlayerPoin
if(!m_oldPos.isNull())
{
- if(m_oldPos.type() == QVariant::List)
+ if(m_oldPos.Q_QVariantType() == Q_QVariantTypeEnum::List)
{
QList mData = m_oldPos.toList();
if(mData.size() == 5)
diff --git a/Editor/main_window/dock/lvl_events_box.ui b/Editor/main_window/dock/lvl_events_box.ui
index 32106f383..c377e6488 100644
--- a/Editor/main_window/dock/lvl_events_box.ui
+++ b/Editor/main_window/dock/lvl_events_box.ui
@@ -83,8 +83,8 @@
-
- :/images/copy_16x16.png:/images/copy_16x16.png
+
+ :/dock/copy_16x16.png:/dock/copy_16x16.png
@@ -183,7 +183,7 @@
0
- -300
+ 0
269
2316
@@ -1588,7 +1588,7 @@
-
+
diff --git a/Editor/main_window/dock/lvl_warp_props.ui b/Editor/main_window/dock/lvl_warp_props.ui
index 1e9e89186..cbcf6be49 100644
--- a/Editor/main_window/dock/lvl_warp_props.ui
+++ b/Editor/main_window/dock/lvl_warp_props.ui
@@ -26,7 +26,7 @@
Qt::NoFocus
-
+
:/toolbar/dock/doors.png:/toolbar/dock/doors.png
@@ -55,7 +55,7 @@
0
- -199
+ 0
325
947
@@ -403,8 +403,8 @@ Every warp point pair requires a warp entry.
Duplicate
-
- :/images/copy_16x16.png:/images/copy_16x16.png
+
+ :/dock/copy_16x16.png:/dock/copy_16x16.png
@@ -1135,7 +1135,8 @@ If this flag is enabled, you can only place a warp exit.
-
+
+
diff --git a/Editor/tools/tilesets/tileset.cpp b/Editor/tools/tilesets/tileset.cpp
index 89f3e10f9..388982617 100644
--- a/Editor/tools/tilesets/tileset.cpp
+++ b/Editor/tools/tilesets/tileset.cpp
@@ -23,9 +23,11 @@
#include
#include
+#include
#include "tileset.h"
+
tileset::tileset(DataConfig *conf, int type, QWidget *parent, int baseSize, int rows, int cols, QGraphicsScene *scene) :
QWidget(parent)
{
@@ -125,10 +127,10 @@ void tileset::dragLeaveEvent(QDragLeaveEvent *event)
void tileset::dragMoveEvent(QDragMoveEvent *event)
{
if(event->mimeData()->hasFormat(getMimeType())
- && findPiece(targetSquare(event->pos())) == -1)
+ && findPiece(targetSquare(event->Q_EventPos())) == -1)
{
- highlightedRect = targetSquare(event->pos());
+ highlightedRect = targetSquare(event->Q_EventPos());
event->setDropAction(Qt::MoveAction);
event->accept();
}
@@ -144,12 +146,12 @@ void tileset::dragMoveEvent(QDragMoveEvent *event)
void tileset::dropEvent(QDropEvent *event)
{
if(event->mimeData()->hasFormat(getMimeType())
- && findPiece(targetSquare(event->pos())) == -1)
+ && findPiece(targetSquare(event->Q_EventPos())) == -1)
{
QByteArray pieceData = event->mimeData()->data(getMimeType());
QDataStream stream(&pieceData, QIODevice::ReadOnly);
- QRect square = targetSquare(event->pos());
+ QRect square = targetSquare(event->Q_EventPos());
int objID;
stream >> objID;
diff --git a/PlayableCalibrator/calibration_main.ui b/PlayableCalibrator/calibration_main.ui
index 8159ddb9c..7b095a73e 100644
--- a/PlayableCalibrator/calibration_main.ui
+++ b/PlayableCalibrator/calibration_main.ui
@@ -39,7 +39,7 @@
34
-
+
0
@@ -120,7 +120,7 @@
Reset scroll
-
+
:/images/reset_pos.png:/images/reset_pos.png
@@ -184,7 +184,7 @@
Save config
-
+
:/images/save.png:/images/save.png
@@ -375,8 +375,8 @@
0
-
- QDockWidget::AllDockWidgetFeatures
+
+ Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea
Settings
@@ -685,6 +685,9 @@
+
+ Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea
+
Scrolling
@@ -785,7 +788,7 @@ Right button - move grab offset if visible.
Reset scroll
-
+
:/images/reset_pos.png:/images/reset_pos.png
@@ -824,7 +827,7 @@ Right button - Move the right-bottom crop edges.
-
+
:/images/open.png:/images/open.png
@@ -847,7 +850,7 @@ Right button - Move the right-bottom crop edges.
-
+
:/images/edit_copy.png:/images/edit_copy.png
@@ -929,7 +932,7 @@ Right button - Move the right-bottom crop edges.
-
+
:/images/save.png:/images/save.png
@@ -941,7 +944,7 @@ Right button - Move the right-bottom crop edges.
-
+
:/images/reset_pos.png:/images/reset_pos.png
@@ -1032,9 +1035,6 @@ Right button - Move the right-bottom crop edges.
mountRiding
-
-
-
diff --git a/_common/qt-modules/compat/pge_qt_compat.h b/_common/qt-modules/compat/pge_qt_compat.h
index b6996b5cb..bc3e0814b 100644
--- a/_common/qt-modules/compat/pge_qt_compat.h
+++ b/_common/qt-modules/compat/pge_qt_compat.h
@@ -43,6 +43,13 @@
# define QSTRING_SPLIT_BEHAVIOUR(x) Qt::x
#endif
+// QString::midRef / QStringView
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+# define Q_QStringRef(x, p, n) QStringView{x}.mid((p), (n))
+#else
+# define Q_QStringRef(x, p, n) x.midRef((p), (n))
+#endif
+
// QStextStream::endl
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
# define QT_ENDL Qt::endl;
@@ -124,5 +131,91 @@
# define Q_QRegExpValidator QRegExpValidator
#endif
+// QVariant::type() / QVariant::typeId()
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+# define Q_QVariantType typeId
+namespace Q_QVariantTypeEnum
+{
+enum VariantType
+{
+ Invalid = QMetaType::UnknownType,
+ Bool = QMetaType::Bool,
+ Int = QMetaType::Int,
+ UInt = QMetaType::UInt,
+ LongLong = QMetaType::LongLong,
+ ULongLong = QMetaType::ULongLong,
+ Double = QMetaType::Double,
+ Char = QMetaType::QChar,
+ Map = QMetaType::QVariantMap,
+ List = QMetaType::QVariantList,
+ String = QMetaType::QString,
+ StringList = QMetaType::QStringList,
+ ByteArray = QMetaType::QByteArray,
+ BitArray = QMetaType::QBitArray,
+ Date = QMetaType::QDate,
+ Time = QMetaType::QTime,
+ DateTime = QMetaType::QDateTime,
+ Url = QMetaType::QUrl,
+ Locale = QMetaType::QLocale,
+ Rect = QMetaType::QRect,
+ RectF = QMetaType::QRectF,
+ Size = QMetaType::QSize,
+ SizeF = QMetaType::QSizeF,
+ Line = QMetaType::QLine,
+ LineF = QMetaType::QLineF,
+ Point = QMetaType::QPoint,
+ PointF = QMetaType::QPointF,
+#if QT_CONFIG(regularexpression)
+ RegularExpression = QMetaType::QRegularExpression,
+#endif
+ Hash = QMetaType::QVariantHash,
+#if QT_CONFIG(easingcurve)
+ EasingCurve = QMetaType::QEasingCurve,
+#endif
+ Uuid = QMetaType::QUuid,
+#if QT_CONFIG(itemmodel)
+ ModelIndex = QMetaType::QModelIndex,
+ PersistentModelIndex = QMetaType::QPersistentModelIndex,
+#endif
+ LastCoreType = QMetaType::LastCoreType,
+
+ Font = QMetaType::QFont,
+ Pixmap = QMetaType::QPixmap,
+ Brush = QMetaType::QBrush,
+ Color = QMetaType::QColor,
+ Palette = QMetaType::QPalette,
+ Image = QMetaType::QImage,
+ Polygon = QMetaType::QPolygon,
+ Region = QMetaType::QRegion,
+ Bitmap = QMetaType::QBitmap,
+ Cursor = QMetaType::QCursor,
+#if QT_CONFIG(shortcut)
+ KeySequence = QMetaType::QKeySequence,
+#endif
+ Pen = QMetaType::QPen,
+ TextLength = QMetaType::QTextLength,
+ TextFormat = QMetaType::QTextFormat,
+ Transform = QMetaType::QTransform,
+ Matrix4x4 = QMetaType::QMatrix4x4,
+ Vector2D = QMetaType::QVector2D,
+ Vector3D = QMetaType::QVector3D,
+ Vector4D = QMetaType::QVector4D,
+ Quaternion = QMetaType::QQuaternion,
+ PolygonF = QMetaType::QPolygonF,
+ Icon = QMetaType::QIcon,
+ LastGuiType = QMetaType::LastGuiType,
+
+ SizePolicy = QMetaType::QSizePolicy,
+
+ UserType = QMetaType::User,
+ LastType = 0xffffffff // need this so that gcc >= 3.4 allocates 32 bits for Type
+};
+
+}
+#else
+# define Q_QVariantType type
+# define Q_QVariantTypeEnum QVariant
+#endif
+
#endif // COMPAT_H
diff --git a/_common/qt-modules/file_list_browser/file_list_model.cpp b/_common/qt-modules/file_list_browser/file_list_model.cpp
index 6ccdb1d00..6c34e9246 100644
--- a/_common/qt-modules/file_list_browser/file_list_model.cpp
+++ b/_common/qt-modules/file_list_browser/file_list_model.cpp
@@ -16,8 +16,13 @@
* along with this program. If not, see .
*/
+#include
#include
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include
+#else
+#include
+#endif
#include "file_list_model.h"
@@ -143,8 +148,13 @@ bool FileListModel::filterMatch(const QString &file) const
if(m_filter.contains('*'))
{
- QRegExp cond(m_filter, Qt::CaseInsensitive, QRegExp::Wildcard);
- return cond.exactMatch(file);
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
+ Q_QRegExp cond(m_filter, Qt::CaseInsensitive, QRegExp::Wildcard);
+#else
+ Q_QRegExp cond = QRegularExpression::fromWildcard(m_filter, Qt::CaseInsensitive);
+#endif
+
+ return cond.Q_QRegExpMatch(file);
}
return file.contains(m_filter, Qt::CaseInsensitive);
diff --git a/_common/qt-modules/file_list_browser/musicfilelist.cpp b/_common/qt-modules/file_list_browser/musicfilelist.cpp
index edb050a7a..de0ca87d4 100644
--- a/_common/qt-modules/file_list_browser/musicfilelist.cpp
+++ b/_common/qt-modules/file_list_browser/musicfilelist.cpp
@@ -200,7 +200,7 @@ MusicFileList::MusicFileList(QString searchDirectory, QString curFile, QWidget *
}
previewLayout->addWidget(m_previewButton, 0, 0);
- previewLayout->setMargin(0);
+ previewLayout->setContentsMargins(0, 0, 0, 0);
previewLayout->setColumnStretch(0, 0);
previewLayout->setColumnStretch(1, 10000);