From kde-commits Thu Oct 24 17:54:32 2013 From: Konstantinos Smanis Date: Thu, 24 Oct 2013 17:54:32 +0000 To: kde-commits Subject: [kcm-grub2] /: Compile with QT_NO_CAST_FROM_BYTEARRAY. Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=138263728421547 Git commit a5656dcb056c0755b84f3b4a15dcccf598c678d0 by Konstantinos Smanis. Committed on 24/10/2013 at 13:54. Pushed by ksmanis into branch 'master'. Compile with QT_NO_CAST_FROM_BYTEARRAY. M +1 -1 CMakeLists.txt M +1 -1 src/common.cpp M +2 -2 src/convertDlg.cpp M +2 -2 src/kcm_grub2.cpp http://commits.kde.org/kcm-grub2/a5656dcb056c0755b84f3b4a15dcccf598c678d0 diff --git a/CMakeLists.txt b/CMakeLists.txt index ebd21a5..5066cc8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ find_package(KDE4 4.4.0 REQUIRED) include(KDE4Defaults) include(GRUBPaths) = -add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -D= MAGICKCORE_QUANTUM_DEPTH=3D16 -DMAGICKCORE_HDRI_ENABLE=3D0) +add_definitions(-DQT_NO_CAST_FROM_BYTEARRAY -DQT_USE_FAST_CONCATENATION -D= QT_USE_FAST_OPERATOR_PLUS -DMAGICKCORE_QUANTUM_DEPTH=3D16 -DMAGICKCORE_HDRI= _ENABLE=3D0) = macro_optional_find_package(ImageMagick COMPONENTS Magick++ MagickCore) macro_log_feature(ImageMagick_FOUND "ImageMagick" "Create splash images co= mpatible with GRUB2" "http://www.imagemagick.org/" FALSE "" "") diff --git a/src/common.cpp b/src/common.cpp index b84c387..5fc008b 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -35,7 +35,7 @@ QString unquoteWord(const QString &word) echo.setShellCommand(QString("echo -n %1").arg(word)); echo.setOutputChannelMode(KProcess::OnlyStdoutChannel); if (echo.execute() =3D=3D 0) { - return QString::fromLocal8Bit(echo.readAllStandardOutput()); + return QString::fromLocal8Bit(echo.readAllStandardOutput().constDa= ta()); } = QChar ch; diff --git a/src/convertDlg.cpp b/src/convertDlg.cpp index d61cfe1..1b0fa21 100644 --- a/src/convertDlg.cpp +++ b/src/convertDlg.cpp @@ -84,11 +84,11 @@ void ConvertDialog::slotButtonClicked(int button) } Magick::Geometry resolution(ui->spinBox_width->value(), ui->spinBo= x_height->value()); resolution.aspect(ui->checkBox_force->isChecked()); - Magick::Image image(std::string(ui->kurlrequester_image->url().toL= ocalFile().toUtf8())); + Magick::Image image(std::string(ui->kurlrequester_image->url().toL= ocalFile().toUtf8().constData())); image.zoom(resolution); image.depth(8); image.classType(Magick::DirectClass); - image.write(std::string(ui->kurlrequester_converted->url().toLocal= File().toUtf8())); + image.write(std::string(ui->kurlrequester_converted->url().toLocal= File().toUtf8().constData())); if (ui->checkBox_wallpaper->isChecked()) { emit splashImageCreated(ui->kurlrequester_converted->url().toL= ocalFile()); } diff --git a/src/kcm_grub2.cpp b/src/kcm_grub2.cpp index 44850c3..5b8e656 100644 --- a/src/kcm_grub2.cpp +++ b/src/kcm_grub2.cpp @@ -500,7 +500,7 @@ void KCMGRUB2::save() dialog->setModal(true); dialog->setDefaultButton(KDialog::Ok); dialog->setEscapeButton(KDialog::Ok); - KMessageBox::createKMessageBox(dialog, QMessageBox::Information, i= 18nc("@info", "Successfully saved GRUB settings."), QStringList(), QString(= ), 0, KMessageBox::Notify, QString::fromUtf8(reply.data().value("output").t= oByteArray())); // krazy:exclude=3Dqclasses + KMessageBox::createKMessageBox(dialog, QMessageBox::Information, i= 18nc("@info", "Successfully saved GRUB settings."), QStringList(), QString(= ), 0, KMessageBox::Notify, QString::fromUtf8(reply.data().value("output").t= oByteArray().constData())); // krazy:exclude=3Dqclasses load(); } else { KMessageBox::detailedError(this, i18nc("@info", "Failed to save GR= UB settings."), reply.errorDescription()); @@ -1134,7 +1134,7 @@ void KCMGRUB2::processReply(ActionReply &reply) errorMessage =3D i18nc("@info", "The process crashed."); break; default: - errorMessage =3D QString::fromUtf8(reply.data().value(QLatin1Strin= g("output")).toByteArray()); + errorMessage =3D QString::fromUtf8(reply.data().value(QLatin1Strin= g("output")).toByteArray().constData()); break; } reply.addData(QLatin1String("errorMessage"), errorMessage);