summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/doc/src/objectmodel/object.qdoc6
-rw-r--r--src/corelib/global/qcompilerdetection.h1
-rw-r--r--src/corelib/kernel/qobject.cpp4
-rw-r--r--src/corelib/kernel/qobjectdefs_impl.h4
-rw-r--r--src/corelib/mimetypes/qmimedatabase.cpp2
-rw-r--r--src/corelib/tools/qdatetime.cpp10
-rw-r--r--src/corelib/xml/qxmlstream.cpp2
-rw-r--r--src/corelib/xml/qxmlstream_p.h1
-rw-r--r--src/dbus/dbus.pro4
-rw-r--r--src/network/socket/qnativesocketengine.cpp10
-rw-r--r--src/platformsupport/linuxaccessibility/application.cpp14
-rw-r--r--src/platformsupport/linuxaccessibility/application_p.h3
-rw-r--r--src/platformsupport/themes/genericunix/qgenericunixthemes.cpp2
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm1
-rw-r--r--src/plugins/platforms/qnx/qqnxscreen.cpp7
-rw-r--r--src/plugins/platforms/qnx/qqnxwindow.cpp10
-rw-r--r--src/plugins/platforms/windows/qwindowsdialoghelpers.cpp9
-rw-r--r--src/plugins/platforms/windows/qwindowsmousehandler.h2
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp2
-rw-r--r--src/tools/qdoc/doc.cpp2
-rw-r--r--src/tools/qdoc/generator.cpp2
-rw-r--r--src/tools/qdoc/qdocdatabase.cpp16
-rw-r--r--src/tools/qdoc/qmlvisitor.cpp32
-rw-r--r--src/tools/qdoc/qmlvisitor.h5
-rw-r--r--src/widgets/doc/images/customcompleter-example.pngbin0 -> 11636 bytes
-rw-r--r--src/widgets/doc/images/customcompleter-insertcompletion.pngbin0 -> 1371 bytes
-rw-r--r--src/widgets/styles/qcommonstyle.cpp6
27 files changed, 111 insertions, 46 deletions
diff --git a/src/corelib/doc/src/objectmodel/object.qdoc b/src/corelib/doc/src/objectmodel/object.qdoc
index 281c1a30cb..1d33c14d0f 100644
--- a/src/corelib/doc/src/objectmodel/object.qdoc
+++ b/src/corelib/doc/src/objectmodel/object.qdoc
@@ -66,11 +66,7 @@
by Qt's own \l{moc}{Meta-Object Compiler (moc)}.
The meta-object system is a C++ extension that makes the language
- better suited to true component GUI programming. Although
- templates can be used to extend C++, the meta-object system
- provides benefits using standard C++ that cannot be achieved with
- templates; see \l{Why Doesn't Qt Use Templates for Signals and
- Slots?}
+ better suited to true component GUI programming.
\section1 Important Classes
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h
index 383d9c9c6e..e547d58c2e 100644
--- a/src/corelib/global/qcompilerdetection.h
+++ b/src/corelib/global/qcompilerdetection.h
@@ -870,6 +870,7 @@
const bool valueOfExpression = Expr;\
Q_ASSERT_X(valueOfExpression, "Q_ASSUME()", "Assumption in Q_ASSUME(\"" #Expr "\") was not correct");\
Q_ASSUME_IMPL(valueOfExpression);\
+ Q_UNUSED(valueOfExpression); /* the value may not be used if Q_ASSERT_X and Q_ASSUME_IMPL are noop */\
} while (0)
#endif // QCOMPILERDETECTION_H
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index e8c30d753e..c96fb446d6 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -4194,7 +4194,7 @@ void qDeleteInEventHandler(QObject *o)
connecting to a static function or a functor
\a slot a pointer only used when using Qt::UniqueConnection
\a type the Qt::ConnctionType passed as argument to connect
- \a types an array of integer with the metatype id of the parametter of the signal
+ \a types an array of integer with the metatype id of the parameter of the signal
to be used with queued connection
must stay valid at least for the whole time of the connection, this function
do not take ownership. typically static data.
@@ -4209,7 +4209,7 @@ QMetaObject::Connection QObject::connectImpl(const QObject *sender, void **signa
const int *types, const QMetaObject *senderMetaObject)
{
if (!sender || !signal || !slotObj || !senderMetaObject) {
- qWarning("QObject::connect: invalid null parametter");
+ qWarning("QObject::connect: invalid null parameter");
if (slotObj)
slotObj->destroyIfLastRef();
return QMetaObject::Connection();
diff --git a/src/corelib/kernel/qobjectdefs_impl.h b/src/corelib/kernel/qobjectdefs_impl.h
index 8d85175a17..959a255389 100644
--- a/src/corelib/kernel/qobjectdefs_impl.h
+++ b/src/corelib/kernel/qobjectdefs_impl.h
@@ -62,7 +62,7 @@ namespace QtPrivate {
/*
The following List classes are used to help to handle the list of arguments.
It follow the same principles as the lisp lists.
- List_Left<L,N> take a list and a number as a parametter and returns (via the Value typedef,
+ List_Left<L,N> take a list and a number as a parameter and returns (via the Value typedef,
the list composed of the first N element of the list
*/
#ifndef Q_COMPILER_VARIADIC_TEMPLATES
@@ -116,7 +116,7 @@ namespace QtPrivate {
- ArgumentCount is the number of argument, or -1 if it is unknown
- the Object typedef is the Object of a pointer to member function
- the Arguments typedef is the list of argument (in a QtPrivate::List)
- - the Function typedef is an alias to the template parametter Func
+ - the Function typedef is an alias to the template parameter Func
- the call<Args, R>(f,o,args) method is used to call that slot
Args is the list of argument of the signal
R is the return type of the signal
diff --git a/src/corelib/mimetypes/qmimedatabase.cpp b/src/corelib/mimetypes/qmimedatabase.cpp
index d8b7a02a1b..a5f5a326d4 100644
--- a/src/corelib/mimetypes/qmimedatabase.cpp
+++ b/src/corelib/mimetypes/qmimedatabase.cpp
@@ -418,7 +418,7 @@ QMimeType QMimeDatabase::mimeTypeForFile(const QString &fileName, MatchMode mode
} else {
// Implemented as a wrapper around mimeTypeForFile(QFileInfo), so no mutex.
QFileInfo fileInfo(fileName);
- return mimeTypeForFile(fileInfo);
+ return mimeTypeForFile(fileInfo, mode);
}
}
diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp
index 83db1c3cc9..31c870b012 100644
--- a/src/corelib/tools/qdatetime.cpp
+++ b/src/corelib/tools/qdatetime.cpp
@@ -4045,6 +4045,16 @@ static void localToUtc(QDate &date, QTime &time, int isdst)
_tzset();
#endif
time_t secsSince1Jan1970UTC = mktime(&localTM);
+#ifdef Q_OS_QNX
+ //mktime sometimes fails on QNX. Following workaround converts the date and time then manually
+ if (secsSince1Jan1970UTC == (time_t)-1) {
+ QDateTime tempTime = QDateTime(date, time, Qt::UTC);;
+ tempTime = tempTime.addMSecs(timezone * 1000);
+ date = tempTime.date();
+ time = tempTime.time();
+ return;
+ }
+#endif
#endif
tm *brokenDown = 0;
#if defined(Q_OS_WINCE)
diff --git a/src/corelib/xml/qxmlstream.cpp b/src/corelib/xml/qxmlstream.cpp
index 4be4593e95..372b1d91fe 100644
--- a/src/corelib/xml/qxmlstream.cpp
+++ b/src/corelib/xml/qxmlstream.cpp
@@ -784,6 +784,7 @@ QXmlStreamPrivateTagStack::QXmlStreamPrivateTagStack()
NamespaceDeclaration &namespaceDeclaration = namespaceDeclarations.push();
namespaceDeclaration.prefix = addToStringStorage(QLatin1String("xml"));
namespaceDeclaration.namespaceUri = addToStringStorage(QLatin1String("http://www.w3.org/XML/1998/namespace"));
+ initialTagStackStringStorageSize = tagStackStringStorageSize;
}
#ifndef QT_NO_XMLSTREAMREADER
@@ -854,6 +855,7 @@ void QXmlStreamReaderPrivate::init()
rawReadBuffer.clear();
dataBuffer.clear();
readBuffer.clear();
+ tagStackStringStorageSize = initialTagStackStringStorageSize;
type = QXmlStreamReader::NoToken;
error = QXmlStreamReader::NoError;
diff --git a/src/corelib/xml/qxmlstream_p.h b/src/corelib/xml/qxmlstream_p.h
index 68b7ff7af3..448764ab58 100644
--- a/src/corelib/xml/qxmlstream_p.h
+++ b/src/corelib/xml/qxmlstream_p.h
@@ -697,6 +697,7 @@ public:
QXmlStreamSimpleStack<NamespaceDeclaration> namespaceDeclarations;
QString tagStackStringStorage;
int tagStackStringStorageSize;
+ int initialTagStackStringStorageSize;
bool tagsDone;
inline QStringRef addToStringStorage(const QStringRef &s) {
diff --git a/src/dbus/dbus.pro b/src/dbus/dbus.pro
index 5ad77ddf95..2e4119ba93 100644
--- a/src/dbus/dbus.pro
+++ b/src/dbus/dbus.pro
@@ -6,6 +6,8 @@ MODULE_CONFIG = dbusadaptors dbusinterfaces
!isEmpty(DBUS_PATH) {
INCLUDEPATH += $$DBUS_PATH/include
QMAKE_LIBDIR += $$DBUS_PATH/lib
+ win32:CONFIG(debug, debug|release):QT_LIBS_DBUS += -ldbus-1d
+ else:QT_LIBS_DBUS += -ldbus-1
}
DEFINES += DBUS_API_SUBJECT_TO_CHANGE
@@ -21,8 +23,6 @@ win32 {
-ladvapi32 \
-lnetapi32 \
-luser32
- CONFIG(debug, debug|release):LIBS_PRIVATE += -ldbus-1d
- else:LIBS_PRIVATE += -ldbus-1
}
QMAKE_DOCS = $$PWD/doc/qtdbus.qdocconf
diff --git a/src/network/socket/qnativesocketengine.cpp b/src/network/socket/qnativesocketengine.cpp
index 6dbc25db4c..02f78aeaed 100644
--- a/src/network/socket/qnativesocketengine.cpp
+++ b/src/network/socket/qnativesocketengine.cpp
@@ -623,8 +623,8 @@ int QNativeSocketEngine::accept()
{
Q_D(QNativeSocketEngine);
Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::accept(), -1);
- Q_CHECK_STATE(QNativeSocketEngine::accept(), QAbstractSocket::ListeningState, false);
- Q_CHECK_TYPE(QNativeSocketEngine::accept(), QAbstractSocket::TcpSocket, false);
+ Q_CHECK_STATE(QNativeSocketEngine::accept(), QAbstractSocket::ListeningState, -1);
+ Q_CHECK_TYPE(QNativeSocketEngine::accept(), QAbstractSocket::TcpSocket, -1);
return d->nativeAccept();
}
@@ -702,7 +702,7 @@ qint64 QNativeSocketEngine::bytesAvailable() const
{
Q_D(const QNativeSocketEngine);
Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::bytesAvailable(), -1);
- Q_CHECK_NOT_STATE(QNativeSocketEngine::bytesAvailable(), QAbstractSocket::UnconnectedState, false);
+ Q_CHECK_NOT_STATE(QNativeSocketEngine::bytesAvailable(), QAbstractSocket::UnconnectedState, -1);
return d->nativeBytesAvailable();
}
@@ -732,7 +732,7 @@ qint64 QNativeSocketEngine::pendingDatagramSize() const
{
Q_D(const QNativeSocketEngine);
Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::pendingDatagramSize(), -1);
- Q_CHECK_TYPE(QNativeSocketEngine::pendingDatagramSize(), QAbstractSocket::UdpSocket, false);
+ Q_CHECK_TYPE(QNativeSocketEngine::pendingDatagramSize(), QAbstractSocket::UdpSocket, -1);
return d->nativePendingDatagramSize();
}
@@ -757,7 +757,7 @@ qint64 QNativeSocketEngine::readDatagram(char *data, qint64 maxSize, QHostAddres
{
Q_D(QNativeSocketEngine);
Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::readDatagram(), -1);
- Q_CHECK_TYPE(QNativeSocketEngine::readDatagram(), QAbstractSocket::UdpSocket, false);
+ Q_CHECK_TYPE(QNativeSocketEngine::readDatagram(), QAbstractSocket::UdpSocket, -1);
return d->nativeReceiveDatagram(data, maxSize, address, port);
}
diff --git a/src/platformsupport/linuxaccessibility/application.cpp b/src/platformsupport/linuxaccessibility/application.cpp
index 6e826e4432..5c8f2e5fe2 100644
--- a/src/platformsupport/linuxaccessibility/application.cpp
+++ b/src/platformsupport/linuxaccessibility/application.cpp
@@ -174,7 +174,7 @@ bool QSpiApplicationAdaptor::eventFilter(QObject *target, QEvent *event)
SLOT(notifyKeyboardListenerError(QDBusError, QDBusMessage)), timeout);
if (sent) {
//queue the event and send it after callback
- keyEvents.enqueue(QPair<QObject*, QKeyEvent*> (target, copyKeyEvent(keyEvent)));
+ keyEvents.enqueue(QPair<QPointer<QObject>, QKeyEvent*> (QPointer<QObject>(target), copyKeyEvent(keyEvent)));
#ifdef KEYBOARD_DEBUG
qDebug() << QStringLiteral("Sent key: ") << de.text;
#endif
@@ -200,11 +200,12 @@ void QSpiApplicationAdaptor::notifyKeyboardListenerCallback(const QDBusMessage&
}
Q_ASSERT(message.arguments().length() == 1);
if (message.arguments().at(0).toBool() == true) {
- QPair<QObject*, QKeyEvent*> event = keyEvents.dequeue();
+ QPair<QPointer<QObject>, QKeyEvent*> event = keyEvents.dequeue();
delete event.second;
} else {
- QPair<QObject*, QKeyEvent*> event = keyEvents.dequeue();
- QCoreApplication::postEvent(event.first, event.second);
+ QPair<QPointer<QObject>, QKeyEvent*> event = keyEvents.dequeue();
+ if (event.first)
+ QCoreApplication::postEvent(event.first.data(), event.second);
}
}
@@ -212,8 +213,9 @@ void QSpiApplicationAdaptor::notifyKeyboardListenerError(const QDBusError& error
{
qWarning() << QStringLiteral("QSpiApplication::keyEventError ") << error.name() << error.message();
while (!keyEvents.isEmpty()) {
- QPair<QObject*, QKeyEvent*> event = keyEvents.dequeue();
- QCoreApplication::postEvent(event.first, event.second);
+ QPair<QPointer<QObject>, QKeyEvent*> event = keyEvents.dequeue();
+ if (event.first)
+ QCoreApplication::postEvent(event.first.data(), event.second);
}
}
diff --git a/src/platformsupport/linuxaccessibility/application_p.h b/src/platformsupport/linuxaccessibility/application_p.h
index 5efd7089ea..e8684ab2b5 100644
--- a/src/platformsupport/linuxaccessibility/application_p.h
+++ b/src/platformsupport/linuxaccessibility/application_p.h
@@ -42,6 +42,7 @@
#ifndef Q_SPI_APPLICATION_H
#define Q_SPI_APPLICATION_H
+#include <QtCore/QPointer>
#include <QtCore/QQueue>
#include <QtDBus/QDBusConnection>
#include <QtGui/QAccessibleInterface>
@@ -75,7 +76,7 @@ private Q_SLOTS:
private:
static QKeyEvent* copyKeyEvent(QKeyEvent*);
- QQueue<QPair<QObject*, QKeyEvent*> > keyEvents;
+ QQueue<QPair<QPointer<QObject>, QKeyEvent*> > keyEvents;
QDBusConnection dbusConnection;
};
diff --git a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
index 0d90e5d693..6ea68397b6 100644
--- a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
+++ b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
@@ -380,7 +380,7 @@ QVariant QGnomeTheme::themeHint(QPlatformTheme::ThemeHint hint) const
return QVariant(QGenericUnixTheme::xdgIconThemePaths());
case QPlatformTheme::StyleNames: {
QStringList styleNames;
- styleNames << QStringLiteral("GTK+") << QStringLiteral("cleanlooks") << QStringLiteral("windows");
+ styleNames << QStringLiteral("GTK+") << QStringLiteral("fusion") << QStringLiteral("windows");
return QVariant(styleNames);
}
case QPlatformTheme::KeyboardScheme:
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index 4c58c22644..500eea6f4b 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -777,7 +777,6 @@ void QCocoaWindow::setNSWindow(NSWindow *window)
{
m_nsWindowDelegate = [[QNSWindowDelegate alloc] initWithQCocoaWindow:this];
[window setDelegate:m_nsWindowDelegate];
- [window setAcceptsMouseMovedEvents:YES];
// Prevent Cocoa from releasing the window on close. Qt
// handles the close event asynchronously and we want to
diff --git a/src/plugins/platforms/qnx/qqnxscreen.cpp b/src/plugins/platforms/qnx/qqnxscreen.cpp
index bd60c6b71d..3e79ca7f1d 100644
--- a/src/plugins/platforms/qnx/qqnxscreen.cpp
+++ b/src/plugins/platforms/qnx/qqnxscreen.cpp
@@ -151,6 +151,8 @@ QQnxScreen::QQnxScreen(screen_context_t screenContext, screen_display_t display,
QQnxScreen::~QQnxScreen()
{
qScreenDebug() << Q_FUNC_INFO;
+ Q_FOREACH (QQnxWindow *childWindow, m_childWindows)
+ childWindow->setScreen(0);
delete m_cursor;
}
@@ -501,6 +503,11 @@ QPlatformCursor * QQnxScreen::cursor() const
return m_cursor;
}
+QPlatformCursor * QQnxScreen::cursor() const
+{
+ return m_cursor;
+}
+
void QQnxScreen::keyboardHeightChanged(int height)
{
if (height == m_keyboardHeight)
diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp
index 43e24034c9..cabbd405e5 100644
--- a/src/plugins/platforms/qnx/qqnxwindow.cpp
+++ b/src/plugins/platforms/qnx/qqnxwindow.cpp
@@ -156,7 +156,8 @@ QQnxWindow::~QQnxWindow()
// Remove from parent's Hierarchy.
removeFromParent();
- m_screen->updateHierarchy();
+ if (m_screen)
+ m_screen->updateHierarchy();
// Cleanup QNX window and its buffers
screen_destroy_window(m_window);
@@ -497,6 +498,11 @@ void QQnxWindow::setScreen(QQnxScreen *platformScreen)
{
qWindowDebug() << Q_FUNC_INFO << "window =" << window() << "platformScreen =" << platformScreen;
+ if (platformScreen == 0) { // The screen has been destroyed
+ m_screen = 0;
+ return;
+ }
+
if (m_screen == platformScreen)
return;
@@ -539,7 +545,7 @@ void QQnxWindow::removeFromParent()
m_parentWindow = 0;
else
qFatal("QQnxWindow: Window Hierarchy broken; window has parent, but parent hasn't got child.");
- } else {
+ } else if (m_screen) {
m_screen->removeWindow(this);
}
}
diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
index 869e94b566..14bc26f770 100644
--- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
+++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
@@ -1495,8 +1495,9 @@ QWindowsNativeDialogBase *QWindowsFileDialogHelper::createNativeDialog()
// Apply settings.
const QSharedPointer<QFileDialogOptions> &opts = options();
m_data.fromOptions(opts);
+ const QFileDialogOptions::FileMode mode = opts->fileMode();
result->setWindowTitle(opts->windowTitle());
- result->setMode(opts->fileMode(), opts->options());
+ result->setMode(mode, opts->options());
result->setHideFiltersDetails(opts->testOption(QFileDialogOptions::HideNameFilterDetails));
const QStringList nameFilters = opts->nameFilters();
if (!nameFilters.isEmpty())
@@ -1513,6 +1514,12 @@ QWindowsNativeDialogBase *QWindowsFileDialogHelper::createNativeDialog()
if (!info.isDir())
result->selectFile(info.fileName());
}
+ // No need to select initialNameFilter if mode is Dir
+ if (mode != QFileDialogOptions::Directory && mode != QFileDialogOptions::DirectoryOnly) {
+ const QString initialNameFilter = opts->initiallySelectedNameFilter();
+ if (!initialNameFilter.isEmpty())
+ result->selectNameFilter(initialNameFilter);
+ }
const QString defaultSuffix = opts->defaultSuffix();
if (!defaultSuffix.isEmpty())
result->setDefaultSuffix(defaultSuffix);
diff --git a/src/plugins/platforms/windows/qwindowsmousehandler.h b/src/plugins/platforms/windows/qwindowsmousehandler.h
index b3bfa03380..caf30e6b1a 100644
--- a/src/plugins/platforms/windows/qwindowsmousehandler.h
+++ b/src/plugins/platforms/windows/qwindowsmousehandler.h
@@ -109,6 +109,8 @@ Qt::KeyboardModifiers QWindowsMouseHandler::keyStateToModifiers(int wParam)
mods |= Qt::ControlModifier;
if (wParam & MK_SHIFT)
mods |= Qt::ShiftModifier;
+ if (GetKeyState(VK_MENU) < 0)
+ mods |= Qt::AltModifier;
return mods;
}
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index bb0092cd54..2d0f537477 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -257,6 +257,8 @@ static void setWindowOpacity(HWND hwnd, Qt::WindowFlags flags, bool hasAlpha, qr
} else {
QWindowsContext::user32dll.setLayeredWindowAttributes(hwnd, 0, (int)(level * 255), LWA_ALPHA);
}
+ } else if (IsWindowVisible(hwnd)) { // Repaint when switching from layered.
+ InvalidateRect(hwnd, NULL, TRUE);
}
#endif // !Q_OS_WINCE
}
diff --git a/src/tools/qdoc/doc.cpp b/src/tools/qdoc/doc.cpp
index a0a2e51198..e20e85028f 100644
--- a/src/tools/qdoc/doc.cpp
+++ b/src/tools/qdoc/doc.cpp
@@ -3291,7 +3291,7 @@ QString Doc::canonicalTitle(const QString &title)
for (int i = 0; i != title.size(); ++i) {
uint c = title.at(i).unicode();
if (c >= 'A' && c <= 'Z')
- c -= 'A' - 'a';
+ c += 'a' - 'A';
bool alnum = (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9');
if (alnum) {
result += QLatin1Char(c);
diff --git a/src/tools/qdoc/generator.cpp b/src/tools/qdoc/generator.cpp
index 95ba6d28bf..47ebded1b1 100644
--- a/src/tools/qdoc/generator.cpp
+++ b/src/tools/qdoc/generator.cpp
@@ -360,7 +360,7 @@ QString Generator::fileBase(const Node *node) const
QChar c = base.at(i);
uint u = c.unicode();
if (u >= 'A' && u <= 'Z')
- u -= 'A' - 'a';
+ u += 'a' - 'A';
if ((u >= 'a' && u <= 'z') || (u >= '0' && u <= '9')) {
res += QLatin1Char(u);
begun = true;
diff --git a/src/tools/qdoc/qdocdatabase.cpp b/src/tools/qdoc/qdocdatabase.cpp
index 58c674de7a..191da5caf8 100644
--- a/src/tools/qdoc/qdocdatabase.cpp
+++ b/src/tools/qdoc/qdocdatabase.cpp
@@ -291,29 +291,29 @@ DocNode* QDocDatabase::addToModule(const QString& name, Node* node)
*/
DocNode* QDocDatabase::addToQmlModule(const QString& name, Node* node)
{
- QString longQmid, shortQmid;
+ QStringList qmid;
QStringList dotSplit;
QStringList blankSplit = name.split(QLatin1Char(' '));
+ qmid.append(blankSplit[0]);
if (blankSplit.size() > 1) {
- longQmid = blankSplit[0] + blankSplit[1];
+ qmid.append(blankSplit[0] + blankSplit[1]);
dotSplit = blankSplit[1].split(QLatin1Char('.'));
- shortQmid = blankSplit[0] + dotSplit[0];
+ qmid.append(blankSplit[0] + dotSplit[0]);
}
DocNode* dn = findQmlModule(name);
dn->addMember(node);
node->setQmlModuleInfo(name);
if (node->subType() == Node::QmlClass) {
QmlClassNode* n = static_cast<QmlClassNode*>(node);
- QString key = longQmid + "::" + node->name();
- for (int i=0; i<2; ++i) {
+ for (int i=0; i<qmid.size(); ++i) {
+ QString key = qmid[i] + "::" + node->name();
if (!qmlTypeMap_.contains(key))
qmlTypeMap_.insert(key,n);
if (!masterMap_.contains(key))
masterMap_.insert(key,node);
- if (!masterMap_.contains(node->name(),node))
- masterMap_.insert(node->name(),node);
- key = shortQmid + "::" + node->name();
}
+ if (!masterMap_.contains(node->name(),node))
+ masterMap_.insert(node->name(),node);
}
return dn;
}
diff --git a/src/tools/qdoc/qmlvisitor.cpp b/src/tools/qdoc/qmlvisitor.cpp
index 8b6f81de3e..058ab9a725 100644
--- a/src/tools/qdoc/qmlvisitor.cpp
+++ b/src/tools/qdoc/qmlvisitor.cpp
@@ -424,8 +424,9 @@ bool QmlDocVisitor::visit(QQmlJS::AST::UiObjectDefinition *definition)
*/
void QmlDocVisitor::endVisit(QQmlJS::AST::UiObjectDefinition *definition)
{
- if (nestingLevel > 0)
+ if (nestingLevel > 0) {
--nestingLevel;
+ }
lastEndOffset = definition->lastSourceLocation().end();
}
@@ -461,6 +462,26 @@ void QmlDocVisitor::endVisit(QQmlJS::AST::UiImportList *definition)
lastEndOffset = definition->lastSourceLocation().end();
}
+bool QmlDocVisitor::visit(QQmlJS::AST::UiObjectBinding *)
+{
+ ++nestingLevel;
+ return true;
+}
+
+void QmlDocVisitor::endVisit(QQmlJS::AST::UiObjectBinding *)
+{
+ --nestingLevel;
+}
+
+bool QmlDocVisitor::visit(QQmlJS::AST::UiArrayBinding *)
+{
+ return true;
+}
+
+void QmlDocVisitor::endVisit(QQmlJS::AST::UiArrayBinding *)
+{
+}
+
/*!
Visits the public \a member declaration, which can be a
signal or a property. It is a custom signal or property.
@@ -468,8 +489,9 @@ void QmlDocVisitor::endVisit(QQmlJS::AST::UiImportList *definition)
*/
bool QmlDocVisitor::visit(QQmlJS::AST::UiPublicMember *member)
{
- if (nestingLevel > 1)
+ if (nestingLevel > 1) {
return true;
+ }
switch (member->type) {
case QQmlJS::AST::UiPublicMember::Signal:
{
@@ -535,8 +557,9 @@ bool QmlDocVisitor::visit(QQmlJS::AST::IdentifierPropertyName *)
*/
bool QmlDocVisitor::visit(QQmlJS::AST::FunctionDeclaration* fd)
{
- if (nestingLevel > 1)
+ if (nestingLevel > 1) {
return true;
+ }
if (current->type() == Node::Document) {
QmlClassNode* qmlClass = static_cast<QmlClassNode*>(current);
if (qmlClass) {
@@ -581,8 +604,9 @@ void QmlDocVisitor::endVisit(QQmlJS::AST::FunctionDeclaration* fd)
*/
bool QmlDocVisitor::visit(QQmlJS::AST::UiScriptBinding* sb)
{
- if (nestingLevel > 1)
+ if (nestingLevel > 1) {
return true;
+ }
if (current->type() == Node::Document) {
QString handler = sb->qualifiedId->name.toString();
if (handler.length() > 2 && handler.startsWith("on") && handler.at(2).isUpper()) {
diff --git a/src/tools/qdoc/qmlvisitor.h b/src/tools/qdoc/qmlvisitor.h
index bfec61eb34..cc00ccbe6c 100644
--- a/src/tools/qdoc/qmlvisitor.h
+++ b/src/tools/qdoc/qmlvisitor.h
@@ -85,6 +85,11 @@ public:
bool visit(QQmlJS::AST::UiPublicMember *member);
void endVisit(QQmlJS::AST::UiPublicMember *definition);
+ virtual bool visit(QQmlJS::AST::UiObjectBinding *);
+ virtual void endVisit(QQmlJS::AST::UiObjectBinding *);
+ virtual void endVisit(QQmlJS::AST::UiArrayBinding *);
+ virtual bool visit(QQmlJS::AST::UiArrayBinding *);
+
bool visit(QQmlJS::AST::IdentifierPropertyName *idproperty);
bool visit(QQmlJS::AST::FunctionDeclaration *);
diff --git a/src/widgets/doc/images/customcompleter-example.png b/src/widgets/doc/images/customcompleter-example.png
new file mode 100644
index 0000000000..a525208118
--- /dev/null
+++ b/src/widgets/doc/images/customcompleter-example.png
Binary files differ
diff --git a/src/widgets/doc/images/customcompleter-insertcompletion.png b/src/widgets/doc/images/customcompleter-insertcompletion.png
new file mode 100644
index 0000000000..0bb2c25c39
--- /dev/null
+++ b/src/widgets/doc/images/customcompleter-insertcompletion.png
Binary files differ
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index 52c733b8ec..64eb76dbb4 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -2265,11 +2265,11 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
case QFrame::VLine: {
QPoint p1, p2;
if (frameShape == QFrame::HLine) {
- p1 = QPoint(opt->rect.x(), opt->rect.height() / 2);
+ p1 = QPoint(opt->rect.x(), opt->rect.y() + opt->rect.height() / 2);
p2 = QPoint(opt->rect.x() + opt->rect.width(), p1.y());
} else {
- p1 = QPoint(opt->rect.x()+opt->rect.width() / 2, 0);
- p2 = QPoint(p1.x(), opt->rect.height());
+ p1 = QPoint(opt->rect.x() + opt->rect.width() / 2, opt->rect.y());
+ p2 = QPoint(p1.x(), p1.y() + opt->rect.height());
}
if (frameShadow == QFrame::Plain) {
QPen oldPen = p->pen();