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/CMakeSetupDialog.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/CMakeSetupDialog.cxx')
-rw-r--r-- | Source/QtDialog/CMakeSetupDialog.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index 3c41fce..01fa7bb 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -50,7 +50,7 @@ void OpenReferenceManual() if (!cmSystemTools::GetHTMLDoc().empty()) { url = QUrl::fromLocalFile( - QDir(QString::fromLocal8Bit(cmSystemTools::GetHTMLDoc().data())) + QDir(QString::fromStdString(cmSystemTools::GetHTMLDoc())) .filePath("index.html")); } @@ -735,7 +735,7 @@ void CMakeSetupDialog::showPresetLoadError( { QMessageBox::warning( this, "Error Reading CMake Presets", - QString::fromLocal8Bit("Could not read presets from %1: %2") + QString("Could not read presets from %1: %2") .arg(dir, cmCMakePresetsGraph::ResultToString(result))); } |