summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2017-03-10 15:27:40 +0100
committerMarc Mutz <marc.mutz@kdab.com>2017-03-12 17:41:16 +0000
commit75f5e2bef2ab942f89d5d025ecd45ee4d18e3d57 (patch)
tree0b6da8d12aa9812b100f72cdd738c8be94a19254 /src/widgets/widgets
parent63a39927a098aeb60a03b77361502b5be7659f1d (diff)
Deprecate QString::null
It's a Qt 3 compatibility vehicle, and as such inherits the now-alien property to distinguish empty and null strings. Particularly worrisome is the following asymmetry: QString("") == QString::null // false QString("") == QString(QString::null) // true Instead of fixing this behavior, recognize that people might use it as a weird way to call isNull(), albeit one that once was idiomatic, and simply deprecate everything that deals with QString::null. [ChangeLog][QtCore][QString] QString::null is now deprecated. When used to construct a QString, use QString() instead. When used to compare to a QString, replace with QString::isNull(). Change-Id: I9f7e84a92522c75666da15f49324c500ae93af42 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r--src/widgets/widgets/qmdisubwindow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/widgets/qmdisubwindow.cpp b/src/widgets/widgets/qmdisubwindow.cpp
index a627c86871..a8cdca1719 100644
--- a/src/widgets/widgets/qmdisubwindow.cpp
+++ b/src/widgets/widgets/qmdisubwindow.cpp
@@ -1863,7 +1863,7 @@ void QMdiSubWindowPrivate::removeButtonsFromMenuBar()
topLevelWindow->removeEventFilter(q);
if (baseWidget && !drawTitleBarWhenMaximized())
topLevelWindow->setWindowModified(false);
- originalTitle = QString::null;
+ originalTitle.clear();
}
#endif // QT_NO_MENUBAR
@@ -2769,7 +2769,7 @@ bool QMdiSubWindow::eventFilter(QObject *object, QEvent *event)
#ifndef QT_NO_MENUBAR
} else if (maximizedButtonsWidget() && d->controlContainer->menuBar() && d->controlContainer->menuBar()
->cornerWidget(Qt::TopRightCorner) == maximizedButtonsWidget()) {
- d->originalTitle = QString::null;
+ d->originalTitle.clear();
if (d->baseWidget && d->baseWidget->windowTitle() == windowTitle())
d->updateWindowTitle(true);
else