summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-04-10 12:48:01 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-04-10 15:31:45 +0200
commit143c4d3e13a430b951f4f4f8c28db14303f80605 (patch)
tree2b89637b93fc7d81c674106008566010f986d67c /src/corelib/kernel
parenta7ed81b557d593a8ddb43b71bf4bbf3b44ead070 (diff)
parente5337ad1b1fb02873ce7b5ca8db45f6fd8063352 (diff)
Merge remote-tracking branch 'origin/master' into api_changes
Conflicts: configure src/widgets/styles/qwindowsxpstyle.cpp tests/auto/gui/kernel/qwindow/qwindow.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I624b6d26abce9874c610c04954c1c45bc074bef3
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qabstracteventdispatcher.cpp31
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp13
-rw-r--r--src/corelib/kernel/qcoreapplication_win.cpp2
-rw-r--r--src/corelib/kernel/qobjectdefs.h9
-rw-r--r--src/corelib/kernel/qvariant.cpp1
-rw-r--r--src/corelib/kernel/qvariant_p.h1
-rw-r--r--src/corelib/kernel/qwineventnotifier.cpp1
7 files changed, 50 insertions, 8 deletions
diff --git a/src/corelib/kernel/qabstracteventdispatcher.cpp b/src/corelib/kernel/qabstracteventdispatcher.cpp
index 9c025d6d6f..cf9b0cea4f 100644
--- a/src/corelib/kernel/qabstracteventdispatcher.cpp
+++ b/src/corelib/kernel/qabstracteventdispatcher.cpp
@@ -337,14 +337,37 @@ void QAbstractEventDispatcher::closingDown()
{ }
/*!
- \typedef QAbstractEventDispatcher::TimerInfo
+ \class QAbstractEventDispatcher::TimerInfo
- Typedef for QPair<int, int>. 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
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index c901bc142e..7b26a01cbf 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -1950,7 +1950,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)
{
@@ -1959,6 +1961,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;
}
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<wchar_t *>(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)
diff --git a/src/corelib/kernel/qobjectdefs.h b/src/corelib/kernel/qobjectdefs.h
index 4c98bad0f9..5ad070d3b1 100644
--- a/src/corelib/kernel/qobjectdefs.h
+++ b/src/corelib/kernel/qobjectdefs.h
@@ -141,6 +141,13 @@ template <typename T1, typename T2>
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: \
@@ -152,7 +159,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
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp
index da6017127f..c3f8422b28 100644
--- a/src/corelib/kernel/qvariant.cpp
+++ b/src/corelib/kernel/qvariant.cpp
@@ -1544,7 +1544,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
diff --git a/src/corelib/kernel/qvariant_p.h b/src/corelib/kernel/qvariant_p.h
index 2f5c4f54ee..6b778f3fb2 100644
--- a/src/corelib/kernel/qvariant_p.h
+++ b/src/corelib/kernel/qvariant_p.h
@@ -491,6 +491,7 @@ public:
void delegate(const T*)
{
Filtered<T> streamIt(m_debugStream, m_d);
+ Q_UNUSED(streamIt);
}
void delegate(const QMetaTypeSwitcher::NotBuiltinType*)
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