From 798ccb30cfdbdd4b9d6febe3d66ade54dd36112f Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Mon, 26 Mar 2012 14:47:12 +0200 Subject: Update documentation for QAbstractEventDispatcher::TimerInfo This type is not a typedef anymore, it's a proper class. Change-Id: I611df067f2983baf262d84a82fb98e61124956d2 Reviewed-by: Robin Burchell Reviewed-by: Casper van Donderen --- src/corelib/kernel/qabstracteventdispatcher.cpp | 31 +++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) (limited to 'src/corelib/kernel') diff --git a/src/corelib/kernel/qabstracteventdispatcher.cpp b/src/corelib/kernel/qabstracteventdispatcher.cpp index b98f3f4a30..9d76aa610f 100644 --- a/src/corelib/kernel/qabstracteventdispatcher.cpp +++ b/src/corelib/kernel/qabstracteventdispatcher.cpp @@ -327,14 +327,37 @@ void QAbstractEventDispatcher::closingDown() { } /*! - \typedef QAbstractEventDispatcher::TimerInfo + \class QAbstractEventDispatcher::TimerInfo - Typedef for QPair. The first component of - the pair is the timer ID; the second component is - the interval. + This struct represents information about a timer: + \l{QAbstractEventDispatcher::TimerInfo::timerId}{timerId}, + \l{QAbstractEventDispatcher::TimerInfo::interval}{interval}, and + \l{QAbstractEventDispatcher::TimerInfo::timerType}{timerType}. \sa registeredTimers() */ +/*! \fn QAbstractEventDispatcher::TimerInfo::TimerInfo(int timerId, int interval, Qt::TimerType timerType) + + Constructs a TimerInfo struct with the given \a timerId, \a interval, and + \a timerType. +*/ +/*! + \variable QAbstractEventDispatcher::TimerInfo::timerId + + The timer's unique id. +*/ +/*! + \variable QAbstractEventDispatcher::TimerInfo::interval + + The timer's interval. +*/ +/*! + \variable QAbstractEventDispatcher::TimerInfo::timerType + + The timer's type + + \sa Qt::TimerType +*/ /*! \typedef QAbstractEventDispatcher::EventFilter -- cgit v1.2.3 From e5d549552614f89dd73b29fc3ee4710f65bb1e57 Mon Sep 17 00:00:00 2001 From: David Faure Date: Tue, 20 Mar 2012 18:01:20 +0100 Subject: Make QCoreApplication::applicationName() default to argv[0] This makes it more useful in all the Qt apps that don't set it, given that it's used internally by QTemporaryFile, QTemporaryDir, QStandardPaths, QDBus, QAccessibleApplication, etc. Qt4 compatibility in the deprecated QDesktopServices is preserved, no fallback there. Change-Id: I584463507cf917a3720793c6bd45d07c60f8356c Reviewed-by: Thiago Macieira --- src/corelib/kernel/qcoreapplication.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/corelib/kernel') diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 967ed447d5..3d09d858a3 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -1943,7 +1943,9 @@ QString QCoreApplication::organizationDomain() using the empty constructor. This saves having to repeat this information each time a QSettings object is created. - \sa organizationName organizationDomain applicationVersion + If not set, the application name defaults to the executable name (since 5.0). + + \sa organizationName organizationDomain applicationVersion applicationFilePath */ void QCoreApplication::setApplicationName(const QString &application) { @@ -1951,6 +1953,15 @@ void QCoreApplication::setApplicationName(const QString &application) } QString QCoreApplication::applicationName() +{ + QString appname = coreappdata()->application; + if (appname.isEmpty() && QCoreApplication::self) + appname = QCoreApplication::self->d_func()->appName(); + return appname; +} + +// Exported for QDesktopServices (Qt4 behavior compatibility) +Q_CORE_EXPORT QString qt_applicationName_noFallback() { return coreappdata()->application; } -- cgit v1.2.3 From 2ad8b637628335926d002a2409600d884858d225 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 31 Oct 2011 15:49:24 +0100 Subject: Fix warning introduced in Intel CC 12.1 Change-Id: Ie50b0bf0741637a3acfc39360804590f3c133332 Reviewed-by: Stephen Kelly Reviewed-by: Thiago Macieira --- src/corelib/kernel/qobjectdefs.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/corelib/kernel') diff --git a/src/corelib/kernel/qobjectdefs.h b/src/corelib/kernel/qobjectdefs.h index 4b3829b53e..5588724d4c 100644 --- a/src/corelib/kernel/qobjectdefs.h +++ b/src/corelib/kernel/qobjectdefs.h @@ -140,6 +140,13 @@ template inline void qYouForgotTheQ_OBJECT_Macro(T1, T2) {} #endif // QT_NO_QOBJECT_CHECK +#if defined(Q_CC_INTEL) +// Cannot redefine the visibility of a method in an exported class +# define Q_DECL_HIDDEN_STATIC_METACALL +#else +# define Q_DECL_HIDDEN_STATIC_METACALL Q_DECL_HIDDEN +#endif + /* tmake ignore Q_OBJECT */ #define Q_OBJECT \ public: \ @@ -151,7 +158,7 @@ public: \ virtual int qt_metacall(QMetaObject::Call, int, void **); \ private: \ Q_DECL_HIDDEN static const QMetaObjectExtraData staticMetaObjectExtraData; \ - Q_DECL_HIDDEN static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); + Q_DECL_HIDDEN_STATIC_METACALL static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); /* tmake ignore Q_OBJECT */ #define Q_OBJECT_FAKE Q_OBJECT -- cgit v1.2.3 From 3d72797df1a5b6860fd1149f94d23ae4439e97c6 Mon Sep 17 00:00:00 2001 From: Morten Sorvig Date: Wed, 28 Mar 2012 13:39:44 +0200 Subject: Fix "unused variable" warning in QVariant header. Change-Id: Ia70ee372e277b1f95b893c461820fe97f381b8b1 Reviewed-by: Thiago Macieira --- src/corelib/kernel/qvariant_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/corelib/kernel') diff --git a/src/corelib/kernel/qvariant_p.h b/src/corelib/kernel/qvariant_p.h index a754bc4363..36eb31110b 100644 --- a/src/corelib/kernel/qvariant_p.h +++ b/src/corelib/kernel/qvariant_p.h @@ -440,6 +440,7 @@ public: void delegate(const T*) { Filtered streamIt(m_debugStream, m_d); + Q_UNUSED(streamIt); } void delegate(const QMetaTypeSwitcher::NotBuiltinType*) -- cgit v1.2.3 From 1967c147373be39f3e9f38967044812ce13ad10e Mon Sep 17 00:00:00 2001 From: Laszlo Papp Date: Mon, 2 Apr 2012 22:20:17 +0300 Subject: Use the relevant "\since 5.0" entry (proposed to public since 5.0) Change-Id: I189166aeca8875401029128733401bf830d9ee71 Reviewed-by: Thiago Macieira --- src/corelib/kernel/qwineventnotifier.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/corelib/kernel') diff --git a/src/corelib/kernel/qwineventnotifier.cpp b/src/corelib/kernel/qwineventnotifier.cpp index 58ca046d9d..8af1ab2161 100644 --- a/src/corelib/kernel/qwineventnotifier.cpp +++ b/src/corelib/kernel/qwineventnotifier.cpp @@ -50,6 +50,7 @@ QT_BEGIN_NAMESPACE /*! \class QWinEventNotifier + \since 5.0 \brief The QWinEventNotifier class provides support for the Windows Wait functions. The QWinEventNotifier class makes it possible to use the wait -- cgit v1.2.3 From 7108acde8a2838261d6061e75f59c5ff58f37ad4 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 3 Apr 2012 09:43:05 +0200 Subject: Fix warnings about truncations in constants. Change-Id: I46872c5b2866454112092c1ec5efbfe15db5af33 Reviewed-by: Thiago Macieira --- src/corelib/kernel/qcoreapplication_win.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/kernel') diff --git a/src/corelib/kernel/qcoreapplication_win.cpp b/src/corelib/kernel/qcoreapplication_win.cpp index c1f7c8ab25..7cc1f0e286 100644 --- a/src/corelib/kernel/qcoreapplication_win.cpp +++ b/src/corelib/kernel/qcoreapplication_win.cpp @@ -109,7 +109,7 @@ Q_CORE_EXPORT QString qAppFileName() // get application file name size = MAX_PATH * i; b = reinterpret_cast(realloc(b, (size + 1) * sizeof(wchar_t))); if (b) - v = GetModuleFileName(NULL, b, size); + v = GetModuleFileName(NULL, b, DWORD(size)); } while (b && v == size); if (b) -- cgit v1.2.3 From acd79f7d6463b31507839fb63d7664df43443b93 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Mon, 2 Apr 2012 23:03:57 +1000 Subject: Remove/update Qt 5 to-do's that won't be done for Qt 5. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-23524 Change-Id: Iebf5b78dc2ff27310b5a484bae588862417f693c Reviewed-by: Jędrzej Nowacki Reviewed-by: João Abecasis Reviewed-by: Thiago Macieira --- src/corelib/kernel/qvariant.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/corelib/kernel') diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index e630b5bba8..d723355204 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -1554,7 +1554,6 @@ void QVariant::detach() \internal */ -// ### Qt 5: change typeName()(and froends= to return a QString. Suggestion from Harald. /*! Returns the name of the type stored in the variant. The returned strings describe the C++ datatype used to store the data: for -- cgit v1.2.3