diff options
author | Stephan Binner <stephan.binner@basyskom.com> | 2017-05-31 20:43:28 +0200 |
---|---|---|
committer | Stephan Binner <stephan.binner@basyskom.com> | 2017-06-29 02:23:22 +0000 |
commit | 63cc734abb7b31a73c60767b9af521783c102bd4 (patch) | |
tree | 3ccbdaaaf8d45dbded4b9132088e29b90b2e4706 /src/widgets/dialogs/qfilesystemmodel.cpp | |
parent | 003dc8e29a89c18729fc696ea9ca224645e792fd (diff) |
Convert features.messagebox to QT_[REQUIRE_]CONFIG
Change-Id: Ie25dc672f8a675c06585c7757255f7dbadbfc5ec
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/widgets/dialogs/qfilesystemmodel.cpp')
-rw-r--r-- | src/widgets/dialogs/qfilesystemmodel.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp index db1ce3fe0e..0ada9c6c58 100644 --- a/src/widgets/dialogs/qfilesystemmodel.cpp +++ b/src/widgets/dialogs/qfilesystemmodel.cpp @@ -43,7 +43,9 @@ #include <qmimedata.h> #include <qurl.h> #include <qdebug.h> +#if QT_CONFIG(messagebox) #include <qmessagebox.h> +#endif #include <qapplication.h> #include <QtCore/qcollator.h> @@ -881,12 +883,12 @@ bool QFileSystemModel::setData(const QModelIndex &idx, const QVariant &value, in if (newName.isEmpty() || QDir::toNativeSeparators(newName).contains(QDir::separator()) || !QDir(parentPath).rename(oldName, newName)) { -#ifndef QT_NO_MESSAGEBOX +#if QT_CONFIG(messagebox) QMessageBox::information(0, QFileSystemModel::tr("Invalid filename"), QFileSystemModel::tr("<b>The name \"%1\" can not be used.</b><p>Try using another name, with fewer characters or no punctuations marks.") .arg(newName), QMessageBox::Ok); -#endif // QT_NO_MESSAGEBOX +#endif // QT_CONFIG(messagebox) return false; } else { /* |