From 199741d0260f5cbdb05e64fe73cfca1820da93d1 Mon Sep 17 00:00:00 2001 From: David Faure Date: Sat, 23 Jun 2012 10:02:11 +0200 Subject: Fix applicationName() being empty in QApplication. A virtual method was reimplemented to return an always-empty string, probably a leftover from a refactoring. This fix showed that tst_qwidget_window was buggy: between Qt4 and Qt5, a "Before" became "After", which made "Before" unused, and was masking the fact that the app name was empty by default. In addition, the earlier Qt5 change that made the app name default to argv[0] now requires updating this test, now that it's actually working. Change-Id: I5360026821a9b95bedd0ff09dba3d51a22e542b7 Reviewed-by: Marc Mutz Reviewed-by: Paul Olav Tvete --- src/widgets/kernel/qapplication_p.h | 1 - src/widgets/kernel/qapplication_qpa.cpp | 7 ------- 2 files changed, 8 deletions(-) (limited to 'src/widgets/kernel') diff --git a/src/widgets/kernel/qapplication_p.h b/src/widgets/kernel/qapplication_p.h index 3ce590865b..3d08465b87 100644 --- a/src/widgets/kernel/qapplication_p.h +++ b/src/widgets/kernel/qapplication_p.h @@ -135,7 +135,6 @@ public: void createEventDispatcher(); - QString appName() const; static void dispatchEnterLeave(QWidget *enter, QWidget *leave); //modality diff --git a/src/widgets/kernel/qapplication_qpa.cpp b/src/widgets/kernel/qapplication_qpa.cpp index 7ccf14d49f..0afc208571 100644 --- a/src/widgets/kernel/qapplication_qpa.cpp +++ b/src/widgets/kernel/qapplication_qpa.cpp @@ -71,7 +71,6 @@ QT_BEGIN_NAMESPACE -static QString appName; static QString appFont; static bool popupGrabOk = false; static QPointer autoGrabber; @@ -80,11 +79,6 @@ extern QWidget *qt_popup_down; extern bool qt_replay_popup_mouse_event; int openPopupCount = 0; -QString QApplicationPrivate::appName() const -{ - return QT_PREPEND_NAMESPACE(appName); -} - void QApplicationPrivate::createEventDispatcher() { QGuiApplicationPrivate::createEventDispatcher(); @@ -456,7 +450,6 @@ void qt_init(QApplicationPrivate *priv, int type) if (const QPalette *toolTipPalette = QGuiApplicationPrivate::platformTheme()->palette(QPlatformTheme::ToolTipPalette)) QToolTip::setPalette(*toolTipPalette); QApplicationPrivate::initializeWidgetFontHash(); - qApp->setObjectName(appName); } #ifdef Q_OS_WIN -- cgit v1.2.3