diff options
author | Mehdi Chinoune <mehdi.chinoune@hotmail.com> | 2022-06-09 20:19:19 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-06-10 18:33:20 (GMT) |
commit | 497397bd17ab2855c348c6ee0ed1e28bacd29aca (patch) | |
tree | b343be099a6bd9f51bc7cd00f88e5cddf16fadf0 /Source/QtDialog/QCMakePresetItemModel.cxx | |
parent | efbbae9705d89719804387056c8d592545710487 (diff) | |
download | CMake-497397bd17ab2855c348c6ee0ed1e28bacd29aca.zip CMake-497397bd17ab2855c348c6ee0ed1e28bacd29aca.tar.gz CMake-497397bd17ab2855c348c6ee0ed1e28bacd29aca.tar.bz2 |
cmake-gui: Support non-ASCII chars on Windows with Qt6
Since commit baead1e2a8 (Encoding: Remove option to use ANSI code page
internally, 2016-11-01, v3.8.0-rc1~358^2), we always use UTF-8 strings
internally. Using fromLocal8Bit/toLocal8Bit + QTextCodec is no longer
needed. Convert to fromStdString/toStdString instead, which should work
both with Qt5 and Qt6.
Fixes: #23565
Diffstat (limited to 'Source/QtDialog/QCMakePresetItemModel.cxx')
-rw-r--r-- | Source/QtDialog/QCMakePresetItemModel.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/QtDialog/QCMakePresetItemModel.cxx b/Source/QtDialog/QCMakePresetItemModel.cxx index 00a4e18..7ada2a5 100644 --- a/Source/QtDialog/QCMakePresetItemModel.cxx +++ b/Source/QtDialog/QCMakePresetItemModel.cxx @@ -17,12 +17,12 @@ QVariant QCMakePresetItemModel::data(const QModelIndex& index, int role) const // AccessibleDescriptionRole. This was determined by looking at // QComboBoxDelegate::isSeparator() (located in qcombobox_p.h.) if (index.internalId() == SEPARATOR_INDEX) { - return QString::fromLocal8Bit("separator"); + return QString("separator"); } return QString{}; case Qt::DisplayRole: { if (index.internalId() == CUSTOM_INDEX) { - return QString::fromLocal8Bit("<custom>"); + return QString("<custom>"); } if (index.internalId() == SEPARATOR_INDEX) { return QVariant{}; @@ -32,7 +32,7 @@ QVariant QCMakePresetItemModel::data(const QModelIndex& index, int role) const } case Qt::ToolTipRole: if (index.internalId() == CUSTOM_INDEX) { - return QString::fromLocal8Bit("Specify all settings manually"); + return QString("Specify all settings manually"); } if (index.internalId() == SEPARATOR_INDEX) { return QVariant{}; |