diff options
506 files changed, 6490 insertions, 3344 deletions
@@ -1,14 +1,14 @@ INSTALLING Qt Source Package Version %VERSION%. For full installation instructions for each supported platform, please -see http://qt.nokia.com/doc/%VERSION%/installation.html, the file +see http://qt.nokia.com/doc/%SHORTVERSION%/installation.html, the file doc/html/installation.html in this package, or follow one of the following links: -Embedded Linux: http://qt.nokia.com/doc/%VERSION%/qt-embedded-install.html -Mac OS X: http://qt.nokia.com/doc/%VERSION%/install-mac.html -Windows: http://qt.nokia.com/doc/%VERSION%/install-win.html -Windows CE: http://qt.nokia.com/doc/%VERSION%/install-wince.html -X11 Platforms: http://qt.nokia.com/doc/%VERSION%/install-x11.html -Symbian Platform: http://qt.nokia.com/doc/%VERSION%/install-symbian.html +Embedded Linux: http://qt.nokia.com/doc/%SHORTVERSION%/qt-embedded-install.html +Mac OS X: http://qt.nokia.com/doc/%SHORTVERSION%/install-mac.html +Windows: http://qt.nokia.com/doc/%SHORTVERSION%/install-win.html +Windows CE: http://qt.nokia.com/doc/%SHORTVERSION%/install-wince.html +X11 Platforms: http://qt.nokia.com/doc/%SHORTVERSION%/install-x11.html +Symbian Platform: http://qt.nokia.com/doc/%SHORTVERSION%/install-symbian.html @@ -226,6 +226,7 @@ COMMERCIAL_USER=ask CFG_DEV=no CFG_NOKIA=no CFG_EMBEDDED=no +CFG_RTOS_ENABLED=yes EditionString=Commercial earlyArgParse() @@ -404,7 +405,7 @@ elif [ $COMMERCIAL_USER = "yes" ]; then exit 1 fi ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1` - PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d - | cut -b 1` + PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -` LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -` LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1` @@ -448,65 +449,46 @@ elif [ $COMMERCIAL_USER = "yes" ]; then # verify that we are licensed to use Qt on this platform LICENSE_EXTENSION= - if [ "$PlatformCode" = "X" ]; then - # Qt All-OS - LICENSE_EXTENSION="-ALLOS" - elif [ "$PLATFORM_QWS" = "yes" ]; then - case $PlatformCode in - 2|4|8|A|B|E|G|J|K|P|Q|S|U|V|W) + case "$PlatformCode" in + *L) + CFG_RTOS_ENABLED=yes + PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'` + ;; + *) + CFG_RTOS_ENABLED=no + PlatformCode=`echo "$PlatformCode" | sed 's/.$//'` + ;; + esac + case "$PlatformCode,$PLATFORM_MAC,$PLATFORM_QWS" in + X9,* | XC,* | XU,* | XW,* | XM,*) + # Qt All-OS + LICENSE_EXTENSION="-ALLOS" + ;; + 8M,* | KM,* | S9,* | SC,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*) # Qt for Embedded Linux LICENSE_EXTENSION="-EMBEDDED" ;; - *) - echo - echo "You are not licensed for Qt for Embedded Linux." - echo - echo "Please contact qt-info@nokia.com to upgrade your license" - echo "to include Qt for Embedded Linux, or install the" - echo "Qt Open Source Edition if you intend to develop free software." - exit 1 + 6M,*,no | N7,*,no | N9,*,no | NX,*,no) + # Embedded no-deploy + LICENSE_EXTENSION="-EMBEDDED" ;; - esac - elif [ "$PLATFORM_MAC" = "yes" ]; then - case $PlatformCode in - 2|4|5|7|9|B|C|E|F|G|L|M|U|W|Y) - # Qt/Mac + FM,*,no | LM,yes,* | ZM,no,no) + # Desktop LICENSE_EXTENSION="-DESKTOP" ;; - 3|6|8|A|D|H|J|K|P|Q|S|V) - # Embedded no-deploy - LICENSE_EXTENSION="-EMBEDDED" - ;; *) + Platform=Linux/X11 + [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X' + [ "$PLATFORM_QWS" = "yes" ] && Platform='Embedded Linux' echo - echo "You are not licensed for the Qt/Mac platform." + echo "You are not licensed for the $Platform platform." echo - echo "Please contact qt-info@nokia.com to upgrade your license" - echo "to include the Qt/Mac platform." + echo "Please contact qt-info@nokia.com to upgrade your license to" + echo "include the $Platform platform, or install the Qt Open Source Edition" + echo "if you intend to develop free software." exit 1 ;; - esac - else - case $PlatformCode in - 2|3|4|5|7|D|E|F|J|M|Q|S|T|V|Z) - # Qt/X11 - LICENSE_EXTENSION="-DESKTOP" - ;; - 6|8|9|A|B|C|G|H|K|P|U|W) - # Embedded no-deploy - LICENSE_EXTENSION="-EMBEDDED" - ;; - *) - echo - echo "You are not licensed for the Qt/X11 platform." - echo - echo "Please contact qt-info@nokia.com to upgrade your license to" - echo "include the Qt/X11 platform, or install the Qt Open Source Edition" - echo "if you intend to develop free software." - exit 1 - ;; - esac - fi + esac if test -r "$relpath/.LICENSE"; then # Generic, non-final license @@ -533,7 +515,7 @@ elif [ $COMMERCIAL_USER = "yes" ]; then fi case "$LicenseFeatureCode" in - G|L) + B|G|L|Y) # US case "$LicenseType" in Commercial) @@ -544,7 +526,7 @@ elif [ $COMMERCIAL_USER = "yes" ]; then ;; esac ;; - 2|5) + 2|4|5|F) # non-US case "$LicenseType" in Commercial) @@ -561,6 +543,14 @@ elif [ $COMMERCIAL_USER = "yes" ]; then exit 1 ;; esac + case "$LicenseFeatureCode" in + 4|B|F|Y) + CFG_RTOS_ENABLED=yes + ;; + 2|5|G|L) + CFG_RTOS_ENABLED=no + ;; + esac if [ '!' -f "$outpath/LICENSE" ]; then echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with" echo "this software has disappeared." @@ -2629,6 +2619,20 @@ if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" fi fi +if [ "$CFG_RTOS_ENABLED" = "no" ]; then + case `basename "$XPLATFORM"` in + qnx-* | vxworks-*) + echo "" + echo "You are not licensed for Qt for `basename $XPLATFORM`." + echo "" + echo "Please contact qt-info@nokia.com to upgrade your license to" + echo "include this platform, or install the Qt Open Source Edition" + echo "if you intend to develop free software." + exit 1 + ;; + esac +fi + if [ -z "${CFG_HOST_ARCH}" ]; then case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in IRIX*:*:*) @@ -3883,10 +3887,10 @@ fi # Help if [ "$PLATFORM_QWS" = "yes" ]; then Platform="Qt for Embedded Linux" elif [ "$PLATFORM_MAC" = "yes" ]; then - Platform="Qt/Mac" + Platform="Qt for Mac OS X" else PLATFORM_X11=yes - Platform="Qt/X11" + Platform="Qt for Linux/X11" fi echo diff --git a/configure.exe b/configure.exe Binary files differindex 77c7863e91..351ed040b7 100755 --- a/configure.exe +++ b/configure.exe diff --git a/demos/affine/xform.cpp b/demos/affine/xform.cpp index 8c4839fe61..60bb3b1b4f 100644 --- a/demos/affine/xform.cpp +++ b/demos/affine/xform.cpp @@ -68,8 +68,8 @@ XFormView::XFormView(QWidget *parent) pts->setBoundingRect(QRectF(0, 0, 500, 500)); ctrlPoints << QPointF(250, 250) << QPointF(350, 250); pts->setPoints(ctrlPoints); - connect(pts, SIGNAL(pointsChanged(const QPolygonF&)), - this, SLOT(updateCtrlPoints(const QPolygonF &))); + connect(pts, SIGNAL(pointsChanged(QPolygonF)), + this, SLOT(updateCtrlPoints(QPolygonF))); setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); } diff --git a/demos/boxes/scene.cpp b/demos/boxes/scene.cpp index 06dc0f9aab..452f4eff0f 100644 --- a/demos/boxes/scene.cpp +++ b/demos/boxes/scene.cpp @@ -345,7 +345,7 @@ RenderOptionsDialog::RenderOptionsDialog() ColorEdit *colorEdit = new ColorEdit(it->toUInt(&ok, 16), m_parameterNames.size() - 1); m_parameterEdits << colorEdit; layout->addWidget(colorEdit); - connect(colorEdit, SIGNAL(colorChanged(QRgb, int)), this, SLOT(setColorParameter(QRgb, int))); + connect(colorEdit, SIGNAL(colorChanged(QRgb,int)), this, SLOT(setColorParameter(QRgb,int))); ++row; } else if (type == "float") { layout->addWidget(new QLabel(m_parameterNames.back())); @@ -353,7 +353,7 @@ RenderOptionsDialog::RenderOptionsDialog() FloatEdit *floatEdit = new FloatEdit(it->toFloat(&ok), m_parameterNames.size() - 1); m_parameterEdits << floatEdit; layout->addWidget(floatEdit); - connect(floatEdit, SIGNAL(valueChanged(float, int)), this, SLOT(setFloatParameter(float, int))); + connect(floatEdit, SIGNAL(valueChanged(float,int)), this, SLOT(setFloatParameter(float,int))); ++row; } } @@ -496,8 +496,8 @@ Scene::Scene(int width, int height, int maxTextureSize) m_renderOptions->resize(m_renderOptions->sizeHint()); connect(m_renderOptions, SIGNAL(dynamicCubemapToggled(int)), this, SLOT(toggleDynamicCubemap(int))); - connect(m_renderOptions, SIGNAL(colorParameterChanged(const QString &, QRgb)), this, SLOT(setColorParameter(const QString &, QRgb))); - connect(m_renderOptions, SIGNAL(floatParameterChanged(const QString &, float)), this, SLOT(setFloatParameter(const QString &, float))); + connect(m_renderOptions, SIGNAL(colorParameterChanged(QString,QRgb)), this, SLOT(setColorParameter(QString,QRgb))); + connect(m_renderOptions, SIGNAL(floatParameterChanged(QString,float)), this, SLOT(setFloatParameter(QString,float))); connect(m_renderOptions, SIGNAL(textureChanged(int)), this, SLOT(setTexture(int))); connect(m_renderOptions, SIGNAL(shaderChanged(int)), this, SLOT(setShader(int))); diff --git a/demos/browser/bookmarks.cpp b/demos/browser/bookmarks.cpp index edafb76b95..87e362c0f6 100644 --- a/demos/browser/bookmarks.cpp +++ b/demos/browser/bookmarks.cpp @@ -72,11 +72,11 @@ BookmarksManager::BookmarksManager(QObject *parent) , m_bookmarkRootNode(0) , m_bookmarkModel(0) { - connect(this, SIGNAL(entryAdded(BookmarkNode *)), + connect(this, SIGNAL(entryAdded(BookmarkNode*)), m_saveTimer, SLOT(changeOccurred())); - connect(this, SIGNAL(entryRemoved(BookmarkNode *, int, BookmarkNode *)), + connect(this, SIGNAL(entryRemoved(BookmarkNode*,int,BookmarkNode*)), m_saveTimer, SLOT(changeOccurred())); - connect(this, SIGNAL(entryChanged(BookmarkNode *)), + connect(this, SIGNAL(entryChanged(BookmarkNode*)), m_saveTimer, SLOT(changeOccurred())); } @@ -362,12 +362,12 @@ BookmarksModel::BookmarksModel(BookmarksManager *bookmarkManager, QObject *paren , m_endMacro(false) , m_bookmarksManager(bookmarkManager) { - connect(bookmarkManager, SIGNAL(entryAdded(BookmarkNode *)), - this, SLOT(entryAdded(BookmarkNode *))); - connect(bookmarkManager, SIGNAL(entryRemoved(BookmarkNode *, int, BookmarkNode *)), - this, SLOT(entryRemoved(BookmarkNode *, int, BookmarkNode *))); - connect(bookmarkManager, SIGNAL(entryChanged(BookmarkNode *)), - this, SLOT(entryChanged(BookmarkNode *))); + connect(bookmarkManager, SIGNAL(entryAdded(BookmarkNode*)), + this, SLOT(entryAdded(BookmarkNode*))); + connect(bookmarkManager, SIGNAL(entryRemoved(BookmarkNode*,int,BookmarkNode*)), + this, SLOT(entryRemoved(BookmarkNode*,int,BookmarkNode*))); + connect(bookmarkManager, SIGNAL(entryChanged(BookmarkNode*)), + this, SLOT(entryChanged(BookmarkNode*))); } QModelIndex BookmarksModel::index(BookmarkNode *node) const @@ -733,8 +733,8 @@ BookmarksMenu::BookmarksMenu(QWidget *parent) : ModelMenu(parent) , m_bookmarksManager(0) { - connect(this, SIGNAL(activated(const QModelIndex &)), - this, SLOT(activated(const QModelIndex &))); + connect(this, SIGNAL(activated(QModelIndex)), + this, SLOT(activated(QModelIndex))); setMaxRows(-1); setHoverRole(BookmarksModel::UrlStringRole); setSeparatorRole(BookmarksModel::SeparatorRole); @@ -792,11 +792,11 @@ BookmarksDialog::BookmarksDialog(QWidget *parent, BookmarksManager *manager) int header = fm.width(QLatin1Char('m')) * 40; tree->header()->resizeSection(0, header); tree->header()->setStretchLastSection(true); - connect(tree, SIGNAL(activated(const QModelIndex&)), + connect(tree, SIGNAL(activated(QModelIndex)), this, SLOT(open())); tree->setContextMenuPolicy(Qt::CustomContextMenu); - connect(tree, SIGNAL(customContextMenuRequested(const QPoint &)), - this, SLOT(customContextMenuRequested(const QPoint &))); + connect(tree, SIGNAL(customContextMenuRequested(QPoint)), + this, SLOT(customContextMenuRequested(QPoint))); connect(addFolderButton, SIGNAL(clicked()), this, SLOT(newFolder())); expandNodes(m_bookmarksManager->bookmarks()); @@ -884,9 +884,9 @@ BookmarksToolBar::BookmarksToolBar(BookmarksModel *model, QWidget *parent) connect(this, SIGNAL(actionTriggered(QAction*)), this, SLOT(triggered(QAction*))); setRootIndex(model->index(0, 0)); connect(m_bookmarksModel, SIGNAL(modelReset()), this, SLOT(build())); - connect(m_bookmarksModel, SIGNAL(rowsInserted(const QModelIndex &, int, int)), this, SLOT(build())); - connect(m_bookmarksModel, SIGNAL(rowsRemoved(const QModelIndex &, int, int)), this, SLOT(build())); - connect(m_bookmarksModel, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), this, SLOT(build())); + connect(m_bookmarksModel, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(build())); + connect(m_bookmarksModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(build())); + connect(m_bookmarksModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(build())); setAcceptDrops(true); } @@ -956,8 +956,8 @@ void BookmarksToolBar::build() button->setArrowType(Qt::DownArrow); button->setText(idx.data().toString()); ModelMenu *menu = new ModelMenu(this); - connect(menu, SIGNAL(activated(const QModelIndex &)), - this, SLOT(activated(const QModelIndex &))); + connect(menu, SIGNAL(activated(QModelIndex)), + this, SLOT(activated(QModelIndex))); menu->setModel(m_bookmarksModel); menu->setRootIndex(idx); menu->addAction(new QAction(menu)); diff --git a/demos/browser/browsermainwindow.cpp b/demos/browser/browsermainwindow.cpp index 8e3986ba67..f57fd47e79 100644 --- a/demos/browser/browsermainwindow.cpp +++ b/demos/browser/browsermainwindow.cpp @@ -90,8 +90,8 @@ BrowserMainWindow::BrowserMainWindow(QWidget *parent, Qt::WindowFlags flags) QWidget *centralWidget = new QWidget(this); BookmarksModel *boomarksModel = BrowserApplication::bookmarksManager()->bookmarksModel(); m_bookmarksToolbar = new BookmarksToolBar(boomarksModel, this); - connect(m_bookmarksToolbar, SIGNAL(openUrl(const QUrl&)), - m_tabWidget, SLOT(loadUrlInCurrentTab(const QUrl&))); + connect(m_bookmarksToolbar, SIGNAL(openUrl(QUrl)), + m_tabWidget, SLOT(loadUrlInCurrentTab(QUrl))); connect(m_bookmarksToolbar->toggleViewAction(), SIGNAL(toggled(bool)), this, SLOT(updateBookmarksToolbarActionText(bool))); @@ -109,22 +109,22 @@ BrowserMainWindow::BrowserMainWindow(QWidget *parent, Qt::WindowFlags flags) centralWidget->setLayout(layout); setCentralWidget(centralWidget); - connect(m_tabWidget, SIGNAL(loadPage(const QString &)), - this, SLOT(loadPage(const QString &))); - connect(m_tabWidget, SIGNAL(setCurrentTitle(const QString &)), - this, SLOT(slotUpdateWindowTitle(const QString &))); - connect(m_tabWidget, SIGNAL(showStatusBarMessage(const QString&)), - statusBar(), SLOT(showMessage(const QString&))); - connect(m_tabWidget, SIGNAL(linkHovered(const QString&)), - statusBar(), SLOT(showMessage(const QString&))); + connect(m_tabWidget, SIGNAL(loadPage(QString)), + this, SLOT(loadPage(QString))); + connect(m_tabWidget, SIGNAL(setCurrentTitle(QString)), + this, SLOT(slotUpdateWindowTitle(QString))); + connect(m_tabWidget, SIGNAL(showStatusBarMessage(QString)), + statusBar(), SLOT(showMessage(QString))); + connect(m_tabWidget, SIGNAL(linkHovered(QString)), + statusBar(), SLOT(showMessage(QString))); connect(m_tabWidget, SIGNAL(loadProgress(int)), this, SLOT(slotLoadProgress(int))); connect(m_tabWidget, SIGNAL(tabsChanged()), m_autoSaver, SLOT(changeOccurred())); - connect(m_tabWidget, SIGNAL(geometryChangeRequested(const QRect &)), - this, SLOT(geometryChangeRequested(const QRect &))); - connect(m_tabWidget, SIGNAL(printRequested(QWebFrame *)), - this, SLOT(printRequested(QWebFrame *))); + connect(m_tabWidget, SIGNAL(geometryChangeRequested(QRect)), + this, SLOT(geometryChangeRequested(QRect))); + connect(m_tabWidget, SIGNAL(printRequested(QWebFrame*)), + this, SLOT(printRequested(QWebFrame*))); connect(m_tabWidget, SIGNAL(menuBarVisibilityChangeRequested(bool)), menuBar(), SLOT(setVisible(bool))); connect(m_tabWidget, SIGNAL(statusBarVisibilityChangeRequested(bool)), @@ -369,10 +369,10 @@ void BrowserMainWindow::setupMenu() // History HistoryMenu *historyMenu = new HistoryMenu(this); - connect(historyMenu, SIGNAL(openUrl(const QUrl&)), - m_tabWidget, SLOT(loadUrlInCurrentTab(const QUrl&))); - connect(historyMenu, SIGNAL(hovered(const QString&)), this, - SLOT(slotUpdateStatusbar(const QString&))); + connect(historyMenu, SIGNAL(openUrl(QUrl)), + m_tabWidget, SLOT(loadUrlInCurrentTab(QUrl))); + connect(historyMenu, SIGNAL(hovered(QString)), this, + SLOT(slotUpdateStatusbar(QString))); historyMenu->setTitle(tr("Hi&story")); menuBar()->addMenu(historyMenu); QList<QAction*> historyActions; @@ -404,10 +404,10 @@ void BrowserMainWindow::setupMenu() // Bookmarks BookmarksMenu *bookmarksMenu = new BookmarksMenu(this); - connect(bookmarksMenu, SIGNAL(openUrl(const QUrl&)), - m_tabWidget, SLOT(loadUrlInCurrentTab(const QUrl&))); - connect(bookmarksMenu, SIGNAL(hovered(const QString&)), - this, SLOT(slotUpdateStatusbar(const QString&))); + connect(bookmarksMenu, SIGNAL(openUrl(QUrl)), + m_tabWidget, SLOT(loadUrlInCurrentTab(QUrl))); + connect(bookmarksMenu, SIGNAL(hovered(QString)), + this, SLOT(slotUpdateStatusbar(QString))); bookmarksMenu->setTitle(tr("&Bookmarks")); menuBar()->addMenu(bookmarksMenu); @@ -455,16 +455,16 @@ void BrowserMainWindow::setupToolBar() m_historyBack->setMenu(m_historyBackMenu); connect(m_historyBackMenu, SIGNAL(aboutToShow()), this, SLOT(slotAboutToShowBackMenu())); - connect(m_historyBackMenu, SIGNAL(triggered(QAction *)), - this, SLOT(slotOpenActionUrl(QAction *))); + connect(m_historyBackMenu, SIGNAL(triggered(QAction*)), + this, SLOT(slotOpenActionUrl(QAction*))); m_navigationBar->addAction(m_historyBack); m_historyForward->setIcon(style()->standardIcon(QStyle::SP_ArrowForward, 0, this)); m_historyForwardMenu = new QMenu(this); connect(m_historyForwardMenu, SIGNAL(aboutToShow()), this, SLOT(slotAboutToShowForwardMenu())); - connect(m_historyForwardMenu, SIGNAL(triggered(QAction *)), - this, SLOT(slotOpenActionUrl(QAction *))); + connect(m_historyForwardMenu, SIGNAL(triggered(QAction*)), + this, SLOT(slotOpenActionUrl(QAction*))); m_historyForward->setMenu(m_historyForwardMenu); m_navigationBar->addAction(m_historyForward); @@ -478,7 +478,7 @@ void BrowserMainWindow::setupToolBar() m_toolbarSearch = new ToolbarSearch(m_navigationBar); m_navigationBar->addWidget(m_toolbarSearch); - connect(m_toolbarSearch, SIGNAL(search(const QUrl&)), SLOT(loadUrl(const QUrl&))); + connect(m_toolbarSearch, SIGNAL(search(QUrl)), SLOT(loadUrl(QUrl))); m_chaseWidget = new ChaseWidget(this); m_navigationBar->addWidget(m_chaseWidget); @@ -487,8 +487,8 @@ void BrowserMainWindow::setupToolBar() void BrowserMainWindow::slotShowBookmarksDialog() { BookmarksDialog *dialog = new BookmarksDialog(this); - connect(dialog, SIGNAL(openUrl(const QUrl&)), - m_tabWidget, SLOT(loadUrlInCurrentTab(const QUrl&))); + connect(dialog, SIGNAL(openUrl(QUrl)), + m_tabWidget, SLOT(loadUrlInCurrentTab(QUrl))); dialog->show(); } @@ -636,8 +636,8 @@ void BrowserMainWindow::slotFilePrintPreview() if (!currentTab()) return; QPrintPreviewDialog *dialog = new QPrintPreviewDialog(this); - connect(dialog, SIGNAL(paintRequested(QPrinter *)), - currentTab(), SLOT(print(QPrinter *))); + connect(dialog, SIGNAL(paintRequested(QPrinter*)), + currentTab(), SLOT(print(QPrinter*))); dialog->exec(); #endif } diff --git a/demos/browser/cookiejar.cpp b/demos/browser/cookiejar.cpp index f01de13660..ce8aa740a2 100644 --- a/demos/browser/cookiejar.cpp +++ b/demos/browser/cookiejar.cpp @@ -668,8 +668,8 @@ CookiesExceptionsDialog::CookiesExceptionsDialog(CookieJar *cookieJar, QWidget * CookieModel *cookieModel = new CookieModel(cookieJar, this); domainLineEdit->setCompleter(new QCompleter(cookieModel, domainLineEdit)); - connect(domainLineEdit, SIGNAL(textChanged(const QString &)), - this, SLOT(textChanged(const QString &))); + connect(domainLineEdit, SIGNAL(textChanged(QString)), + this, SLOT(textChanged(QString))); connect(blockButton, SIGNAL(clicked()), this, SLOT(block())); connect(allowButton, SIGNAL(clicked()), this, SLOT(allow())); connect(allowForSessionButton, SIGNAL(clicked()), this, SLOT(allowForSession())); diff --git a/demos/browser/downloadmanager.cpp b/demos/browser/downloadmanager.cpp index 9986439db2..f57fea1b73 100644 --- a/demos/browser/downloadmanager.cpp +++ b/demos/browser/downloadmanager.cpp @@ -94,8 +94,8 @@ void DownloadItem::init() connect(m_reply, SIGNAL(readyRead()), this, SLOT(downloadReadyRead())); connect(m_reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(error(QNetworkReply::NetworkError))); - connect(m_reply, SIGNAL(downloadProgress(qint64, qint64)), - this, SLOT(downloadProgress(qint64, qint64))); + connect(m_reply, SIGNAL(downloadProgress(qint64,qint64)), + this, SLOT(downloadProgress(qint64,qint64))); connect(m_reply, SIGNAL(metaDataChanged()), this, SLOT(metaDataChanged())); connect(m_reply, SIGNAL(finished()), diff --git a/demos/browser/history.cpp b/demos/browser/history.cpp index 7ef997e244..a34e122e52 100644 --- a/demos/browser/history.cpp +++ b/demos/browser/history.cpp @@ -77,9 +77,9 @@ HistoryManager::HistoryManager(QObject *parent) m_expiredTimer.setSingleShot(true); connect(&m_expiredTimer, SIGNAL(timeout()), this, SLOT(checkForExpired())); - connect(this, SIGNAL(entryAdded(const HistoryItem &)), + connect(this, SIGNAL(entryAdded(HistoryItem)), m_saveTimer, SLOT(changeOccurred())); - connect(this, SIGNAL(entryRemoved(const HistoryItem &)), + connect(this, SIGNAL(entryRemoved(HistoryItem)), m_saveTimer, SLOT(changeOccurred())); load(); @@ -369,10 +369,10 @@ HistoryModel::HistoryModel(HistoryManager *history, QObject *parent) Q_ASSERT(m_history); connect(m_history, SIGNAL(historyReset()), this, SLOT(historyReset())); - connect(m_history, SIGNAL(entryRemoved(const HistoryItem &)), + connect(m_history, SIGNAL(entryRemoved(HistoryItem)), this, SLOT(historyReset())); - connect(m_history, SIGNAL(entryAdded(const HistoryItem &)), + connect(m_history, SIGNAL(entryAdded(HistoryItem)), this, SLOT(entryAdded())); connect(m_history, SIGNAL(entryUpdated(int)), this, SLOT(entryUpdated(int))); @@ -595,8 +595,8 @@ HistoryMenu::HistoryMenu(QWidget *parent) : ModelMenu(parent) , m_history(0) { - connect(this, SIGNAL(activated(const QModelIndex &)), - this, SLOT(activated(const QModelIndex &))); + connect(this, SIGNAL(activated(QModelIndex)), + this, SLOT(activated(QModelIndex))); setHoverRole(HistoryModel::UrlStringRole); } @@ -639,8 +639,8 @@ void HistoryMenu::postPopulated() void HistoryMenu::showHistoryDialog() { HistoryDialog *dialog = new HistoryDialog(this); - connect(dialog, SIGNAL(openUrl(const QUrl&)), - this, SIGNAL(openUrl(const QUrl&))); + connect(dialog, SIGNAL(openUrl(QUrl)), + this, SIGNAL(openUrl(QUrl))); dialog->show(); } @@ -687,11 +687,11 @@ HistoryDialog::HistoryDialog(QWidget *parent, HistoryManager *setHistory) : QDia int header = fm.width(QLatin1Char('m')) * 40; tree->header()->resizeSection(0, header); tree->header()->setStretchLastSection(true); - connect(tree, SIGNAL(activated(const QModelIndex&)), + connect(tree, SIGNAL(activated(QModelIndex)), this, SLOT(open())); tree->setContextMenuPolicy(Qt::CustomContextMenu); - connect(tree, SIGNAL(customContextMenuRequested(const QPoint &)), - this, SLOT(customContextMenuRequested(const QPoint &))); + connect(tree, SIGNAL(customContextMenuRequested(QPoint)), + this, SLOT(customContextMenuRequested(QPoint))); } void HistoryDialog::customContextMenuRequested(const QPoint &pos) @@ -751,12 +751,12 @@ void HistoryFilterModel::setSourceModel(QAbstractItemModel *newSourceModel) { if (sourceModel()) { disconnect(sourceModel(), SIGNAL(modelReset()), this, SLOT(sourceReset())); - disconnect(sourceModel(), SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), - this, SLOT(dataChanged(const QModelIndex &, const QModelIndex &))); - disconnect(sourceModel(), SIGNAL(rowsInserted(const QModelIndex &, int, int)), - this, SLOT(sourceRowsInserted(const QModelIndex &, int, int))); - disconnect(sourceModel(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)), - this, SLOT(sourceRowsRemoved(const QModelIndex &, int, int))); + disconnect(sourceModel(), SIGNAL(dataChanged(QModelIndex,QModelIndex)), + this, SLOT(dataChanged(QModelIndex,QModelIndex))); + disconnect(sourceModel(), SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(sourceRowsInserted(QModelIndex,int,int))); + disconnect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(sourceRowsRemoved(QModelIndex,int,int))); } QAbstractProxyModel::setSourceModel(newSourceModel); @@ -764,12 +764,12 @@ void HistoryFilterModel::setSourceModel(QAbstractItemModel *newSourceModel) if (sourceModel()) { m_loaded = false; connect(sourceModel(), SIGNAL(modelReset()), this, SLOT(sourceReset())); - connect(sourceModel(), SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), - this, SLOT(sourceDataChanged(const QModelIndex &, const QModelIndex &))); - connect(sourceModel(), SIGNAL(rowsInserted(const QModelIndex &, int, int)), - this, SLOT(sourceRowsInserted(const QModelIndex &, int, int))); - connect(sourceModel(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)), - this, SLOT(sourceRowsRemoved(const QModelIndex &, int, int))); + connect(sourceModel(), SIGNAL(dataChanged(QModelIndex,QModelIndex)), + this, SLOT(sourceDataChanged(QModelIndex,QModelIndex))); + connect(sourceModel(), SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(sourceRowsInserted(QModelIndex,int,int))); + connect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(sourceRowsRemoved(QModelIndex,int,int))); } } @@ -906,16 +906,16 @@ bool HistoryFilterModel::removeRows(int row, int count, const QModelIndex &paren if (row < 0 || count <= 0 || row + count > rowCount(parent) || parent.isValid()) return false; int lastRow = row + count - 1; - disconnect(sourceModel(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)), - this, SLOT(sourceRowsRemoved(const QModelIndex &, int, int))); + disconnect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(sourceRowsRemoved(QModelIndex,int,int))); beginRemoveRows(parent, row, lastRow); int oldCount = rowCount(); int start = sourceModel()->rowCount() - m_sourceRow.value(row); int end = sourceModel()->rowCount() - m_sourceRow.value(lastRow); sourceModel()->removeRows(start, end - start + 1); endRemoveRows(); - connect(sourceModel(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)), - this, SLOT(sourceRowsRemoved(const QModelIndex &, int, int))); + connect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(sourceRowsRemoved(QModelIndex,int,int))); m_loaded = false; if (oldCount - count != rowCount()) reset(); @@ -988,9 +988,9 @@ void HistoryCompletionModel::setSourceModel(QAbstractItemModel *newSourceModel) { if (sourceModel()) { disconnect(sourceModel(), SIGNAL(modelReset()), this, SLOT(sourceReset())); - disconnect(sourceModel(), SIGNAL(rowsInserted(const QModelIndex &, int, int)), + disconnect(sourceModel(), SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(sourceReset())); - disconnect(sourceModel(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)), + disconnect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(sourceReset())); } @@ -998,9 +998,9 @@ void HistoryCompletionModel::setSourceModel(QAbstractItemModel *newSourceModel) if (newSourceModel) { connect(newSourceModel, SIGNAL(modelReset()), this, SLOT(sourceReset())); - connect(sourceModel(), SIGNAL(rowsInserted(const QModelIndex &, int, int)), + connect(sourceModel(), SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(sourceReset())); - connect(sourceModel(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)), + connect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(sourceReset())); } @@ -1177,10 +1177,10 @@ void HistoryTreeModel::setSourceModel(QAbstractItemModel *newSourceModel) if (sourceModel()) { disconnect(sourceModel(), SIGNAL(modelReset()), this, SLOT(sourceReset())); disconnect(sourceModel(), SIGNAL(layoutChanged()), this, SLOT(sourceReset())); - disconnect(sourceModel(), SIGNAL(rowsInserted(const QModelIndex &, int, int)), - this, SLOT(sourceRowsInserted(const QModelIndex &, int, int))); - disconnect(sourceModel(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)), - this, SLOT(sourceRowsRemoved(const QModelIndex &, int, int))); + disconnect(sourceModel(), SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(sourceRowsInserted(QModelIndex,int,int))); + disconnect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(sourceRowsRemoved(QModelIndex,int,int))); } QAbstractProxyModel::setSourceModel(newSourceModel); @@ -1188,10 +1188,10 @@ void HistoryTreeModel::setSourceModel(QAbstractItemModel *newSourceModel) if (newSourceModel) { connect(sourceModel(), SIGNAL(modelReset()), this, SLOT(sourceReset())); connect(sourceModel(), SIGNAL(layoutChanged()), this, SLOT(sourceReset())); - connect(sourceModel(), SIGNAL(rowsInserted(const QModelIndex &, int, int)), - this, SLOT(sourceRowsInserted(const QModelIndex &, int, int))); - connect(sourceModel(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)), - this, SLOT(sourceRowsRemoved(const QModelIndex &, int, int))); + connect(sourceModel(), SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(sourceRowsInserted(QModelIndex,int,int))); + connect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(sourceRowsRemoved(QModelIndex,int,int))); } reset(); diff --git a/demos/browser/networkaccessmanager.cpp b/demos/browser/networkaccessmanager.cpp index 171ca14497..af690377a2 100644 --- a/demos/browser/networkaccessmanager.cpp +++ b/demos/browser/networkaccessmanager.cpp @@ -66,15 +66,15 @@ NetworkAccessManager::NetworkAccessManager(QObject *parent) requestFinishedCount(0), requestFinishedFromCacheCount(0), requestFinishedPipelinedCount(0), requestFinishedSecureCount(0) { - connect(this, SIGNAL(authenticationRequired(QNetworkReply*, QAuthenticator*)), + connect(this, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*))); - connect(this, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)), - SLOT(proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*))); - connect(this, SIGNAL(finished(QNetworkReply *)), - SLOT(requestFinished(QNetworkReply *))); + connect(this, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), + SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); + connect(this, SIGNAL(finished(QNetworkReply*)), + SLOT(requestFinished(QNetworkReply*))); #ifndef QT_NO_OPENSSL - connect(this, SIGNAL(sslErrors(QNetworkReply*, const QList<QSslError>&)), - SLOT(sslErrors(QNetworkReply*, const QList<QSslError>&))); + connect(this, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)), + SLOT(sslErrors(QNetworkReply*,QList<QSslError>))); #endif loadSettings(); diff --git a/demos/browser/searchlineedit.cpp b/demos/browser/searchlineedit.cpp index 89b348c008..a5ceface04 100644 --- a/demos/browser/searchlineedit.cpp +++ b/demos/browser/searchlineedit.cpp @@ -169,8 +169,8 @@ void SearchButton::paintEvent(QPaintEvent *event) SearchLineEdit::SearchLineEdit(QWidget *parent) : ExLineEdit(parent), m_searchButton(new SearchButton(this)) { - connect(lineEdit(), SIGNAL(textChanged(const QString &)), - this, SIGNAL(textChanged(const QString &))); + connect(lineEdit(), SIGNAL(textChanged(QString)), + this, SIGNAL(textChanged(QString))); setLeftWidget(m_searchButton); m_inactiveText = tr("Search"); diff --git a/demos/browser/tabwidget.cpp b/demos/browser/tabwidget.cpp index 8a7ae0b72c..3ace6a39c2 100644 --- a/demos/browser/tabwidget.cpp +++ b/demos/browser/tabwidget.cpp @@ -64,8 +64,8 @@ TabBar::TabBar(QWidget *parent) { setContextMenuPolicy(Qt::CustomContextMenu); setAcceptDrops(true); - connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), - this, SLOT(contextMenuRequested(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(QPoint)), + this, SLOT(contextMenuRequested(QPoint))); QString alt = QLatin1String("Alt+%1"); for (int i = 1; i <= 10; ++i) { @@ -221,7 +221,7 @@ TabWidget::TabWidget(QWidget *parent) connect(m_tabBar, SIGNAL(closeOtherTabs(int)), this, SLOT(closeOtherTabs(int))); connect(m_tabBar, SIGNAL(reloadTab(int)), this, SLOT(reloadTab(int))); connect(m_tabBar, SIGNAL(reloadAllTabs()), this, SLOT(reloadAllTabs())); - connect(m_tabBar, SIGNAL(tabMoved(int, int)), this, SLOT(moveTab(int, int))); + connect(m_tabBar, SIGNAL(tabMoved(int,int)), this, SLOT(moveTab(int,int))); setTabBar(m_tabBar); setDocumentMode(true); @@ -257,8 +257,8 @@ TabWidget::TabWidget(QWidget *parent) m_recentlyClosedTabsMenu = new QMenu(this); connect(m_recentlyClosedTabsMenu, SIGNAL(aboutToShow()), this, SLOT(aboutToShowRecentTabsMenu())); - connect(m_recentlyClosedTabsMenu, SIGNAL(triggered(QAction *)), - this, SLOT(aboutToShowRecentTriggeredAction(QAction *))); + connect(m_recentlyClosedTabsMenu, SIGNAL(triggered(QAction*)), + this, SLOT(aboutToShowRecentTriggeredAction(QAction*))); m_recentlyClosedTabsAction = new QAction(tr("Recently Closed Tabs"), this); m_recentlyClosedTabsAction->setMenu(m_recentlyClosedTabsMenu); m_recentlyClosedTabsAction->setEnabled(false); @@ -304,18 +304,18 @@ void TabWidget::currentChanged(int index) WebView *oldWebView = this->webView(m_lineEdits->currentIndex()); if (oldWebView) { - disconnect(oldWebView, SIGNAL(statusBarMessage(const QString&)), - this, SIGNAL(showStatusBarMessage(const QString&))); - disconnect(oldWebView->page(), SIGNAL(linkHovered(const QString&, const QString&, const QString&)), - this, SIGNAL(linkHovered(const QString&))); + disconnect(oldWebView, SIGNAL(statusBarMessage(QString)), + this, SIGNAL(showStatusBarMessage(QString))); + disconnect(oldWebView->page(), SIGNAL(linkHovered(QString,QString,QString)), + this, SIGNAL(linkHovered(QString))); disconnect(oldWebView, SIGNAL(loadProgress(int)), this, SIGNAL(loadProgress(int))); } - connect(webView, SIGNAL(statusBarMessage(const QString&)), - this, SIGNAL(showStatusBarMessage(const QString&))); - connect(webView->page(), SIGNAL(linkHovered(const QString&, const QString&, const QString&)), - this, SIGNAL(linkHovered(const QString&))); + connect(webView, SIGNAL(statusBarMessage(QString)), + this, SIGNAL(showStatusBarMessage(QString))); + connect(webView->page(), SIGNAL(linkHovered(QString,QString,QString)), + this, SIGNAL(linkHovered(QString))); connect(webView, SIGNAL(loadProgress(int)), this, SIGNAL(loadProgress(int))); @@ -450,16 +450,16 @@ WebView *TabWidget::newTab(bool makeCurrent) this, SLOT(webViewIconChanged())); connect(webView, SIGNAL(iconChanged()), this, SLOT(webViewIconChanged())); - connect(webView, SIGNAL(titleChanged(const QString &)), - this, SLOT(webViewTitleChanged(const QString &))); - connect(webView, SIGNAL(urlChanged(const QUrl &)), - this, SLOT(webViewUrlChanged(const QUrl &))); + connect(webView, SIGNAL(titleChanged(QString)), + this, SLOT(webViewTitleChanged(QString))); + connect(webView, SIGNAL(urlChanged(QUrl)), + this, SLOT(webViewUrlChanged(QUrl))); connect(webView->page(), SIGNAL(windowCloseRequested()), this, SLOT(windowCloseRequested())); - connect(webView->page(), SIGNAL(geometryChangeRequested(const QRect &)), - this, SIGNAL(geometryChangeRequested(const QRect &))); - connect(webView->page(), SIGNAL(printRequested(QWebFrame *)), - this, SIGNAL(printRequested(QWebFrame *))); + connect(webView->page(), SIGNAL(geometryChangeRequested(QRect)), + this, SIGNAL(geometryChangeRequested(QRect))); + connect(webView->page(), SIGNAL(printRequested(QWebFrame*)), + this, SIGNAL(printRequested(QWebFrame*))); connect(webView->page(), SIGNAL(menuBarVisibilityChangeRequested(bool)), this, SIGNAL(menuBarVisibilityChangeRequested(bool))); connect(webView->page(), SIGNAL(statusBarVisibilityChangeRequested(bool)), @@ -764,7 +764,7 @@ WebActionMapper::WebActionMapper(QAction *root, QWebPage::WebAction webAction, Q if (!m_root) return; connect(m_root, SIGNAL(triggered()), this, SLOT(rootTriggered())); - connect(root, SIGNAL(destroyed(QObject *)), this, SLOT(rootDestroyed())); + connect(root, SIGNAL(destroyed(QObject*)), this, SLOT(rootDestroyed())); root->setEnabled(false); } @@ -813,7 +813,7 @@ void WebActionMapper::childChanged() void WebActionMapper::updateCurrent(QWebPage *currentParent) { if (m_currentParent) - disconnect(m_currentParent, SIGNAL(destroyed(QObject *)), + disconnect(m_currentParent, SIGNAL(destroyed(QObject*)), this, SLOT(currentDestroyed())); m_currentParent = currentParent; @@ -827,7 +827,7 @@ void WebActionMapper::updateCurrent(QWebPage *currentParent) QAction *source = m_currentParent->action(m_webAction); m_root->setChecked(source->isChecked()); m_root->setEnabled(source->isEnabled()); - connect(m_currentParent, SIGNAL(destroyed(QObject *)), + connect(m_currentParent, SIGNAL(destroyed(QObject*)), this, SLOT(currentDestroyed())); } diff --git a/demos/browser/urllineedit.cpp b/demos/browser/urllineedit.cpp index 6d669c3850..251b9948e3 100644 --- a/demos/browser/urllineedit.cpp +++ b/demos/browser/urllineedit.cpp @@ -87,8 +87,8 @@ ExLineEdit::ExLineEdit(QWidget *parent) m_clearButton = new ClearButton(this); connect(m_clearButton, SIGNAL(clicked()), m_lineEdit, SLOT(clear())); - connect(m_lineEdit, SIGNAL(textChanged(const QString&)), - m_clearButton, SLOT(textChanged(const QString&))); + connect(m_lineEdit, SIGNAL(textChanged(QString)), + m_clearButton, SLOT(textChanged(QString))); } void ExLineEdit::setLeftWidget(QWidget *widget) @@ -270,8 +270,8 @@ void UrlLineEdit::setWebView(WebView *webView) Q_ASSERT(!m_webView); m_webView = webView; m_iconLabel->m_webView = webView; - connect(webView, SIGNAL(urlChanged(const QUrl &)), - this, SLOT(webViewUrlChanged(const QUrl &))); + connect(webView, SIGNAL(urlChanged(QUrl)), + this, SLOT(webViewUrlChanged(QUrl))); connect(webView, SIGNAL(loadFinished(bool)), this, SLOT(webViewIconChanged())); connect(webView, SIGNAL(iconChanged()), diff --git a/demos/browser/webview.cpp b/demos/browser/webview.cpp index 754fedc11a..1fcced40cd 100644 --- a/demos/browser/webview.cpp +++ b/demos/browser/webview.cpp @@ -68,8 +68,8 @@ WebPage::WebPage(QObject *parent) , m_openInNewTab(false) { setNetworkAccessManager(BrowserApplication::networkAccessManager()); - connect(this, SIGNAL(unsupportedContent(QNetworkReply *)), - this, SLOT(handleUnsupportedContent(QNetworkReply *))); + connect(this, SIGNAL(unsupportedContent(QNetworkReply*)), + this, SLOT(handleUnsupportedContent(QNetworkReply*))); } BrowserMainWindow *WebPage::mainWindow() @@ -192,16 +192,16 @@ WebView::WebView(QWidget* parent) , m_page(new WebPage(this)) { setPage(m_page); - connect(page(), SIGNAL(statusBarMessage(const QString&)), - SLOT(setStatusBarText(const QString&))); + connect(page(), SIGNAL(statusBarMessage(QString)), + SLOT(setStatusBarText(QString))); connect(this, SIGNAL(loadProgress(int)), this, SLOT(setProgress(int))); connect(this, SIGNAL(loadFinished(bool)), this, SLOT(loadFinished())); - connect(page(), SIGNAL(loadingUrl(const QUrl&)), - this, SIGNAL(urlChanged(const QUrl &))); - connect(page(), SIGNAL(downloadRequested(const QNetworkRequest &)), - this, SLOT(downloadRequested(const QNetworkRequest &))); + connect(page(), SIGNAL(loadingUrl(QUrl)), + this, SIGNAL(urlChanged(QUrl))); + connect(page(), SIGNAL(downloadRequested(QNetworkRequest)), + this, SLOT(downloadRequested(QNetworkRequest))); page()->setForwardUnsupportedContent(true); } diff --git a/demos/embedded/desktopservices/contenttab.cpp b/demos/embedded/desktopservices/contenttab.cpp index d218702d88..f9470e93c8 100644 --- a/demos/embedded/desktopservices/contenttab.cpp +++ b/demos/embedded/desktopservices/contenttab.cpp @@ -76,8 +76,8 @@ void ContentTab::init(const QDesktopServices::StandardLocation &location, m_ContentDir.setNameFilters(filterList); setIcon(icon); - connect(this, SIGNAL(itemClicked(QListWidgetItem *)), - this, SLOT(openItem(QListWidgetItem *))); + connect(this, SIGNAL(itemClicked(QListWidgetItem*)), + this, SLOT(openItem(QListWidgetItem*))); populateListWidget(); } diff --git a/demos/embedded/fluidlauncher/config_s60/config.xml b/demos/embedded/fluidlauncher/config_s60/config.xml index 2c61baf48a..176f52e0f0 100644 --- a/demos/embedded/fluidlauncher/config_s60/config.xml +++ b/demos/embedded/fluidlauncher/config_s60/config.xml @@ -11,7 +11,6 @@ <example filename="saxbookmarks" name="SaxBookmarks" image="screenshots/saxbookmarks_s60.png"/> <example filename="desktopservices" name="Desktop Services" image="screenshots/desktopservices_s60.png"/> <example filename="fridgemagnets" name="Fridge Magnets" image="screenshots/fridgemagnets_s60.png" args="-small-screen"/> - <example filename="drilldown" name="Drilldown" image="screenshots/drilldown_s60.png"/> <example filename="softkeys" name="Softkeys" image="screenshots/softkeys_s60.png"/> <example filename="anomaly" name="Anomaly Browser" image="screenshots/anomaly_s60.png"/> <example filename="raycasting" name="Ray casting" image="screenshots/raycasting.png"/> diff --git a/demos/embedded/fluidlauncher/demoapplication.cpp b/demos/embedded/fluidlauncher/demoapplication.cpp index 864ef91e5d..54c48c533b 100644 --- a/demos/embedded/fluidlauncher/demoapplication.cpp +++ b/demos/embedded/fluidlauncher/demoapplication.cpp @@ -60,8 +60,8 @@ DemoApplication::DemoApplication(QString executableName, QString caption, QStrin process.setProcessChannelMode(QProcess::ForwardedChannels); - QObject::connect( &process, SIGNAL(finished(int, QProcess::ExitStatus)), - this, SLOT(processFinished(int, QProcess::ExitStatus))); + QObject::connect( &process, SIGNAL(finished(int,QProcess::ExitStatus)), + this, SLOT(processFinished(int,QProcess::ExitStatus))); QObject::connect( &process, SIGNAL(error(QProcess::ProcessError)), this, SLOT(processError(QProcess::ProcessError))); diff --git a/demos/embedded/fluidlauncher/fluidlauncher.pro b/demos/embedded/fluidlauncher/fluidlauncher.pro index dd931e61d0..b47f6a0374 100644 --- a/demos/embedded/fluidlauncher/fluidlauncher.pro +++ b/demos/embedded/fluidlauncher/fluidlauncher.pro @@ -59,7 +59,7 @@ symbian { load(data_caging_paths) TARGET.UID3 = 0xA000A641 - ICON = ../../../src/s60installs/qt.svg + ICON = $$QT_SOURCE_TREE/src/s60installs/qt.svg executables.sources = \ styledemo.exe \ @@ -70,7 +70,6 @@ symbian { saxbookmarks.exe \ desktopservices.exe \ fridgemagnets.exe \ - drilldown.exe \ softkeys.exe \ raycasting.exe \ flickable.exe \ @@ -89,7 +88,6 @@ symbian { $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/saxbookmarks_reg.rsc \ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/desktopservices_reg.rsc \ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/fridgemagnets_reg.rsc \ - $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/drilldown_reg.rsc \ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/softkeys_reg.rsc \ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/raycasting_reg.rsc \ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/flickable_reg.rsc \ @@ -113,7 +111,6 @@ symbian { $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/saxbookmarks.rsc \ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/desktopservices.rsc \ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/fridgemagnets.rsc \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/drilldown.rsc \ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/softkeys.rsc \ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/raycasting.rsc \ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/flickable.rsc \ @@ -121,42 +118,66 @@ symbian { $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/lightmaps.rsc \ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/flightinfo.rsc - + resource.path = $$APP_RESOURCE_DIR mifs.sources = \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/0xA000A641.mif \ #fluidlauncher - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/0xA000C611.mif #desktopservices + $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/fluidlauncher.mif \ + $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/styledemo.mif \ + $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/deform.mif \ + $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/pathstroke.mif \ + $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/wiggly.mif \ + $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/qftp.mif \ + $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/saxbookmarks.mif \ + $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/desktopservices.mif \ + $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/fridgemagnets.mif \ + $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/softkeys.mif \ + $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/raycasting.mif \ + $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/flickable.mif \ + $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/digiflip.mif \ + $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/lightmaps.mif \ + $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/flightinfo.mif mifs.path = $$APP_RESOURCE_DIR - contains(QT_CONFIG, svg) { - executables.sources += \ + contains(QT_CONFIG, svg) { + executables.sources += \ embeddedsvgviewer.exe \ weatherinfo.exe - + reg_resource.sources += \ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/embeddedsvgviewer_reg.rsc \ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/weatherinfo_reg.rsc - + resource.sources += \ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/embeddedsvgviewer.rsc \ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/weatherinfo.rsc + + mifs.sources += \ + $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/embeddedsvgviewer.mif \ + $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/weatherinfo.mif + } contains(QT_CONFIG, webkit) { executables.sources += anomaly.exe reg_resource.sources += $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/anomaly_reg.rsc resource.sources += $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/anomaly.rsc + mifs.sources += \ + $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/anomaly.mif } contains(QT_CONFIG, phonon) { executables.sources += qmediaplayer.exe resource.sources += $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/qmediaplayer.rsc + mifs.sources += \ + $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/qmediaplayer.mif } contains(QT_CONFIG, script) { - executables.sources += context2d.exe + executables.sources += context2d.exe reg_resource.sources += $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/context2d_reg.rsc resource.sources += $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/context2d.rsc + mifs.sources += \ + $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/context2d.mif } files.sources = $$PWD/screenshots $$PWD/slides diff --git a/demos/embedded/fluidlauncher/screenshots/drilldown_s60.png b/demos/embedded/fluidlauncher/screenshots/drilldown_s60.png Binary files differdeleted file mode 100644 index d4fd44f831..0000000000 --- a/demos/embedded/fluidlauncher/screenshots/drilldown_s60.png +++ /dev/null diff --git a/demos/embeddeddialogs/embeddeddialog.cpp b/demos/embeddeddialogs/embeddeddialog.cpp index 72c7cce853..19ea6cb462 100644 --- a/demos/embeddeddialogs/embeddeddialog.cpp +++ b/demos/embeddeddialogs/embeddeddialog.cpp @@ -61,8 +61,8 @@ EmbeddedDialog::EmbeddedDialog(QWidget *parent) this, SLOT(layoutDirectionChanged(int))); connect(ui->spacing, SIGNAL(valueChanged(int)), this, SLOT(spacingChanged(int))); - connect(ui->fontComboBox, SIGNAL(currentFontChanged(const QFont &)), - this, SLOT(fontChanged(const QFont &))); + connect(ui->fontComboBox, SIGNAL(currentFontChanged(QFont)), + this, SLOT(fontChanged(QFont))); connect(ui->style, SIGNAL(activated(QString)), this, SLOT(styleChanged(QString))); } diff --git a/demos/gradients/gradients.cpp b/demos/gradients/gradients.cpp index e9c324d62e..898c191f2d 100644 --- a/demos/gradients/gradients.cpp +++ b/demos/gradients/gradients.cpp @@ -78,7 +78,7 @@ ShadeWidget::ShadeWidget(ShadeType type, QWidget *parent) setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); - connect(m_hoverPoints, SIGNAL(pointsChanged(const QPolygonF &)), this, SIGNAL(colorsChanged())); + connect(m_hoverPoints, SIGNAL(pointsChanged(QPolygonF)), this, SIGNAL(colorsChanged())); } @@ -355,8 +355,8 @@ GradientWidget::GradientWidget(QWidget *parent) defaultsGroupLayout->addWidget(default3Button); editorGroupLayout->addWidget(default4Button); - connect(m_editor, SIGNAL(gradientStopsChanged(const QGradientStops &)), - m_renderer, SLOT(setGradientStops(const QGradientStops &))); + connect(m_editor, SIGNAL(gradientStopsChanged(QGradientStops)), + m_renderer, SLOT(setGradientStops(QGradientStops))); connect(m_linearButton, SIGNAL(clicked()), m_renderer, SLOT(setLinearGradient())); connect(m_radialButton, SIGNAL(clicked()), m_renderer, SLOT(setRadialGradient())); diff --git a/demos/qmediaplayer/mediaplayer.cpp b/demos/qmediaplayer/mediaplayer.cpp index 267a22526a..f8ca8ea932 100644 --- a/demos/qmediaplayer/mediaplayer.cpp +++ b/demos/qmediaplayer/mediaplayer.cpp @@ -266,11 +266,14 @@ MediaPlayer::MediaPlayer(const QString &filePath, fileMenu = new QMenu(this); QAction *openFileAction = fileMenu->addAction(tr("Open &File...")); QAction *openUrlAction = fileMenu->addAction(tr("Open &Location...")); + QAction *const openLinkAction = fileMenu->addAction(tr("Open &RAM File...")); + + connect(openLinkAction, SIGNAL(triggered(bool)), this, SLOT(openRamFile())); fileMenu->addSeparator(); QMenu *aspectMenu = fileMenu->addMenu(tr("&Aspect ratio")); QActionGroup *aspectGroup = new QActionGroup(aspectMenu); - connect(aspectGroup, SIGNAL(triggered(QAction *)), this, SLOT(aspectChanged(QAction *))); + connect(aspectGroup, SIGNAL(triggered(QAction*)), this, SLOT(aspectChanged(QAction*))); aspectGroup->setExclusive(true); QAction *aspectActionAuto = aspectMenu->addAction(tr("Auto")); aspectActionAuto->setCheckable(true); @@ -288,7 +291,7 @@ MediaPlayer::MediaPlayer(const QString &filePath, QMenu *scaleMenu = fileMenu->addMenu(tr("&Scale mode")); QActionGroup *scaleGroup = new QActionGroup(scaleMenu); - connect(scaleGroup, SIGNAL(triggered(QAction *)), this, SLOT(scaleChanged(QAction *))); + connect(scaleGroup, SIGNAL(triggered(QAction*)), this, SLOT(scaleChanged(QAction*))); scaleGroup->setExclusive(true); QAction *scaleActionFit = scaleMenu->addAction(tr("Fit in view")); scaleActionFit->setCheckable(true); @@ -313,13 +316,13 @@ MediaPlayer::MediaPlayer(const QString &filePath, connect(openUrlAction, SIGNAL(triggered(bool)), this, SLOT(openUrl())); connect(openFileAction, SIGNAL(triggered(bool)), this, SLOT(openFile())); - connect(m_videoWidget, SIGNAL(customContextMenuRequested(const QPoint &)), SLOT(showContextMenu(const QPoint &))); - connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), SLOT(showContextMenu(const QPoint &))); + connect(m_videoWidget, SIGNAL(customContextMenuRequested(QPoint)), SLOT(showContextMenu(QPoint))); + connect(this, SIGNAL(customContextMenuRequested(QPoint)), SLOT(showContextMenu(QPoint))); connect(&m_MediaObject, SIGNAL(metaDataChanged()), this, SLOT(updateInfo())); connect(&m_MediaObject, SIGNAL(totalTimeChanged(qint64)), this, SLOT(updateTime())); connect(&m_MediaObject, SIGNAL(tick(qint64)), this, SLOT(updateTime())); connect(&m_MediaObject, SIGNAL(finished()), this, SLOT(finished())); - connect(&m_MediaObject, SIGNAL(stateChanged(Phonon::State, Phonon::State)), this, SLOT(stateChanged(Phonon::State, Phonon::State))); + connect(&m_MediaObject, SIGNAL(stateChanged(Phonon::State,Phonon::State)), this, SLOT(stateChanged(Phonon::State,Phonon::State))); connect(&m_MediaObject, SIGNAL(bufferStatus(int)), this, SLOT(bufferStatus(int))); connect(&m_MediaObject, SIGNAL(hasVideoChanged(bool)), this, SLOT(hasVideoChanged(bool))); @@ -835,6 +838,51 @@ void MediaPlayer::openUrl() } } +/*! + \since 4.6 + */ +void MediaPlayer::openRamFile() +{ + QSettings settings; + settings.beginGroup(QLatin1String("BrowserMainWindow")); + + const QStringList fileNameList(QFileDialog::getOpenFileNames(this, + QString(), + settings.value("openRamFile").toString(), + QLatin1String("RAM files (*.ram)"))); + + if (fileNameList.isEmpty()) + return; + + QFile linkFile; + QList<QUrl> list; + QByteArray sourceURL; + for (int i = 0; i < fileNameList.count(); i++ ) { + linkFile.setFileName(fileNameList[i]); + if (linkFile.open(QIODevice::ReadOnly | QIODevice::Text)) { + while (!linkFile.atEnd()) { + sourceURL = linkFile.readLine().trimmed(); + if (!sourceURL.isEmpty()) { + const QUrl url(QUrl::fromEncoded(sourceURL)); + if (url.isValid()) + list.append(url); + } + } + linkFile.close(); + } + } + + if (!list.isEmpty()) { + m_MediaObject.setCurrentSource(Phonon::MediaSource(list[0])); + m_MediaObject.play(); + for (int i = 1; i < list.count(); i++) + m_MediaObject.enqueue(Phonon::MediaSource(list[i])); + } + + forwardButton->setEnabled(!m_MediaObject.queue().isEmpty()); + settings.setValue("openRamFile", fileNameList[0]); +} + void MediaPlayer::finished() { } diff --git a/demos/qmediaplayer/mediaplayer.h b/demos/qmediaplayer/mediaplayer.h index a1c3d92dae..a8f18f075d 100644 --- a/demos/qmediaplayer/mediaplayer.h +++ b/demos/qmediaplayer/mediaplayer.h @@ -107,6 +107,7 @@ private slots: void showContextMenu(const QPoint &); void bufferStatus(int percent); void openUrl(); + void openRamFile(); void configureEffect(); void hasVideoChanged(bool); diff --git a/demos/qmediaplayer/qmediaplayer.pro b/demos/qmediaplayer/qmediaplayer.pro index 2f15c286be..9407a81ff1 100644 --- a/demos/qmediaplayer/qmediaplayer.pro +++ b/demos/qmediaplayer/qmediaplayer.pro @@ -32,4 +32,6 @@ symbian { DEPLOYMENT += addFiles include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) + + TARGET.CAPABILITY="NetworkServices" } diff --git a/demos/qtdemo/xml/examples.xml b/demos/qtdemo/xml/examples.xml index 83bd200511..e3240ab325 100644 --- a/demos/qtdemo/xml/examples.xml +++ b/demos/qtdemo/xml/examples.xml @@ -87,6 +87,7 @@ <example filename="combowidgetmapper" name="Combo Widget Mapper" /> <example filename="dirview" name="Directory View" /> <example filename="fetchmore" name="Fetch More" /> + <example filename="frozencolumn" name="Frozen Column" /> <example filename="pixelator" name="Pixelator" /> <example filename="puzzle" name="Puzzle " image="itemviewspuzzle-example.png"/> <example filename="simpledommodel" name="Simple DOM Model" /> diff --git a/demos/shared/hoverpoints.cpp b/demos/shared/hoverpoints.cpp index 84f58150d6..d8c72f33db 100644 --- a/demos/shared/hoverpoints.cpp +++ b/demos/shared/hoverpoints.cpp @@ -66,7 +66,7 @@ HoverPoints::HoverPoints(QWidget *widget, PointShape shape) m_editable = true; m_enabled = true; - connect(this, SIGNAL(pointsChanged(const QPolygonF &)), + connect(this, SIGNAL(pointsChanged(QPolygonF)), m_widget, SLOT(update())); } diff --git a/demos/spreadsheet/spreadsheet.cpp b/demos/spreadsheet/spreadsheet.cpp index 00045c656a..73c8037f4d 100644 --- a/demos/spreadsheet/spreadsheet.cpp +++ b/demos/spreadsheet/spreadsheet.cpp @@ -73,9 +73,9 @@ SpreadSheet::SpreadSheet(int rows, int cols, QWidget *parent) setCentralWidget(table); statusBar(); - connect(table, SIGNAL(currentItemChanged(QTableWidgetItem*, QTableWidgetItem*)), + connect(table, SIGNAL(currentItemChanged(QTableWidgetItem*,QTableWidgetItem*)), this, SLOT(updateStatus(QTableWidgetItem*))); - connect(table, SIGNAL(currentItemChanged(QTableWidgetItem*, QTableWidgetItem*)), + connect(table, SIGNAL(currentItemChanged(QTableWidgetItem*,QTableWidgetItem*)), this, SLOT(updateColor(QTableWidgetItem*))); connect(table, SIGNAL(currentItemChanged(QTableWidgetItem*,QTableWidgetItem*)), this, SLOT(updateLineEdit(QTableWidgetItem*))); @@ -624,8 +624,8 @@ void SpreadSheet::print() QPrintPreviewDialog dlg(&printer); PrintView view; view.setModel(table->model()); - connect(&dlg, SIGNAL(paintRequested(QPrinter *)), - &view, SLOT(print(QPrinter *))); + connect(&dlg, SIGNAL(paintRequested(QPrinter*)), + &view, SLOT(print(QPrinter*))); dlg.exec(); #endif } diff --git a/demos/sub-attaq/bomb.cpp b/demos/sub-attaq/bomb.cpp index acc347540d..a0096a0174 100644 --- a/demos/sub-attaq/bomb.cpp +++ b/demos/sub-attaq/bomb.cpp @@ -74,7 +74,7 @@ void Bomb::launch(Bomb::Direction direction) anim->setEndValue(QPointF(x() + delta*2,scene()->height())); anim->setDuration(y()/2*60); launchAnimation->addAnimation(anim); - connect(anim,SIGNAL(valueChanged(const QVariant &)),this,SLOT(onAnimationLaunchValueChanged(const QVariant &))); + connect(anim,SIGNAL(valueChanged(QVariant)),this,SLOT(onAnimationLaunchValueChanged(QVariant))); connect(this, SIGNAL(bombExploded()), launchAnimation, SLOT(stop())); //We setup the state machine of the bomb QStateMachine *machine = new QStateMachine(this); diff --git a/demos/sub-attaq/torpedo.cpp b/demos/sub-attaq/torpedo.cpp index 95f88e6b98..1f4ce16ea3 100644 --- a/demos/sub-attaq/torpedo.cpp +++ b/demos/sub-attaq/torpedo.cpp @@ -64,7 +64,7 @@ void Torpedo::launch() launchAnimation->setEndValue(QPointF(x(),qobject_cast<GraphicsScene *>(scene())->sealLevel() - 15)); launchAnimation->setEasingCurve(QEasingCurve::InQuad); launchAnimation->setDuration(y()/currentSpeed*10); - connect(launchAnimation,SIGNAL(valueChanged(const QVariant &)),this,SLOT(onAnimationLaunchValueChanged(const QVariant &))); + connect(launchAnimation,SIGNAL(valueChanged(QVariant)),this,SLOT(onAnimationLaunchValueChanged(QVariant))); connect(this,SIGNAL(torpedoExploded()), launchAnimation, SLOT(stop())); //We setup the state machine of the torpedo diff --git a/demos/symbianpkgrules.pri b/demos/symbianpkgrules.pri index 7e6852bd46..c511836b48 100644 --- a/demos/symbianpkgrules.pri +++ b/demos/symbianpkgrules.pri @@ -11,3 +11,5 @@ vendorinfo = \ " " default_deployment.pkg_prerules += vendorinfo + +isEmpty(ICON):ICON = $$QT_SOURCE_TREE/src/s60installs/qt.svg diff --git a/demos/textedit/textedit.cpp b/demos/textedit/textedit.cpp index b7ce94b651..a9c0f40aca 100644 --- a/demos/textedit/textedit.cpp +++ b/demos/textedit/textedit.cpp @@ -88,8 +88,8 @@ TextEdit::TextEdit(QWidget *parent) } textEdit = new QTextEdit(this); - connect(textEdit, SIGNAL(currentCharFormatChanged(const QTextCharFormat &)), - this, SLOT(currentCharFormatChanged(const QTextCharFormat &))); + connect(textEdit, SIGNAL(currentCharFormatChanged(QTextCharFormat)), + this, SLOT(currentCharFormatChanged(QTextCharFormat))); connect(textEdit, SIGNAL(cursorPositionChanged()), this, SLOT(cursorPositionChanged())); @@ -314,7 +314,7 @@ void TextEdit::setupTextActions() menu->addSeparator(); QActionGroup *grp = new QActionGroup(this); - connect(grp, SIGNAL(triggered(QAction *)), this, SLOT(textAlign(QAction *))); + connect(grp, SIGNAL(triggered(QAction*)), this, SLOT(textAlign(QAction*))); // Make sure the alignLeft is always left of the alignRight if (QApplication::isLeftToRight()) { @@ -377,8 +377,8 @@ void TextEdit::setupTextActions() comboFont = new QFontComboBox(tb); tb->addWidget(comboFont); - connect(comboFont, SIGNAL(activated(const QString &)), - this, SLOT(textFamily(const QString &))); + connect(comboFont, SIGNAL(activated(QString)), + this, SLOT(textFamily(QString))); comboSize = new QComboBox(tb); comboSize->setObjectName("comboSize"); @@ -389,8 +389,8 @@ void TextEdit::setupTextActions() foreach(int size, db.standardSizes()) comboSize->addItem(QString::number(size)); - connect(comboSize, SIGNAL(activated(const QString &)), - this, SLOT(textSize(const QString &))); + connect(comboSize, SIGNAL(activated(QString)), + this, SLOT(textSize(QString))); comboSize->setCurrentIndex(comboSize->findText(QString::number(QApplication::font() .pointSize()))); } @@ -511,7 +511,7 @@ void TextEdit::filePrintPreview() #ifndef QT_NO_PRINTER QPrinter printer(QPrinter::HighResolution); QPrintPreviewDialog preview(&printer, this); - connect(&preview, SIGNAL(paintRequested(QPrinter *)), SLOT(printPreview(QPrinter *))); + connect(&preview, SIGNAL(paintRequested(QPrinter*)), SLOT(printPreview(QPrinter*))); preview.exec(); #endif } diff --git a/dist/README b/dist/README index 529d2bda35..e7dfb192bc 100644 --- a/dist/README +++ b/dist/README @@ -52,7 +52,7 @@ documentation is available at http://qt.nokia.com/doc/. SUPPORTED PLATFORMS For a complete list of supported platforms, see -http://qt.nokia.com/doc/%VERSION%/supported-platforms.html. +http://qt.nokia.com/doc/%SHORTVERSION%/supported-platforms.html. COMMERCIAL EDITIONS @@ -65,7 +65,7 @@ the QtCore, QtGui (except QGraphicsView), QtTest, QtDBus and Qt3Support modules. For a full listing of the contents of each module, please refer to -http://qt.nokia.com/doc/%VERSION%/modules.html +http://qt.nokia.com/doc/%SHORTVERSION%/modules.html HOW TO REPORT A BUG diff --git a/dist/changes-4.6.0 b/dist/changes-4.6.0 index 3a130ca09c..887c96f9ef 100644 --- a/dist/changes-4.6.0 +++ b/dist/changes-4.6.0 @@ -73,6 +73,8 @@ New features * Support for getting return arguments in remote method invocation via QMetaMethod::invokeMethod. + - The QtScript module is now based on the 3rdparty JavaScriptCore library. It + is only available under the LGPL or a compatible license. Optimizations ------------- @@ -1153,3 +1155,10 @@ Qt for Windows CE X11: LIBS += -lX11 Mac: LIBS += -framework AppKit -framework Carbon +- QtScript: Behavior changes due to using JavaScriptCore in the back-end: + * QDateTime is no longer used for date parsing and string conversion of + Date objects; instead the (more compliant) date processing from + JavaScriptCore is used. + * RegExp objects are no longer thin wrappers around QRegExp; they are now + "proper" JavaScript RegExp objects. + diff --git a/tests/auto/qsysinfo/tst_qsysinfo.cpp b/doc/src/demos/anomaly.qdoc index 8784863d42..a2ea6777ad 100644 --- a/tests/auto/qsysinfo/tst_qsysinfo.cpp +++ b/doc/src/demos/anomaly.qdoc @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the test suite of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage @@ -39,14 +39,9 @@ ** ****************************************************************************/ +/*! + \example demos/embedded/anomaly + \title Anomaly Demonstration -#include <QtTest/QtTest> - -class tst_QSysInfo: public QObject -{ - Q_OBJECT -private slots: -}; - -QTEST_MAIN(tst_QSysInfo) -#include "tst_qsysinfo.moc" + \image anomaly-demo.png +*/ diff --git a/doc/src/demos/desktopservices.qdoc b/doc/src/demos/desktopservices.qdoc new file mode 100644 index 0000000000..2eed37be11 --- /dev/null +++ b/doc/src/demos/desktopservices.qdoc @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example demos/embedded/desktopservices + \title Embedded Desktop Services Demonstration + + \image embeddeddesktopservices-demo.png +*/ diff --git a/doc/src/demos/digiflip.qdoc b/doc/src/demos/digiflip.qdoc new file mode 100644 index 0000000000..553b11b0cf --- /dev/null +++ b/doc/src/demos/digiflip.qdoc @@ -0,0 +1,45 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example demos/embedded/digiflip + \title Digiflip Demonstration +*/ diff --git a/doc/src/demos/embeddedsvgviewer.qdoc b/doc/src/demos/embeddedsvgviewer.qdoc new file mode 100644 index 0000000000..c09b4f0bfc --- /dev/null +++ b/doc/src/demos/embeddedsvgviewer.qdoc @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example demos/embedded/embeddedsvgviewer + \title Embedded SVG Viewer Demonstration + + \image embeddedsvgviewer-demo.png +*/ diff --git a/doc/src/demos/flickable.qdoc b/doc/src/demos/flickable.qdoc new file mode 100644 index 0000000000..03ccc48115 --- /dev/null +++ b/doc/src/demos/flickable.qdoc @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example demos/embedded/flickable + \title Flickable List Demonstration + + \image flickable-demo.png +*/ diff --git a/doc/src/demos/flightinfo.qdoc b/doc/src/demos/flightinfo.qdoc new file mode 100644 index 0000000000..efe658a863 --- /dev/null +++ b/doc/src/demos/flightinfo.qdoc @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example demos/embedded/flightinfo + \title Flight Info Demonstration + + \image flightinfo-demo.png +*/ diff --git a/doc/src/demos/fluidlauncher.qdoc b/doc/src/demos/fluidlauncher.qdoc new file mode 100644 index 0000000000..20012a4eed --- /dev/null +++ b/doc/src/demos/fluidlauncher.qdoc @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example demos/embedded/fluidlauncher + \title Fluid Launcher Demonstration + + \image fluidlauncher-demo.png +*/ diff --git a/doc/src/demos/lightmaps.qdoc b/doc/src/demos/lightmaps.qdoc new file mode 100644 index 0000000000..04fde15c84 --- /dev/null +++ b/doc/src/demos/lightmaps.qdoc @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example demos/embedded/lightmaps + \title Light Maps Demonstration + + \image lightmaps-demo.png +*/ diff --git a/doc/src/demos/raycasting.qdoc b/doc/src/demos/raycasting.qdoc new file mode 100644 index 0000000000..36c61f0092 --- /dev/null +++ b/doc/src/demos/raycasting.qdoc @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example demos/embedded/raycasting + \title Ray Casting Demonstration + + \image raycasting-demo.png +*/ diff --git a/doc/src/demos/styledemo.qdoc b/doc/src/demos/styledemo.qdoc new file mode 100644 index 0000000000..44745c9216 --- /dev/null +++ b/doc/src/demos/styledemo.qdoc @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example demos/embedded/styledemo + \title Embedded Styles Demonstration + + \image styledemo-demo.png +*/ diff --git a/doc/src/demos/weatherinfo.qdoc b/doc/src/demos/weatherinfo.qdoc new file mode 100644 index 0000000000..54b273424a --- /dev/null +++ b/doc/src/demos/weatherinfo.qdoc @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example demos/embedded/weatherinfo + \title Weather Info Demonstration + + \image weatherinfo-demo.png +*/ diff --git a/doc/src/deployment/deployment.qdoc b/doc/src/deployment/deployment.qdoc index b5b1b9cf89..6a1760ee44 100644 --- a/doc/src/deployment/deployment.qdoc +++ b/doc/src/deployment/deployment.qdoc @@ -187,6 +187,7 @@ \o \l{Deploying an Application on Windows}{Qt for Windows} \o \l{Deploying an Application on Mac OS X}{Qt for Mac OS X} \o \l{Deploying Qt for Embedded Linux Applications}{Qt for Embedded Linux} + \o \l{Deploying an Application on the Symbian platform}{Qt for the Symbian platform} \endlist \sa Installation {Platform-Specific Documentation} @@ -1490,10 +1491,109 @@ \o Accessibility for Qt3Support is deployed if the application uses the Qt3Support module. \endlist - macdeployqt supports the following options: + \note If you want a 3rd party library to be included in your + application bundle, then you must add an excplicit lib entry for + that library to your application's .pro file. Otherwise, the + \c macdeployqt tool will not copy the 3rd party .dylib into the + bundle. + + \c macdeployqt supports the following options: \list - \o -no-plugins: Skip plugin deployment - \o -dmg : Create a .dmg disk image - \o -no-strip : Don't run 'strip' on the binaries - \endlist + \o -no-plugins: Skip plugin deployment + \o -dmg : Create a .dmg disk image + \o -no-strip : Don't run 'strip' on the binaries + \endlist +*/ + +/*! + \page deployment-symbian.html + \contentspage Deploying Qt Applications + + \title Deploying an Application on the Symbian platform + + Applications are deployed to Symbian devices in signed \c .sis package files. + The \c .sis file content is controlled with \c .pkg files. The \c .pkg file contains a set + of instructions used by tools to produce a \c .sis file. \c qmake generates a + default \c .pkg file for your project. The \c .pkg file generated by \c qmake is typically + fully functional for testing purposes but when planning to deliver your application + to end-users some changes are needed. This document describes what changes are + typically needed and how to implement them. + + \section1 Static Linking + + Qt for the Symbian platform does currently not support static linking of + Qt libraries. + + \section1 Shared Libraries + + When deploying the application using the shared libraries approach we must ensure that the + Qt runtime is correctly redistributed along with the application executable, + and also that all Qt dependencies are redistributed along with the application. + + We will demonstrate these procedures in terms of deploying the \l {widgets/wiggly}{Wiggly} + application that is provided in Qt's examples directory. + + \section2 Building Qt as a Shared Library + + We assume that you already have installed Qt as a shared library, + in the \c C:\path\to\Qt directory which is the default when installing Qt for Symbian. + For more information on how to build Qt, see the \l {Installation} documentation. + + \section1 Shared Libraries + + After ensuring that Qt is built as a shared library, we can build + the \l {widgets/wiggly}{Wiggly} application. First, we + must go into the directory that contains the application: + + \snippet doc/src/snippets/code/doc_src_deployment.qdoc 55 + + To prepare the application for deployment we must ensure that the \c .pkg file generated by + \c qmake contains the relevant vendor information and embeds the necessary + dependencies to the application deployment file (\c .sis). The content of the generated \c .pkg + file can be controlled with the Symbian specific \c qmake \l DEPLOYMENT keyword extensions. + + First, we will change the vendor statement to something more meaningful. The application + vendor is visible to end-user during the installation. + + \snippet doc/src/snippets/code/doc_src_deployment.qdoc 56 + + Second we will tell the Symbian application installer that this application supports + only S60 5.0 based devices: + + \snippet doc/src/snippets/code/doc_src_deployment.qdoc 57 + + You can find a list of platform and device indentification codes from + \l {http://wiki.forum.nokia.com/index.php/S60_Platform_and_device_identification_codes}{Forum Nokia Wiki}. + By default \c .pkg file generated by \c qmake adds support for all + S60 3rd edition FP1, S60 3rd edition FP2 and S60 5th edition devices. + + As a last step we will embed the Open C, Open C++ and Qt \c .sis files to the Wiggly + deployment file: + + \snippet doc/src/snippets/code/doc_src_deployment.qdoc 58 + + By embedding all dependencies to the application deployment file, the + end-user does not need to download and install all dependencies separately. + The drawback of \c .sis embedding is that the application \c .sis file size becomes + big. To address these problems Forum Nokia is planning to release a smart installer + which will take care of downloading and installing the necessary dependencies + over-the-air. The expected availability of smart installer is 1Q 2010. + + Now we are ready to compile the application and create the application + deployment file. Run \c qmake to create Symbian specific makefiles, resources (\.rss) + and deployment packaging files (\c .pkg). And do build to create the + application binaries and resources. + + \snippet doc/src/snippets/code/doc_src_deployment.qdoc 59 + + If everything compiled and linked without any errors, we are now ready to create + an application installation file: + + \snippet doc/src/snippets/code/doc_src_deployment.qdoc 60 + + If all binaries and dependencies were found, we should now have a self-signed + \c wiggly_release-gcce.sis ready to be installed on a device. For more information + about creating a \c .sis file and installing it to device see also + \l {The Symbian platform - Introduction to Qt#Installing your own applications}{here}. + */ diff --git a/doc/src/examples/blurpicker.qdoc b/doc/src/examples/blurpicker.qdoc new file mode 100644 index 0000000000..93c12bfddd --- /dev/null +++ b/doc/src/examples/blurpicker.qdoc @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example effects/blurpicker + \title Blur Picker Effect Example + + \image blurpickereffect-example.png +*/ diff --git a/doc/src/examples/fademessage.qdoc b/doc/src/examples/fademessage.qdoc new file mode 100644 index 0000000000..ecea0958df --- /dev/null +++ b/doc/src/examples/fademessage.qdoc @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example effects/fademessage + \title Fade Message Effect Example + + \image fademessageeffect-example.png +*/ diff --git a/doc/src/examples/fancybrowser.qdoc b/doc/src/examples/fancybrowser.qdoc index bc63010664..4a9eaec699 100644 --- a/doc/src/examples/fancybrowser.qdoc +++ b/doc/src/examples/fancybrowser.qdoc @@ -119,6 +119,10 @@ page is loaded. Once the jQuery library is loaded, we can start executing the different jQuery functions in the browser. + The rotateImages() function is then called explicitely to make sure + that the images of the newly loaded page respect the state of the toggle + action. + \snippet examples/webkit/fancybrowser/mainwindow.cpp 7 The first jQuery-based function, \c highlightAllLinks(), is designed to diff --git a/examples/effects/customshader/main.cpp b/doc/src/examples/fingerpaint.qdoc index dfcdcd2d4c..9c55daccee 100644 --- a/examples/effects/customshader/main.cpp +++ b/doc/src/examples/fingerpaint.qdoc @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage @@ -39,17 +39,12 @@ ** ****************************************************************************/ -#include "blurpicker.h" -#include <QApplication> +/*! + \example multitouch/fingerpaint + \title Finger Paint Example -int main(int argc, char **argv) -{ - QApplication app(argc, argv); + The Finger Paint example shows the use of multi-touch with a custom widget + to create a simple painting application. - BlurPicker blurPicker; - blurPicker.setWindowTitle(QT_TRANSLATE_NOOP(QGraphicsView, "Application Picker")); - blurPicker.setFixedSize(400, 300); - blurPicker.show(); - - return app.exec(); -} + \image multitouch-fingerpaint.png +*/ diff --git a/doc/src/examples/lighting.qdoc b/doc/src/examples/lighting.qdoc new file mode 100644 index 0000000000..8e9d1c227c --- /dev/null +++ b/doc/src/examples/lighting.qdoc @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example effects/lighting + \title Lighting Effect Example + + \image lightingeffect-example.png +*/ diff --git a/examples/effects/customshader/blureffect.h b/doc/src/examples/multitouch-dials.qdoc index 3d1d433b80..52e964cc98 100644 --- a/examples/effects/customshader/blureffect.h +++ b/doc/src/examples/multitouch-dials.qdoc @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage @@ -39,29 +39,12 @@ ** ****************************************************************************/ -#ifndef BLUREFFECT_H -#define BLUREFFECT_H +/*! + \example multitouch/dials + \title Multi-Touch Dials Example -#include <QGraphicsEffect> -#include <QGraphicsItem> + The Multi-Touch Dials example shows how to apply multi-touch to a set of + standard Qt widgets. -class BlurEffect: public QGraphicsBlurEffect -{ -public: - BlurEffect(QGraphicsItem *item); - - void setBaseLine(qreal y) { m_baseLine = y; } - - QRectF boundingRect() const; - - void draw(QPainter *painter); - -private: - void adjustForItem(); - -private: - qreal m_baseLine; - QGraphicsItem *item; -}; - -#endif // BLUREFFECT_H + \image multitouch-dials-example.png +*/ diff --git a/doc/src/examples/multitouch-knobs.qdoc b/doc/src/examples/multitouch-knobs.qdoc new file mode 100644 index 0000000000..d0c537c543 --- /dev/null +++ b/doc/src/examples/multitouch-knobs.qdoc @@ -0,0 +1,50 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example multitouch/knobs + \title Multi-Touch Knobs Example + + The Multi-Touch Knobs example shows how to create custom controls that + accept multi-touch input. + + \image multitouch-knobs-example.png +*/ diff --git a/doc/src/examples/openvg-star.qdoc b/doc/src/examples/openvg-star.qdoc new file mode 100644 index 0000000000..7c78e1286b --- /dev/null +++ b/doc/src/examples/openvg-star.qdoc @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example openvg/star + \title OpenVG Star Example + + The OpenVG Star example demonstrates the use of Qt's OpenVG integration. +*/ diff --git a/doc/src/examples/pinchzoom.qdoc b/doc/src/examples/pinchzoom.qdoc new file mode 100644 index 0000000000..ff8c811f85 --- /dev/null +++ b/doc/src/examples/pinchzoom.qdoc @@ -0,0 +1,50 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example multitouch/pinchzoom + \title Pinch Zoom Example + + The Pinch Zoom example shows how to use low-level multi-touch information + to recognize a gesture. + + \image multitouch-pinchzoom.png +*/ diff --git a/doc/src/external-resources.qdoc b/doc/src/external-resources.qdoc index f96586994e..cd99505361 100644 --- a/doc/src/external-resources.qdoc +++ b/doc/src/external-resources.qdoc @@ -417,3 +417,8 @@ \externalpage http://www.w3.org/TR/REC-CSS2/selector.html#q1 \title Standard CSS2 selector */ + +/*! + \externalpage http://www.w3.org/XML/Schema + \title XML Schema +*/ diff --git a/doc/src/frameworks-technologies/graphicsview.qdoc b/doc/src/frameworks-technologies/graphicsview.qdoc index 1503f53942..ba89c7d802 100644 --- a/doc/src/frameworks-technologies/graphicsview.qdoc +++ b/doc/src/frameworks-technologies/graphicsview.qdoc @@ -437,13 +437,10 @@ \section2 Animation Graphics View supports animation at several levels. You can easily - assemble animation paths by associating a QGraphicsItemAnimation with - your item. This allows timeline controlled animations that operate at - a steady speed on all platforms (although the frame rate may vary - depending on the platform's performance). QGraphicsItemAnimation - allows you to create a path for an item's position, rotation, scale, - shear and translation. The animation can be controlled by a QSlider, - or more commonly by QTimeLine. + assemble animation by using the Animation Framework. For that you'll + need your items to inherit from QGraphicsObject and associate + QPropertyAnimation with them. QPropertyAnimation allows to animate any + QObject property. Another option is to create a custom item that inherits from QObject and QGraphicsItem. The item can the set up its own timers, and control @@ -454,9 +451,6 @@ QGraphicsScene::advance(), which in turn calls QGraphicsItem::advance(). - See also the \l{Drag and Drop Robot Example}{Drag and Drop Robot} - example for an illustration of timeline-based animation techniques. - \section2 OpenGL Rendering To enable OpenGL rendering, you simply set a new QGLWidget as the diff --git a/doc/src/getting-started/demos.qdoc b/doc/src/getting-started/demos.qdoc index 8f2829a639..524f27c6ac 100644 --- a/doc/src/getting-started/demos.qdoc +++ b/doc/src/getting-started/demos.qdoc @@ -163,4 +163,31 @@ \note The Phonon demos are currently not available for the MinGW platform. + \section1 Animation + + \list + \o \l{demos/sub-attaq}{Sub-Attaq} demonstrates the features of the + \l{The Animation Framework}{animation framework} and + \l{The State Machine Framework}{state machine framework} in the production of + a simple game. + \endlist + + \section1 Embedded Platforms + + \list + \o \l{demos/embedded/anomaly}{Anomaly} is a small screen browser with kinetic scrolling. + \o \l{demos/embedded/desktopservices}{Embedded Desktop Services} shows how to open + documents using the applications associated with their file types. + \o \l{demos/embedded/digiflip}{Digiflip} is a digital watch with transition effects. + \o \l{demos/embedded/embeddedsvgviewer}{Embedded SVG Viewer} shows how to display SVG + drawings on embedded devices. + \o \l{demos/embedded/flickable}{Flickable List} shows how to display a list with kinetic scrolling. + \o \l{demos/embedded/flightinfo}{Flight Info} fetches information about aircraft flights from the Web. + \o \l{demos/embedded/fluidlauncher}{Fluid Launcher} demo application launcher for embedded screens + \o \l{demos/embedded/lightmaps}{Light Maps} demonstrates OpenStreetMap integration with WebKit. + \o \l{demos/embedded/raycasting}{Ray Casting} demonstrates the use of ray casting with the + \l{The Graphics View Framework}{Graphics View} framework. + \o \l{demos/embedded/styledemo}{Embedded Styles} demonstrates the use of styles. + \o \l{demos/embedded/weatherinfo}{Weather Info} fetches weather information from the Web. + \endlist */ diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc index b5dc03d0a6..f0a67998e0 100644 --- a/doc/src/getting-started/examples.qdoc +++ b/doc/src/getting-started/examples.qdoc @@ -206,7 +206,7 @@ \o \row - \o{2,1} \l{OpenGL Examples}{\bold OpenGL} + \o{2,1} \l{OpenGL Examples}{\bold{OpenGL}}\bold{ and }\l{OpenVG Examples}{\bold{OpenVG}}\bold{ Examples} \o{2,1} \l{Multimedia Examples}{\bold{Multimedia Framework}} \row \o \image opengl-examples.png OpenGL @@ -215,6 +215,9 @@ platforms, giving developers the opportunity to display hardware accelerated 3D graphics alongside a more conventional user interface. + Qt provides support for integration with OpenVG implementations on + platforms with suitable drivers. + \o \image phonon-examples.png \o Qt provides low-level audio support on linux,windows and mac platforms by default and @@ -299,37 +302,47 @@ to build highly animated, high-performance GUIs. \row + \o{2,1} \l{Multi-Touch Examples}{\bold{Multi-Touch Framework}} \o{2,1} \l{Gestures Examples}{\bold{Gestures}} - \o{2,1} \l{D-Bus Examples}{\bold{D-Bus}} + \row + \o \image multitouch-examples.png + \o + Support for multi-touch input makes it possible for developers to create + extensible and intuitive user interfaces. + \o \image gestures-examples.png \o Applications can be written to respond to gestures as a natural input method. These examples show how to enable support for standard and custom gestures in applications. - \o \image dbus-examples.png D-Bus - \o - D-Bus is an inter-process communication protocol for Unix/Linux systems. - These examples demonstrate how to write application that communicate with - each other. \row + \o{2,1} \l{D-Bus Examples}{\bold{D-Bus}} \o{2,1} \l{Qt for Embedded Linux Examples}{\bold{Qt for Embedded Linux}} - \o{2,1} \l{ActiveQt Examples}{\bold ActiveQt} + \row \o \image qt-embedded-examples.png \o Systems with limited resources, specialized hardware, and small screens require special attention. - \o \image activeqt-examples.png ActiveQt + \o \image dbus-examples.png D-Bus \o - These examples demonstrate how to write ActiveX controls and control servers - with Qt, and how to use ActiveX controls and COM objects in a Qt application. + D-Bus is an inter-process communication protocol for Unix/Linux systems. + These examples demonstrate how to write application that communicate with + each other. \row + \o{2,1} \l{ActiveQt Examples}{\bold ActiveQt} \o{2,1} \l{Qt Quarterly}{\bold{Qt Quarterly}} + \row + \o \image activeqt-examples.png ActiveQt + \o + These examples demonstrate how to write ActiveX controls and control servers + with Qt, and how to use ActiveX controls and COM objects in a Qt application. + \o \image qq-thumbnail.png QtQuarterly \o One more valuable source for examples and explanations of Qt @@ -777,7 +790,7 @@ \previouspage Inter-Process Communication Examples \contentspage Qt Examples - \nextpage Multimedia Examples + \nextpage OpenVG Examples \image opengl-examples.png @@ -794,6 +807,7 @@ \o \l{opengl/framebufferobject2}{Framebuffer Object 2} \o \l{opengl/grabber}{Grabber} \o \l{opengl/hellogl}{Hello GL}\raisedaster + \o \l{opengl/hellogl_es}{Hello GL - ported to Windows CE}\raisedaster \o \l{opengl/overpainting}{Overpainting}\raisedaster \o \l{opengl/pbuffers}{Pixel Buffers} \o \l{opengl/pbuffers2}{Pixel Buffers 2} @@ -805,6 +819,27 @@ */ /*! + \page examples-openvg.html + \title OpenVG Examples + + \previouspage OpenGL Examples + \contentspage Qt Examples + \nextpage Multimedia Examples + + \image openvg-examples.png + + Qt provides support for integration with OpenVG implementations on + platforms with suitable drivers. + + These examples demonstrate the basic techniques used to take advantage of + OpenVG in Qt applications. + + \list + \o \l{openvg/star}{OpenVG Star} + \endlist +*/ + +/*! \page examples-multimedia.html \title Multimedia Examples @@ -1095,7 +1130,7 @@ \previouspage State Machine Examples \contentspage Qt Examples - \nextpage Gestures Examples + \nextpage Multi-Touch Examples \image animation-examples.png Animation @@ -1112,10 +1147,29 @@ */ /*! + \page examples-multitouch.html + \title Multi-Touch Examples + + \previouspage Animation Framework Examples + \contentspage Qt Examples + \nextpage Gestures Examples + + Support for multi-touch input makes it possible for developers to create + extensible and intuitive user interfaces. + + \list + \o \l{multitouch/dials}{Multi-Touch Dials} + \o \l{multitouch/fingerpaint}{Finger Paint} + \o \l{multitouch/knobs}{Multi-Touch Knobs} + \o \l{multitouch/pinchzoom}{Pinch Zoom} + \endlist +*/ + +/*! \page examples-gestures.html \title Gestures Examples - \previouspage Animation Framework Examples + \previouspage Multi-Touch Examples \contentspage Qt Examples \nextpage D-Bus Examples diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc index c8e225c3bb..057629dfbc 100644 --- a/doc/src/getting-started/installation.qdoc +++ b/doc/src/getting-started/installation.qdoc @@ -495,12 +495,12 @@ in the \l{Qt for Windows CE Requirements} document. */ /*! \page install-Symbian-installer.html -\title Installing Qt on the Symbian Platform from a Binary Package -\ingroup qts60 +\title Installing Qt on the Symbian platform from a Binary Package +\ingroup qtsymbian \brief How to install Qt on the Symbian platform from a binary package. -\note Qt for Symbian platform has some requirements that are given in more detail -in the \l{Qt for Symbian platform Requirements} document. +\note Qt for the Symbian platform has some requirements that are given in more detail +in the \l{Qt for the Symbian platform Requirements} document. \list 1 @@ -517,13 +517,16 @@ in the \l{Qt for Symbian platform Requirements} document. to try out. An excellent starting point is the "fluidlauncher" demo. To run the demo on a real device, you first have to install \c{qt.sis} and \c{fluidlauncher.sis} found in the Qt installation - directory. Begin by connecting your phone using the USB cable and - selecting "PC Suite mode". In Windows Explorer right click on the - \c{.sis} files and select "Install with Nokia Application Installer" + directory. Also, check if the device needs additional + \l{Qt for the Symbian platform Requirements}{requirements}. + Begin by connecting your device via USB cable to a computer that has + the \l{http://www.nokia.com/pcsuite}{Nokia PC Suite} installed. + On the device, select "PC Suite mode". In Windows Explorer right click + on the \c{.sis} files, select "Install with Nokia Application Installer" and follow the instructions. To run the demos and examples on the emulator, you need to build them first. - Open the "Qt for Symbian platform Command Prompt" from the Start menu and type: + Open the "Qt for the Symbian platform Command Prompt" from the Start menu and type: \snippet doc/src/snippets/code/doc_src_installation.qdoc 25 @@ -534,7 +537,7 @@ in the \l{Qt for Symbian platform Requirements} document. For more information about building and running Qt programs on the Symbian platform, - see \l{Symbian platform - Introduction to Qt}. + see \l{The Symbian platform - Introduction to Qt}. We hope you will enjoy using Qt. @@ -542,25 +545,40 @@ Symbian platform, */ /*! \page install-Symbian.html -\title Installing Qt on the Symbian Platform +\title Installing Qt on the Symbian platform \ingroup installation -\ingroup qts60 +\ingroup qtsymbian \brief How to install Qt on the Symbian platform. \note Qt for the Symbian platform has some requirements that are given in more detail -in the \l{Qt for Symbian Platform Requirements} document. +in the \l{Qt for the Symbian platform Requirements} document. \note \bold {This document describes how to install and configure Qt for the Symbian platform from scratch. If you are using pre-built binaries, follow the instructions given in the -\l{Installing Qt on the Symbian Platform from a Binary Package} document.} +\l{Installing Qt on the Symbian platform from a Binary Package} document.} \list 1 + \o Setup the development environment + + Make sure your Symbian development environment is correctly installed and + patched as explained in the \l{Qt for the Symbian platform Requirements} document. + + After you have finished the Symbian development environment setup, it is good + to verify that environment is functional for example by compiling one + of the pure Symbian examples for both emulator and HW. This can be done from + command prompt as follows: + + \snippet doc/src/snippets/code/doc_src_installation.qdoc 32 + + If all steps pass without errors your Symbian development environment is + very likely installed correctly. + \o Install Qt - Uncompress the package into the directory you want Qt installed, - e.g. \c{C:\Qt\%VERSION%}. + Uncompress the \l{http://qt.nokia.com/downloads}{downloaded} source package into the + directory you want Qt installed, e.g. \c{C:\Qt\%VERSION%}. \note Qt must be installed on the same drive as the Symbian SDK you are using, and the install path must not contain any spaces. @@ -581,6 +599,13 @@ If you are using pre-built binaries, follow the instructions given in the emulator. This is done by locating the Carbide.c++ submenu on the Start menu, and choosing "Configure environment for WINSCW command line". + If you are planning to use abld (the default build system that comes with the S60 SDK) + to build Qt, you will also need to set the following environment variable: + + \snippet doc/src/snippets/code/doc_src_installation.qdoc 33 + + This is not necessary for other applications, only when building Qt. + \o Configure Qt To configure Qt for the Symbian platform, do: @@ -589,10 +614,11 @@ If you are using pre-built binaries, follow the instructions given in the to build the tools using MinGW, and the libraries using abld. or \snippet doc/src/snippets/code/doc_src_installation.qdoc 31 - to build the tools using MinGW, and the libraries using sbsv2. + to build the tools using MinGW, and the libraries using SBSv2. - For other options, type \c{configure -help} to get a list of all available - options. + SBSv2 also known as a (\l{http://developer.symbian.org/wiki/index.php/Introduction_to_RAPTOR} {Raptor}) + is a next-generation Symbian build system. SBSv2 is not officially + supported by any of the S60 SDKs currently available from Forum Nokia. \o Build Qt @@ -631,7 +657,7 @@ If you are using pre-built binaries, follow the instructions given in the \snippet doc/src/snippets/code/doc_src_installation.qdoc 27 For more information about building and running Qt programs on the -Symbian platform, see \l{Symbian platform - Introduction to Qt}. + Symbian platform, see \l{The Symbian platform - Introduction to Qt}. We hope you will enjoy using Qt. @@ -666,7 +692,7 @@ Symbian platform, see \l{Symbian platform - Introduction to Qt}. \list \o \l{Qt for Embedded Linux Requirements} \o \l{Qt for Mac OS X Requirements} - \o \l{Qt for Symbian platform Requirements} + \o \l{Qt for the Symbian platform Requirements} \o \l{Qt for Windows CE Requirements} \o \l{Qt for Windows Requirements} \o \l{Qt for X11 Requirements} @@ -951,12 +977,12 @@ Symbian platform, see \l{Symbian platform - Introduction to Qt}. /*! \page requirements-symbian.html - \title Qt for Symbian Platform Requirements + \title Qt for the Symbian platform Requirements \ingroup installation \brief Setting up the Symbian platform environment for Qt. \previouspage General Qt Requirements - Qt for Symbian platform requires the following software installed on your development PC: + Qt for the Symbian platform requires the following software installed on your development PC: \list \o \l{http://www.forum.nokia.com/main/resources/tools_and_sdks/carbide_cpp/}{Carbide.c++ v2.0.0 or higher} \list @@ -969,7 +995,11 @@ Symbian platform, see \l{Symbian platform - Introduction to Qt}. \o \bold{Note:} According to Symbian, version 5.6.1 build 638 is mandatory. Using later versions may result in unexplained errors. \endlist \o \l{http://www.forum.nokia.com/main/resources/tools_and_sdks/S60SDK/}{S60 Platform SDK 3rd Edition FP1 or higher} - \o \l{http://www.forum.nokia.com/main/resources/technologies/openc_cpp/}{Open C/C++ v1.6.0 or higher}. + \list + \o \bold{Note:} Users of \bold{S60 Platform SDK 3rd Edition FP1} also need special update. The update can be found + \l{http://pepper.troll.no/s60prereleases/patches/}{here}. + \endlist + \o \l{http://www.forum.nokia.com/main/resources/technologies/openc_cpp/}{Open C/C++ v1.6.0 or higher}. Install this to all Symbian SDKs you plan to use Qt with. \o Building Qt tools from scratch requires \l{http://www.mingw.org/}{MinGW 3.4.5 or higher}, or another windows compiler. \list @@ -987,8 +1017,8 @@ Symbian platform, see \l{Symbian platform - Introduction to Qt}. \o \c{nokia_plugin\opencpp\s60opencppsis\stdcpp_s60_<version>.sis} \endlist - \note Users of \bold{S60 Platform SDK 3rd Edition FP1} also need special updates. The update can be found - \l{http://pepper.troll.no/s60prereleases/patches/}{here}. + We recommend you to take a look of \l{http://developer.symbian.org/wiki/index.php/Qt_Quick_Start}{Symbian Foundation - Qt Quick Start} + to get more information about how to setup the development environment. \sa {Known Issues in %VERSION%} */ diff --git a/doc/src/getting-started/known-issues.qdoc b/doc/src/getting-started/known-issues.qdoc index 5c8888d9a3..b8c219255f 100644 --- a/doc/src/getting-started/known-issues.qdoc +++ b/doc/src/getting-started/known-issues.qdoc @@ -61,27 +61,33 @@ \section2 Installing the Source Package on Unix systems + \list + \o If you download a Zip source package, you will need to convert Windows-style line endings (CR/LF) to Unix-style line-endings (LF) when you uncompress the package. To do this, give the "-a" option when you run the "unzip' command. - - If you fail to supply the "-a" option when unzipping the package, you + + \o If you fail to supply the "-a" option when unzipping the package, you will see the following error message when you attempt to execute the configure command: "bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory" + \endlist \section2 Installing on Mac OS X 10.6 "Snow Leopard" + \list + \o Performing a new install of the Qt 4.6 beta on Snow Leopard triggers a bug in the installer that causes the install to fail. Updating an existing Qt installation works fine. - There are two workarounds, either disable spotlight for the target + \o There are two workarounds, either disable spotlight for the target drive during the install, or do a custom install where you deselect documentation and examples. Run the installer again as a full install to get the documentation and examples installed. + \endlist \section1 Issues with Third Party Software @@ -107,6 +113,7 @@ \section2 Windows \list + \o When using version 6.14.11.6921 of the NVIDIA drivers for the GeForce 6600 GT under Windows XP, Qt applications which use drag and drop will display reduced size drag and drop icons when run alongside @@ -122,13 +129,27 @@ \o A bug in the Firebird database can cause an application to crash when \c{fbembed.dll} is unloaded. The bug is fixed in version 2.5. + \o On Windows 7, resizing windows is slower than on Vista/Xp. This is because + the gesture initialization process (required for native gesture support) + currently calls winId() on widgets, which causes whole widget hierarchies + to use native window handles. This slows down resizing. + \endlist \section2 Mac OS X \list + \o If a sheet is opened for a given window, clicking the title bar of that window will cause it to flash. This behavior has been reported to Apple (bug number 5827676). + + \endlist + + \section2 Symbian + + \list + \o Check known issues for Symbian at + \l{http://qt.gitorious.org/qt/pages/Qt460KnownIssues} {Known Issues Wiki}. \endlist */ diff --git a/doc/src/howtos/HWacceleration.qdoc b/doc/src/howtos/HWacceleration.qdoc new file mode 100644 index 0000000000..80db740836 --- /dev/null +++ b/doc/src/howtos/HWacceleration.qdoc @@ -0,0 +1,100 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \page HWAcc_rendering.html + \title Using hardware acceleration on embedded platforms. + + \ingroup best-practices + + \section1 Abstract + This document describes how to use hardware acceleration for fast + rendering on embedded platforms supported by Qt. In short, it explains + how the graphics pipeline works. Since there might be differences to + how the APIs are being used on different embedded platforms, a table + links to documentation dedicated to platform specific documentation + for each supported hardware acceleration API. + + \input platforms/emb-hardwareacceleration.qdocinc + + \section1 Supported platforms + Since there might be differences to how the APIs are being used on + the different embedded platforms, this table provides you with links to + pages dedicated to platform specific documentation for each + supported hardware acceleration API. Click the API link for the + platform to go the correct documentation. + + \table + \header + \o Operating System + \o {3,1} Hardware Acceleration Platform + \row + \o \bold {Windows CE} + \o \l {Qt for Windows CE and OpenGL ES}{OpenGL ES} + \o \l {Qt for Windows CE and OpenVG}{OpenVG} + \o + \row + \o \bold {Embedded Linux} + \o \l {Qt for Embedded Linux and OpenGL}{OpenGL ES} + \o \l {Qt for Embedded Linux and OpenVG}{OpenVG} + \o \l {Qt for Embedded Linux and DirectFB}{DirectFB} + \row + \o \bold {Symbian Platform} + \o {3,1} \e {There are currently no support for hardware + acceleration.} + \endtable +\omit + \section1 Examples using hardware acceleration on embedded platforms. + + \table + \header + \o Embedded Platform + \o Example + \row + \o Windows CE + \row + \o Embedded Linux + \endtable +\endomit + + + +*/ diff --git a/doc/src/howtos/exceptionsafety.qdoc b/doc/src/howtos/exceptionsafety.qdoc index fa1427be5b..2f561a0563 100644 --- a/doc/src/howtos/exceptionsafety.qdoc +++ b/doc/src/howtos/exceptionsafety.qdoc @@ -147,7 +147,7 @@ \section2 The Symbian platform The Symbian platform implements its own exception system that differs from the standard - C++ mechanism. When using Qt for Symbian platform, and especially when writing code to + C++ mechanism. When using Qt for the Symbian platform, and especially when writing code to access Symbian functionality directly, it may be necessary to know about the underlying implementation and how it interacts with Qt. diff --git a/doc/src/images/anomaly-demo.png b/doc/src/images/anomaly-demo.png Binary files differnew file mode 100644 index 0000000000..a26e7058da --- /dev/null +++ b/doc/src/images/anomaly-demo.png diff --git a/doc/src/images/blurpickereffect-example.png b/doc/src/images/blurpickereffect-example.png Binary files differnew file mode 100644 index 0000000000..88943385e2 --- /dev/null +++ b/doc/src/images/blurpickereffect-example.png diff --git a/doc/src/images/embeddeddesktopservices-demo.png b/doc/src/images/embeddeddesktopservices-demo.png Binary files differnew file mode 100644 index 0000000000..c1408c1f81 --- /dev/null +++ b/doc/src/images/embeddeddesktopservices-demo.png diff --git a/doc/src/images/embeddedsvgviewer-demo.png b/doc/src/images/embeddedsvgviewer-demo.png Binary files differnew file mode 100644 index 0000000000..0b806d6198 --- /dev/null +++ b/doc/src/images/embeddedsvgviewer-demo.png diff --git a/doc/src/images/fademessageeffect-example-faded.png b/doc/src/images/fademessageeffect-example-faded.png Binary files differnew file mode 100644 index 0000000000..ea66d2c7f0 --- /dev/null +++ b/doc/src/images/fademessageeffect-example-faded.png diff --git a/doc/src/images/fademessageeffect-example.png b/doc/src/images/fademessageeffect-example.png Binary files differnew file mode 100644 index 0000000000..823c85101d --- /dev/null +++ b/doc/src/images/fademessageeffect-example.png diff --git a/doc/src/images/flickable-demo.png b/doc/src/images/flickable-demo.png Binary files differnew file mode 100644 index 0000000000..98f3a6940f --- /dev/null +++ b/doc/src/images/flickable-demo.png diff --git a/doc/src/images/flightinfo-demo.png b/doc/src/images/flightinfo-demo.png Binary files differnew file mode 100644 index 0000000000..4e9a4b2ba1 --- /dev/null +++ b/doc/src/images/flightinfo-demo.png diff --git a/doc/src/images/fluidlauncher-demo.png b/doc/src/images/fluidlauncher-demo.png Binary files differnew file mode 100644 index 0000000000..1720890cd2 --- /dev/null +++ b/doc/src/images/fluidlauncher-demo.png diff --git a/doc/src/images/lightingeffect-example.png b/doc/src/images/lightingeffect-example.png Binary files differnew file mode 100644 index 0000000000..d9dc990481 --- /dev/null +++ b/doc/src/images/lightingeffect-example.png diff --git a/doc/src/images/lightmaps-demo.png b/doc/src/images/lightmaps-demo.png Binary files differnew file mode 100644 index 0000000000..f066f939d4 --- /dev/null +++ b/doc/src/images/lightmaps-demo.png diff --git a/doc/src/images/multitouch-dials-example.png b/doc/src/images/multitouch-dials-example.png Binary files differnew file mode 100644 index 0000000000..60e1776fc3 --- /dev/null +++ b/doc/src/images/multitouch-dials-example.png diff --git a/doc/src/images/multitouch-examples.png b/doc/src/images/multitouch-examples.png Binary files differnew file mode 100644 index 0000000000..b053cf371c --- /dev/null +++ b/doc/src/images/multitouch-examples.png diff --git a/doc/src/images/multitouch-knobs-example.png b/doc/src/images/multitouch-knobs-example.png Binary files differnew file mode 100644 index 0000000000..1cbd90d101 --- /dev/null +++ b/doc/src/images/multitouch-knobs-example.png diff --git a/doc/src/images/multitouch-pinchzoom-example.png b/doc/src/images/multitouch-pinchzoom-example.png Binary files differnew file mode 100644 index 0000000000..1079fb252b --- /dev/null +++ b/doc/src/images/multitouch-pinchzoom-example.png diff --git a/doc/src/images/raycasting-demo.png b/doc/src/images/raycasting-demo.png Binary files differnew file mode 100644 index 0000000000..53c5253f53 --- /dev/null +++ b/doc/src/images/raycasting-demo.png diff --git a/doc/src/images/styledemo-demo.png b/doc/src/images/styledemo-demo.png Binary files differnew file mode 100644 index 0000000000..8e4ec9021f --- /dev/null +++ b/doc/src/images/styledemo-demo.png diff --git a/doc/src/images/weatherinfo-demo.png b/doc/src/images/weatherinfo-demo.png Binary files differnew file mode 100644 index 0000000000..3183aa408e --- /dev/null +++ b/doc/src/images/weatherinfo-demo.png diff --git a/doc/src/legal/3rdparty.qdoc b/doc/src/legal/3rdparty.qdoc index 974b2c4a9a..f1c1847e9b 100644 --- a/doc/src/legal/3rdparty.qdoc +++ b/doc/src/legal/3rdparty.qdoc @@ -114,6 +114,35 @@ FreeType-2, it has been modified in various other ways.} -- quoted from \c src/3rdparty/harfbuzz/README. + \hr + + Copyright (C) 2004,2007 Red Hat, Inc.\br + Copyright (C) 1998-2004 David Turner and Werner Lemberg\br + Copyright (C) 2006 Behdad Esfahbod\br + Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) + + This is part of HarfBuzz, an OpenType Layout engine library. + + Permission is hereby granted, without written agreement and without + license or royalty fees, to use, copy, modify, and distribute this + software and its documentation for any purpose, provided that the + above copyright notice and the following two paragraphs appear in + all copies of this software. + + IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + DAMAGE. + + THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + + \hr + See \c src/3rdparty/harfbuzz/COPYING.FTL and src/3rdparty/harfbuzz/COPYING.GPL for license details. @@ -257,7 +286,9 @@ \hr Copyright (c) 1996-1997 Sam Leffler\br - Copyright (c) 1996 Pixar + Copyright (c) 1996 Pixar\br + Copyright (c) 1991-1997 Silicon Graphics, Inc.\br + Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu> Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided @@ -280,6 +311,27 @@ \hr + Copyright (c) 1985, 1986 The Regents of the University of California.\br + All rights reserved. + + This code is derived from software contributed to Berkeley by + James A. Woods, derived from original work by Spencer Thomas + and Joseph Orost. + + Redistribution and use in source and binary forms are permitted + provided that the above copyright notice and this paragraph are + duplicated in all such forms and that any documentation, + advertising materials, and other materials related to such + distribution and use acknowledge that the software was developed + by the University of California, Berkeley. The name of the + University may not be used to endorse or promote products derived + from this software without specific prior written permission. + THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + \hr + See \c src/3rdparty/libtiff/COPYRIGHT for license details. \section1 Wintab API (\c wintab) @@ -297,4 +349,24 @@ src/3rdparty/zlib/README. See \c src/3rdparty/zlib/README for license details. + + \section1 JavaScriptCore + + \hr + + Copyright (c) 1991, 2000, 2001 by Lucent Technologies.\br + Copyright (C) 2002, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. + + Permission to use, copy, modify, and distribute this software for any + purpose without fee is hereby granted, provided that this entire notice + is included in all copies of any software which is or includes a copy + or modification of this software and in all copies of the supporting + documentation for such software. + + THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED + WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY + REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY + OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. + + See \c src/3rdparty/webkit/JavaScriptCore/wtf/dtoa.cpp for license details. */ diff --git a/doc/src/legal/licenses.qdoc b/doc/src/legal/licenses.qdoc index 11a84d225c..3f24fc535e 100644 --- a/doc/src/legal/licenses.qdoc +++ b/doc/src/legal/licenses.qdoc @@ -269,6 +269,467 @@ \list \o examples/webkit/fancybrowser/jquery.min.js \endlist + + \hr + + Copyright (C) Research In Motion Limited 2009. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met:\br + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer.\br + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution.\br + * Neither the name of Research In Motion Limited nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY Research In Motion Limited ''AS IS'' AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL Research In Motion Limited BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + \list + \o src/corelib/io/qurl.cpp + \endlist + + \hr + + Copyright (c) 2007-2008, Apple, Inc.\br + Copyright (C) 2008 Cameron Zwarich <cwzwarich@uwaterloo.ca>\br + Copyright (C) 2009 Google Inc. All rights reserved.\br + Copyright (C) 2008, 2009 Paul Pedriana <ppedriana@ea.com>. All rights reserved.\br + Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com)\br + Copyright (C) 2009 Jian Li <jianli@chromium.org>\br + Copyright (C) 2007 Staikos Computing Services Inc.\br + Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)\br + Copyright (C) 2008 Nuanti Ltd.\br + Copyright (C) 2007 David Smith (catfish.man@gmail.com)\br + Copyright (C) 2008 Tony Chang <idealisms@gmail.com>\br + Copyright (C) 2007 Graham Dennis (graham.dennis@gmail.com) + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of Apple, Inc. nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + \list + \o Parts of WebKit used by the QtWebKit module + \endlist + + \hr + + Copyright (C) 1999 Serika Kurusugawa, All rights reserved.\br + Copyright (C) 1999-2000 Mizi Research Inc. All rights reserved.\br + Copyright (C) 2004, 2005 Daniel M. Duley\br + Copyright (C) 2000 Ming-Che Chuang\br + Copyright (C) 2001, 2002 James Su, Turbolinux Inc.\br + Copyright (C) 2002 WU Yi, HancomLinux Inc.\br + Copyright (C) 2001, 2002 Anthony Fok, ThizLinux Laboratory Ltd.\br + Copyright (c) 2000 Hans Petter Bieker. All rights reserved.\br + Copyright (C) 2001, 2002 ThizLinux Laboratory Ltd.\br + Copyright (C) 2001, 2002 Turbolinux, Inc. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + \list + \o Parts of the codecs implemented by Qt + \endlist + + \hr + + Copyright (c) 1992, 1993\br + The Regents of the University of California. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgment: + This product includes software developed by the University of + California, Berkeley and its contributors. + 4. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + \list + \o src/corelib/tools/qlocale.cpp + \endlist + + \hr + + Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,\br + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer.\br + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution.\br + * Neither the name of the author nor the names of contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + \list + \o Parts of WebKit used by the QtWebKit module + \endlist + + \hr + + Copyright (C) 2005, 2007, 2008 by George Williams + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + \list + \o Parts of the FreeType library + \endlist + + \hr + + Copyright (C) 2006 Apple Computer, Inc. All rights reserved.\br + Copyright (C) 2007 Eric Seidel <eric@webkit.org>\br + Copyright (C) 2008 Kelvin W Sherlock (ksherlock@gmail.com)\br + Copyright (C) 2008 Alp Toker <alp@atoker.com>\br + Copyright (C) 2009 University of Szeged\br + Copyright (C) 2007 Alexey Proskuryakov (ap@nypop.com)\br + Copyright (C) 2009 Daniel Bates (dbates@intudata.com)\br + Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org>\br + Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com\br + Copyright (C) 2007 Holger Hans Peter Freyther\br + Copyright (C) 2008 Collabora Ltd. All rights reserved.\br + Copyright (C) 2006 Dirk Mueller <mueller@kde.org>\br + Copyright (C) 2006 Zack Rusin <zack@kde.org>\br + Copyright (C) 2006 George Staikos <staikos@kde.org>\br + Copyright (C) 2006 Simon Hausmann <hausmann@kde.org>\br + Copyright (C) 2006 Rob Buis <buis@kde.org>\br + Copyright (C) 2008 Julien Chaffraix <jchaffraix@webkit.org>\br + Copyright (C) 2007 Henry Mason (hmason@mac.com)\br + Copyright (C) 1999 Lars Knoll (knoll@kde.org)\br + Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)\br + Copyright (c) 2009 The Android Open Source Project\br + Copyright (C) 2008 Dirk Schulze <krit@webkit.org>\br + Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)\br + Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com>\br + Copyright (C) 2009 280 North Inc. All Rights Reserved.\br + Copyright (C) 2009 Joseph Pecoraro\br + Copyright (C) 2008 Anthony Ricaud (rik24d@gmail.com)\br + Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>\br + Copyright (C) 2008 Christian Dywan <christian@imendio.com>\br + Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com \br + Copyright (C) 2009 Holger Hans Peter Freyther\br + Copyright (C) 2008 Google Inc. All rights reserved.\br + Copyright (C) 2006 Friedemann Kleint <fkleint@trolltech.com>\br + Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>\br + Copyright (C) 2008 Collin Jackson <collinj@webkit.org>\br + Copyright (C) 2007 Staikos Computing Services Inc. <info@staikos.net>\br + Copyright (C) 2008 Kevin Ollivier <kevino@theolliviers.com> All Rights Reserved.\br + Copyright (C) 2005 Frerich Raabe <raabe@kde.org>\br + Copyright (C) 2005 Maksim Orlovich <maksim@kde.org>\br + Copyright (C) 2005, 2006 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>.\br + Copyright (C) 2007-2009 Torch Mobile, Inc. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer.\br + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + \list + \o Parts of WebKit used by the QtWebKit module + \endlist + + \hr + + Copyright (C) 2009 University of Szeged\br + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer.\br + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY UNIVERSITY OF SZEGED ``AS IS'' AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL UNIVERSITY OF SZEGED OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + \list + \o Parts of WebKit used by the QtWebKit module + \endlist + + \hr + + Copyright (C) 2002 Michael Ringgaard. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer.\br + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution.\br + 3. Neither the name of the project nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + \list + \o src/3rdparty/ce-compat/ce_time.c + \endlist + + \hr + + Copyright (c) 1997-2005 University of Cambridge. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the name of Apple + Inc. nor the names of their contributors may be used to endorse or + promote products derived from this software without specific prior + written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + + \list + \o Parts of WebKit used by the QtWebKit module + \endlist + + \hr + + Originally written by Philip Hazel\br + Copyright (c) 1997-2006 University of Cambridge\br + Copyright (C) 2007 Eric Seidel <eric@webkit.org>\br + Copyright (C) 2002, 2004, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. + + -----------------------------------------------------------------------------\br + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + + \list + \o Parts of WebKit used by the QtWebKit module + \endlist + + \hr + + Copyright (C) 2006 Apple Computer, Inc. All rights reserved.\br + Copyright (C) 2008 Google Inc. All rights reserved.\br + Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer.\br + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution.\br + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + \list + \o Parts of WebKit used by the QtWebKit module + \endlist */ /*! diff --git a/doc/src/modules.qdoc b/doc/src/modules.qdoc index bc79ed38f6..7852f6afd5 100644 --- a/doc/src/modules.qdoc +++ b/doc/src/modules.qdoc @@ -315,6 +315,10 @@ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 1 + For detailed information on how to make your application + scriptable with QtScript, see \l{Making Applications + Scriptable}. + The QtScript module is part of the \l{Qt Full Framework Edition} and the \l{Open Source Versions of Qt}. @@ -500,7 +504,7 @@ \ingroup modules \brief The QtXmlPatterns module provides support for XPath, - XQuery, XSLT and XML schema-validation. + XQuery, XSLT and XML Schema validation. To include the definitions of the module's classes, use the following directive: diff --git a/doc/src/platforms/compiler-notes.qdoc b/doc/src/platforms/compiler-notes.qdoc index 4577bf0cca..0ae32c3940 100644 --- a/doc/src/platforms/compiler-notes.qdoc +++ b/doc/src/platforms/compiler-notes.qdoc @@ -97,12 +97,28 @@ \o mingw32-make 3.80.0-3 \endlist + \note For users of the MinGW binary package: This package is now + based on MinGW 4.4. The installer no longer offers to download + MinGW for you, but rather offers to use a version of MinGW that + you already have installed on your machine. You just tell the + installer which directory MinGW is installed in. If you don't + already have MinGW 4.4 installed, you can download a .zip archive + from our \l{ftp://ftp.trolltech.com/misc/MinGW-gcc440_1.zip} {ftp + site}. This archive provides fixes to MinGW and support for + missing API, See the _patches directory in the archive for + details. + + \note A MinGW installation is only needed to build against the + binary pacakge, not to run the pre-compiled binaries that are in + the package. + \section2 GCC 4.0.0 - The released package of the compiler has some bugs that lead to miscompilations. - We recommend using GCC 4.0.1 or later, or to use a recent CVS snapshot of the - GCC 4.0 branch. The version of GCC 4.0.0 that is shipped with Mac OS X 10.4 - "Tiger" is known to work with Qt for Mac OS X. + The released package of the compiler has some bugs that lead to + miscompilations. We recommend using GCC 4.0.1 or later, or to use + a recent CVS snapshot of the GCC 4.0 branch. The version of GCC + 4.0.0 that is shipped with Mac OS X 10.4 "Tiger" is known to work + with Qt for Mac OS X. \section2 HP-UX @@ -287,4 +303,9 @@ Make sure you have the \l{http://www-1.ibm.com/support/search.wss?rs=32&tc=SSEP5D&dc=D400}{latest upgrades} installed. + + \section2 GCCE (Symbian) + + GCCE cannot be used to compile Qt libaries for the Symbian platform, but GCCE is supported + when compiling Qt applications for Symbian platform. */ diff --git a/doc/src/platforms/emb-HwAcc-LinuxEmbedded.qdoc b/doc/src/platforms/emb-HwAcc-LinuxEmbedded.qdoc index 9c18d873c9..a9bd167b18 100644 --- a/doc/src/platforms/emb-HwAcc-LinuxEmbedded.qdoc +++ b/doc/src/platforms/emb-HwAcc-LinuxEmbedded.qdoc @@ -49,23 +49,57 @@ \ingroup qt-embedded-linux - \input platforms/emb-hardwareacceleration.qdocinc + \input platforms/emb-hardwareacceleration.qdocinc -\section1 Supported Hardware Accelerated Graphics APIs + \section1 Windowing on Embedded Linux with Hardware Accelerated Graphics -This list shows which Hardware Accelerated Graphics APIs currently -supported by Qt. + Qt for Embedded Linux includes its own windowing system, QWS. QWS was + designed in 1999, well before graphics acceleration was available for + embedded devices. It does a great job providing a lightweight window + manager including all the expected functionality such as arbitrary + windows that can be moved, resized, minimized, etc. Getting QWS to work + with GPUs is very challenging, particularly with OpenGL and OpenVG + because there is no standard way in Linux to share textures across + processes. Some silicon vendors provide private APIs to allow texture + sharing, others do not. These limitations are documented under the + sections describing each type of accelerated hardware APIs. The simplest + most generic support for accelerated graphics is a full screen single + process single window. - \table - \header - \o Supported Hardware Accelerated Graphics APIs - \row - \o \l {Qt for Embedded Linux and OpenGL}{OpenGL ES} - \row - \o \l {Qt for Embedded Linux and OpenVG}{OpenVG} - \row - \o \l {Qt for Embedded Linux and DirectFB}{DirectFB} - \endtable + \section2 General options + \list + \o QWS, not accelerated, allows arbitrary windowing with multiple + processes drawing on the screen. + \o X11 with an accelerated X11 driver provided by the silicon + vendor. Like QWS, this allows arbitrary windows with multiple + processes drawing on the screen. Our experience is that there is + some overhead from X11 which will adversely affect framerates. + Additionally, our experience is that the drivers from silicon + vendors are still maturing. + \o Full screen single process single window. This will always work. + Some additional capabilities are available and are documented in + the acceleration specific API sections. + \endlist + + \section1 Supported Hardware Accelerated Graphics APIs + + This table shows which Hardware Accelerated Graphics APIs currently + supported by Qt. + + \table + \header + \o Supported APIs + \o API Version + \row + \o \l {Qt for Embedded Linux and OpenGL}{OpenGL ES} + \o 1.x and 2.x + \row + \o \l {Qt for Embedded Linux and OpenVG}{OpenVG } + \o 1.1 + \row + \o \l {Qt for Embedded Linux and DirectFB}{DirectFB} + \o 2.0 + \endtable */ diff --git a/doc/src/platforms/emb-HwAcc-WinCE.qdoc b/doc/src/platforms/emb-HwAcc-WinCE.qdoc index 66b6948d78..b7789f1033 100644 --- a/doc/src/platforms/emb-HwAcc-WinCE.qdoc +++ b/doc/src/platforms/emb-HwAcc-WinCE.qdoc @@ -47,7 +47,6 @@ \title Qt for Windows CE Hardware Accelerated Graphics \ingroup qtce - \input platforms/emb-hardwareacceleration.qdocinc \section1 Supported Hardware Accelerated Graphics APIs diff --git a/doc/src/platforms/emb-hardwareacceleration.qdocinc b/doc/src/platforms/emb-hardwareacceleration.qdocinc index 3851628155..fb00e09c29 100644 --- a/doc/src/platforms/emb-hardwareacceleration.qdocinc +++ b/doc/src/platforms/emb-hardwareacceleration.qdocinc @@ -1,129 +1,140 @@ - -\section1 Hardware Acceleration - -When designing applications for embedded devices the choice often stands -between graphics effects and performance. On most devices, you cannot have -both simply because the hardware needed for such operations just is not -there. Still a growing number of devices use hardware dedicated to graphics -operations to improve performance. - -Using graphics acceleration hardware is more power efficient than using the -CPU. The reason for this is that the CPU might require a clock speed that -is up to 20 times higher than the GPU, achieving the same results. E.g. a -typical hardware accelerated mobile graphics unit can rasterize one or two -bilinear texture fetches in one cycle, while a software implementation -takes easily more than 20 cycles. Graphics hardware generally have a much -lower clock speed and memory bandwidth and different level of acceleration -than desktop GPUs. One example is that many GPUs leave out transformation -and lighting from the graphics pipeline and only implements rasterization. - -So the key to write good applications for devices is therefore to limit the -wow factor down to what the target hardware can handle, and to take -advantage of any graphics dedicated hardware. Qt provides several ways to -both render advanced effects on the screen and speed up your application -using hardware accelerated graphics. - -\tableofcontents - -\section2 Qt for Embedded Graphics pipeline - -Qt uses QPainter for all graphics operations. By using the same API -regardless of platform, the code can be reused on different devices. -QPainter use different paint engines implemented in the QPaintEngine API to -do the actual painting. - -The QPaintEngine API provides paint engines for each window system and -painting framework supported by Qt. In regards to Qt for Embedded, this -also includes implementations for OpenGL ES versions 1.1 and 2.0, as well -as OpenVG and DirectFB(Embedded Linux only). - -By using one of these paint engines, you will be able to improve the -graphics performance of your Qt application. However, if the graphics -operations used are not supported, this might as well be a trap, slowing -down your application significantly. This all depends on what kind of -graphics operations that are supported by the target devices hardware -configuration. - -\image platformHWAcc.png - -The paint engine will direct all graphics operations supported by the -devices hardware to the GPU, and from there they are sent to the -framebuffer. Unsupported graphics operations falls back to the -QRasterPaintEngine and are handled by the CPU before sent to the -framebuffer. In the end, the operating system sends the paint updates off -to the screen/display. The fallback operation is quite expensive in regards -to memory consumption, and should be avoided. - -\section2 Hardware configuration requirements - -Before implementing any application using hardware acceleration, it is wise -to get an overview of what kind of hardware accelerated graphics operations -that are available for the target device. - -\note On devices with no hardware acceleration, Qt will use -QRasterPaintEngine, which handles the acceleration using software. On -devices supporting OpenGL ES, OpenVG or DirectFB(not supported by Windows -CE), Qt will use the -respective paint engines to accelerate painting. However, hardware -configurations that only support a limited set of hardware acceleration -features, might slow the application graphics down rather than speeding it -up when using unsupported operations that must fall back to the raster -engine. - -\section3 Different architectures - -Based on the architecture used in a device we can make a recommendation on -which hardware acceleration techniques to use. There are mainly two -different architectures on embedded devices. These are devices with a -Unified Memory Architecture (UMA), and devices with dedicated graphics -memory. Generally, high-end devices will have dedicated graphics memory. -Low-end devices will just use system memory, sometimes reserving a memory -region and sometimes not. - -In addition to this, we can categorize the devices into five types based on -the different graphics operations supported by their hardware. - -\list 1 - \o No support for graphics acceleration. - \o Support for blitter and alpha blending. - \o Support for path based 2D vector graphics. - \o Support for fixed function 3D graphics. - \o Support for programmable 3D graphics. -\endlist - -Based on these characteristics the table below recommends which paint -engines to use with the different types of hardware configurations. - -\section3 Recommended use of hardware acceleration based on hardware - - \table - \header - \o Type - \o UMA - \o Non-UMA - \row - \o \bold {None} - \o Qt Raster Engine - \o Qt Raster Engine - \row - \o \bold {Blitter} - \o DirectFB - \o DirectFB - \row - \o \bold {2D Vector} - \o OpenVG - \o OpenVG - \row - \o \bold {Fixed 3D} - \o OpenGL (ES) 1.x - \o OpenGL (ES) 1.x - \row - \o \bold {Programmable 3D} - \o OpenGL (ES) 2.x - \o OpenGL (ES) 2.x - - \endtable - -\note Since the DirectFB API is quite primitive, the raster paint engine -handles most of the operations. -\note Blitter and Alpha blending is currently not supported on Windows CE. + \section1 Hardware Acceleration + + When designing applications for embedded devices there is often a + compromise between graphics effects and performance. On most + devices, you cannot have both simply because the hardware needed + for such operations just is not there. With a growing number of + devices that use hardware dedicated to graphics operations there is + less need to compromise. + + In addition to enabling dynamic graphics effects, there are two + other benefits to using graphics acceleration. One is that graphics + acceleration hardware is more power efficient than using the CPU. + The reason for this is that the CPU might require a clock speed + that is up to 20 times higher than the GPU, achieving the same + results. E.g. a typical hardware accelerated mobile graphics unit + can rasterize one or two bilinear texture fetches in one cycle, + while a software implementation takes easily more than 20 cycles. + Typical \e {System-on-a-chip} (SoC) graphics hardware generally have + a much lower clock speed and memory bandwidth, and different level + of acceleration than desktop GPUs. One example is that many GPUs + leave out transformation and lighting from the graphics pipeline + and only implements rasterization. + + Another reason to use a GPU is to offload the main CPU, either for + power saving or to perform other operations in parallel. Often + drawing speed with a GPU is not that much faster than a CPU but + the clear benefit of using the GPU is to free up the CPU to perform + other tasks which can be used to create a more responsive use + experience. + + The key to writing good applications for devices is therefore to + limit the wow factor down to what the target hardware can handle, + and to take advantage of any graphics dedicated hardware. Qt + provides several ways to both render advanced effects on the screen + and speed up your application using hardware accelerated graphics. + + \tableofcontents + + \section2 Qt for Embedded Graphics pipeline + + Qt uses QPainter for all graphics operations. By using the same API + regardless of platform, the code can be reused on different devices. + QPainter use different paint engines implemented in the QPaintEngine API to + do the actual painting. + + The QPaintEngine API provides paint engines for each window system and + painting framework supported by Qt. In regards to Qt for Embedded, this + also includes implementations for OpenGL ES versions 1.1 and 2.0, as well + as OpenVG and DirectFB(Embedded Linux only). + + By using one of these paint engines, you will be able to improve the + graphics performance of your Qt application. However, if the graphics + operations used are not supported, this might as well be a trap, slowing + down your application significantly. This all depends on what kind of + graphics operations that are supported by the target devices hardware + configuration. + + \image platformHWAcc.png + + The paint engine will direct all graphics operations supported by the + devices hardware to the GPU, and from there they are sent to the + framebuffer. Unsupported graphics operations falls back to the + QRasterPaintEngine and are handled by the CPU before sent to the + framebuffer. In the end, the operating system sends the paint updates off + to the screen/display. The fallback operation is quite expensive in regards + to memory consumption, and should be avoided. + + \section2 Hardware configuration requirements + + Before implementing any application using hardware acceleration, it is wise + to get an overview of what kind of hardware accelerated graphics operations + that are available for the target device. + + \note On devices with no hardware acceleration, Qt will use + QRasterPaintEngine, which handles the acceleration using software. On + devices supporting OpenGL ES, OpenVG or DirectFB(not supported by Windows + CE), Qt will use the + respective paint engines to accelerate painting. However, hardware + configurations that only support a limited set of hardware acceleration + features, might slow the application graphics down rather than speeding it + up when using unsupported operations that must fall back to the raster + engine. + + \section3 Different architectures + + Based on the architecture used in a device we can make a recommendation on + which hardware acceleration techniques to use. There are mainly two + different architectures on embedded devices. These are devices with a + Unified Memory Architecture (UMA), and devices with dedicated graphics + memory. Generally, high-end devices will have dedicated graphics memory. + Low-end devices will just use system memory, sometimes reserving a memory + region and sometimes not. + + In addition to this, we can categorize the devices into five types based on + the different graphics operations supported by their hardware. + + \list 1 + \o No support for graphics acceleration. + \o Support for blitter and alpha blending. + \o Support for path based 2D vector graphics. + \o Support for fixed function 3D graphics. + \o Support for programmable 3D graphics. + \endlist + + Based on these characteristics the table below recommends which paint + engines to use with the different types of hardware configurations. + + \section3 Recommended use of hardware acceleration based on hardware + + \table + \header + \o Type + \o UMA + \o Non-UMA + \row + \o \bold {None} + \o Qt Raster Engine + \o Qt Raster Engine + \row + \o \bold {Blitter} + \o DirectFB + \o DirectFB + \row + \o \bold {2D Vector} + \o OpenVG + \o OpenVG + \row + \o \bold {Fixed 3D} + \o OpenGL (ES) 1.x + \o OpenGL (ES) 1.x + \row + \o \bold {Programmable 3D} + \o OpenGL (ES) 2.x + \o OpenGL (ES) 2.x + \endtable + + \note Since the DirectFB API is quite primitive, the raster paint engine + handles most of the operations. + + \note Blitter and Alpha blending is currently not supported on Windows CE. diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc index 68015a6b2e..85b9ff84b2 100644 --- a/doc/src/platforms/platform-notes.qdoc +++ b/doc/src/platforms/platform-notes.qdoc @@ -515,11 +515,8 @@ In addition, there exists a backend for the Helix framework. However, due to it not shipping with Qt, its availability depends on the Symbian platform in use. If available, it is loaded in preference over the MMF - plugin. The Helix plugin requires Symbian signed capabilities. If the - application does not have those capabilities, the MMF plugin, if present on - the device, will be loaded instead. The capabilities the Helix backend - requires are AllFiles, DiskAdmin and MultimediaDD. - + plugin. If the Helix plugin fails to load, the MMF plugin, if present on + the device, will be loaded instead. */ /*! diff --git a/doc/src/platforms/qt-embedded.qdoc b/doc/src/platforms/qt-embedded.qdoc index b38c94f5ec..afed540698 100644 --- a/doc/src/platforms/qt-embedded.qdoc +++ b/doc/src/platforms/qt-embedded.qdoc @@ -67,10 +67,9 @@ Applications use the appropriate style for the embedded environment and use native features, such as menus, to conform to the native style guidelines. - \o \l{Symbian Platform - Introduction to Qt}{Qt for the Symbian - platform} is used to create applications running in existing Symbian - platform environments. Applications use the appropriate style for the - embedded environment and use native features, such as menus, to conform - to the native style guidelines. + \o \l{Qt for the Symbian platform} is used to create applications running + in existing Symbian platform environments. Applications use the appropriate + style for the embedded environment and use native features, such as menus, + to conform to the native style guidelines. \endtable */ diff --git a/doc/src/platforms/supported-platforms.qdoc b/doc/src/platforms/supported-platforms.qdoc index 560ddfe061..be098bcf68 100644 --- a/doc/src/platforms/supported-platforms.qdoc +++ b/doc/src/platforms/supported-platforms.qdoc @@ -89,8 +89,8 @@ \o gcc (\l{http://www.codesourcery.com/}{Codesourcery version)} \row \o Windows CE 5.0 (ARMv4i, x86, MIPS) \o MSVC 2005 WinCE 5.0 Standard (x86, pocket, smart, mipsii) - \row \o Symbian (S60 3.1, 3.2 and 5.0) - \o RVCT, GCCE, WINSCW + \row \o Symbian (Symbian/S60 3.1, 3.2 and 5.0) + \o RVCT 2.2 [build 686 or later], WINSCW 3.2.5 [build 482 or later], GCCE (for applications) \endtable \section1 Tier 2 Platforms @@ -155,4 +155,21 @@ warranties and conditions, either express or implied, including, but not limited to, implied warranties of merchantability, fitness for a particular purpose, title and non-infringement with regard to the Licensed Software. + + \section1 Planned Changes for Qt 4.7 + + The following changes to the list of supported platforms are at time of publishing + planned for Qt 4.7: + + \list + \o Upgrade Windows 7 to Tier 1 + \o Upgrade Mac OS X 10.6 to Tier 1 + \o Add support for Visual Studio 2010 (Tier 2) + \o Move support for Carbon implementation of Qt on Mac OS X from Tier 1 to Tier 2 + \o Drop support for MinGW 3.4 + \o Drop support for Visual Studio 2003 + \o Drop support for HP-UX on PA-RISC + \o Drop support for Windows Mobile 5 + \o Drop support for OpenGL ES Common Lite + \endlist */ diff --git a/doc/src/platforms/symbian-exceptionsafety.qdoc b/doc/src/platforms/symbian-exceptionsafety.qdoc index 88f4d03b71..99bd2d87b7 100644 --- a/doc/src/platforms/symbian-exceptionsafety.qdoc +++ b/doc/src/platforms/symbian-exceptionsafety.qdoc @@ -42,7 +42,7 @@ /*! \page symbianexceptionsafety.html \title Exception Safety with Symbian - \ingroup qts60 + \ingroup qtsymbian \brief A guide to integrating exception safety in Qt with Symbian. The following sections describe how Qt code can interoperate with Symbian's diff --git a/doc/src/platforms/s60-introduction.qdoc b/doc/src/platforms/symbian-introduction.qdoc index 058198238b..c0c4fb30cf 100644 --- a/doc/src/platforms/s60-introduction.qdoc +++ b/doc/src/platforms/symbian-introduction.qdoc @@ -40,39 +40,73 @@ ****************************************************************************/ /*! + \group qtsymbian + \title Qt for the Symbian platform + \ingroup qt-embedded + \brief Documents related to Qt on the Symbian platform + + Qt for Symbian is a C++ framework for GUI and application development + for embedded devices running Symbian. Qt for Symbian provides all + functionality required to develop rich end-user applications for devices + running S60 3.1 and later. + + \table 100% + \header \o Getting Started \o Reference \o Development + \row + \o + \list + \o \l {Qt for the Symbian platform Requirements} + \o \l {Installing Qt on the Symbian platform from a Binary Package} + \o \l {Installing Qt on the Symbian platform} + \o \l {The Symbian platform - Introduction to Qt}{Introduction to using Qt} + \endlist + \o + \list + \o \l {Exception Safety with Symbian} + \o \l {Platform Notes - Symbian} {Qt for the Symbian platform - state of support} + \o \l {qmake Platform Notes#Symbian platform} {Qt for Symbian extensions for qmake} + \endlist + \o + \list + \o \l {Deploying an Application on the Symbian platform}{Deploying Applications} + \endlist + \endtable +*/ + +/*! \page symbian-with-qt-introduction.html - \title Symbian Platform - Introduction to Qt - \brief An introduction to Qt for Symbian platform developers. + \title The Symbian platform - Introduction to Qt + \brief An introduction to Qt for the Symbian platform developers. \ingroup howto - \ingroup qts60 + \ingroup qtsymbian \tableofcontents \section1 Required tools - See \l{Qt for Symbian Platform Requirements} to see what tools are - required to use Qt for Symbian platform. + See \l{Qt for the Symbian platform Requirements} to see what tools are + required to use Qt for the Symbian platform. \section1 Installing Qt and running demos Follow the instructions found in \l{Installing Qt on the Symbian platform from a Binary Package} to learn how to install Qt using a binary package and how to build and run Qt demos. - Follow the instructions found in \l{Installing Qt on the Symbian Platform} to learn how to install Qt using + Follow the instructions found in \l{Installing Qt on the Symbian platform} to learn how to install Qt using using source package and how to build and run the Qt demos. \section1 Building your own applications - If you are new to Qt development, have a look at \l{How to Learn Qt}. + If you are new to Qt development, have a look at \l{How to Learn Qt}. In general, the difference between developing a Qt application on the Symbian platform compared to any of the other platforms supported by Qt is not that big. Once you have created a \c .pro file for your project, generate the - Carbide specific \c Bld.inf and \c .mmp files this way: + Symbian specific \c Bld.inf and \c .mmp files this way: - \snippet doc/src/snippets/code/doc_src_s60-introduction.qdoc 0 + \snippet doc/src/snippets/code/doc_src_symbian-introduction.qdoc 0 For more information on how to use qmake have a look at the \l {qmake Tutorial}. @@ -97,56 +131,67 @@ The following lines perform a debug build for the emulator and deploy all the needed files: - \snippet doc/src/snippets/code/doc_src_s60-introduction.qdoc 1 + \snippet doc/src/snippets/code/doc_src_symbian-introduction.qdoc 1 To work on your project in Carbide, simply import the \c .pro file by right clicking on the project explorer and executing "Import...". \section1 Installing your own applications - To install your own applications on hardware, you need signed \c .sis file. + To install your own applications on hardware, you need a signed \c .sis file. + (Refer to the \l{http://developer.symbian.org/wiki/index.php/Platform_Security_%28Fundamentals_of_Symbian_C%2B%2B%29#Self-Signed_Applications} + {Platform Security Article} for more informations about self-signing.) The signed \c .sis file can be created with \c make \c sis target. \c sis target is only supported for executables or projects with \c DEPLOYMENT statements. By default the \c sis target will create signed \c .sis file for last build - target. For example, the following sequence will generate the needed makefiles, - build the project for \c debug-winscw and \c release-armv5, and create + target. For example, the following sequence will generate the needed makefiles, + build the project for \c debug-winscw and \c release-armv5, and create self-signed \c .sis file for \c release-armv5 target: - \snippet doc/src/snippets/code/doc_src_s60-introduction.qdoc 2 + \snippet doc/src/snippets/code/doc_src_symbian-introduction.qdoc 2 If you want to use different certificate information or override the default - target for \c .sis file creation you can use the environment variables as + target for \c .sis file creation you can use the environment variables as shown in the table below: \table - \row \o \c QT_SIS_OPTIONS \o Options accepted by \c .sis creation. - -i, install the package right away using PC suite. - -c=<file>, read certificate information from a file. - Execute the \c{createpackage.pl} script without any - parameters for more information about options. - By default no otions are given. + \row \o \c QT_SIS_OPTIONS \o Options accepted by \c .sis creation. See + \l{Supported options for QT_SIS_OPTIONS}{Supported options} + below. By default no otions are given. \row \o \c QT_SIS_TARGET \o Target for which \c .sis file is created. - Accepted values are build targets listed in + Accepted values are build targets listed in previous table. By default last build target. \row \o \c QT_SIS_CERTIFICATE \o The certificate file used for signing. - By default self-signed certificate. + By default self-signed certificate. \row \o \c QT_SIS_KEY \o The certificate's private key file. - By default key is associated to self-signed certificate. + By default key is associated to self-signed certificate. \row \o \c QT_SIS_PASSPHRASE \o The certificate's private key file's passphrase. - By default empty. - \endtable + By default empty. + \endtable + + The suppported options for \c QT_SIS_OPTIONS: + + \target Supported options for QT_SIS_OPTIONS + \table + \row \o -i \o Install the package right away using PC suite. + \row \o -p \o Only preprocess the template \c .pkg file. + \row \o -c=<file> \o Read certificate information from a file. + \endtable + + Execute the \c{createpackage.pl} script without any + parameters for detailed information about options. By default no otions are given. For example: - \snippet doc/src/snippets/code/doc_src_s60-introduction.qdoc 4 + \snippet doc/src/snippets/code/doc_src_symbian-introduction.qdoc 4 The environment variables for \c make can also be given as parameters: - \snippet doc/src/snippets/code/doc_src_s60-introduction.qdoc 3 + \snippet doc/src/snippets/code/doc_src_symbian-introduction.qdoc 3 If you want to install the program immediately, make sure that the device is connected to the computer in "PC Suite" mode, and run \c sis target with the \c QT_SIS_OPTIONS=-i, like this: - \snippet doc/src/snippets/code/doc_src_s60-introduction.qdoc 5 + \snippet doc/src/snippets/code/doc_src_symbian-introduction.qdoc 5 */ diff --git a/doc/src/platforms/winsystem.qdoc b/doc/src/platforms/winsystem.qdoc index 72e7da60b5..2f43a74c04 100644 --- a/doc/src/platforms/winsystem.qdoc +++ b/doc/src/platforms/winsystem.qdoc @@ -102,9 +102,9 @@ When compiling for this platform, the macro \c{Q_WS_WINCE} is defined. See the \l{Qt for Windows CE} documentation for more information. - \section1 Qt for Symbian Platform + \section1 Qt for the Symbian platform When compiling for this platform, the macro \c{Q_WS_S60} is defined. - See the \l{Symbian Platform - Introduction to Qt} documentation for + See the \l{The Symbian platform - Introduction to Qt} documentation for more information. */ diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc index 2a1f8ff698..fb1d0e42dc 100644 --- a/doc/src/qt4-intro.qdoc +++ b/doc/src/qt4-intro.qdoc @@ -491,7 +491,7 @@ rich end-user applications for devices running S60 3.1 and later. - See the \l{Symbian Platform - Introduction to Qt} for more information. + See the \l{The Symbian platform - Introduction to Qt} for more information. \section1 Animation Framework diff --git a/doc/src/scripting/scripting.qdoc b/doc/src/scripting/scripting.qdoc index e99be705de..b2ce8d10b6 100644 --- a/doc/src/scripting/scripting.qdoc +++ b/doc/src/scripting/scripting.qdoc @@ -1805,15 +1805,9 @@ \section1 ECMAScript Compatibility - QtScript implements all the built-in classes and functions defined - in ECMA-262. - - The Date parsing and string conversion functions are implemented using - QDateTime::fromString() and QDateTime::toString(), respectively. - - The RegExp class is a wrapper around QRegExp. The QRegExp semantics - do not precisely match the semantics for regular expressions defined - in ECMA-262. + QtScript implements all the built-in objects and properties defined + in the \l{ECMA-262} standard; see the + \l{ECMAScript Reference}{ECMAScript reference} for an overview. \section1 QtScript Extensions to ECMAScript diff --git a/doc/src/snippets/code/doc_src_deployment.qdoc b/doc/src/snippets/code/doc_src_deployment.qdoc index d233ec3a4a..2d6a78fd54 100644 --- a/doc/src/snippets/code/doc_src_deployment.qdoc +++ b/doc/src/snippets/code/doc_src_deployment.qdoc @@ -453,3 +453,44 @@ CONFIG+=x86 ppc //! [54] qApp->addLibraryPath("C:/customPath/plugins"); //! [54] + +//! [55] +cd examples\widgets\wiggly +//! [55] + +//! [56] +vendorinfo = \ + "%{\"Example Localized Vendor\"}" \ + ":\"Example Vendor\"" + +default_deployment.pkg_prerules = vendorinfo +//! [56] + +//! [57] +supported_platforms = \ + "; This demo only supports S60 5.0" \ + "[0x1028315F],0,0,0,{\"S60ProductID\"}" + +default_deployment.pkg_prerules += supported_platforms +//! [57] + +//! [58] +embedded_deployments = \ + "; Embed Open C dependencies" \ + "@\"$${EPOCROOT}nokia_plugin/openc/s60opencsis/pips_s60_1_6_SS.sis\",(0x20013851)" \ + "@\"$${EPOCROOT}nokia_plugin/openc/s60opencsis/openc_ssl_s60_1_6_SS.sis\",(0x200110CB)" \ + "@\"$${EPOCROOT}nokia_plugin/opencpp/s60opencppsis/STDCPP_s60_1_6_SS.sis\",(0x2000F866)" \ + "; Embed Qt dependencies" \ + "@\"$$[QT_INSTALL_PREFIX]/qt_rndsigned.sis\",(0x2001E61C)" + +default_deployment.pkg_prerules += embedded_deployments +//! [58] + +//! [59] +qmake +make release-gcce +//! [59] + +//! [60] +make sis +//! [60]
\ No newline at end of file diff --git a/doc/src/snippets/code/doc_src_installation.qdoc b/doc/src/snippets/code/doc_src_installation.qdoc index 68765ec75b..bef6e84d0b 100644 --- a/doc/src/snippets/code/doc_src_installation.qdoc +++ b/doc/src/snippets/code/doc_src_installation.qdoc @@ -201,7 +201,7 @@ make sis QT_SIS_OPTIONS=-i QT_SIS_CERTIFICATE=<certificate file> QT_SIS_KEY=<cer //! [29] //! [30] -cd embedded\fluidlauncher +cd demos\embedded\fluidlauncher make sis QT_SIS_OPTIONS=-i //! [30] @@ -209,3 +209,14 @@ make sis QT_SIS_OPTIONS=-i cd \Qt\%VERSION% configure -platform win32-g++ -xplatform symbian-sbsv2 //! [31] + +//! [32] +cd <Your SDK path>\S60CppExamples\Note\group +bldmake bldfiles +abld build winscw udeb +abld build gcce urel +//! [32] + +//! [33] +SYMBIANBUILD_DEPENDENCYOFF=1 +//! [33] diff --git a/doc/src/snippets/code/doc_src_s60-introduction.qdoc b/doc/src/snippets/code/doc_src_symbian-introduction.qdoc index 8949df64e7..8949df64e7 100644 --- a/doc/src/snippets/code/doc_src_s60-introduction.qdoc +++ b/doc/src/snippets/code/doc_src_symbian-introduction.qdoc diff --git a/examples/activeqt/qutlook/addressview.cpp b/examples/activeqt/qutlook/addressview.cpp index 6e7925091d..19425c1bd1 100644 --- a/examples/activeqt/qutlook/addressview.cpp +++ b/examples/activeqt/qutlook/addressview.cpp @@ -243,7 +243,7 @@ AddressView::AddressView(QWidget *parent) model = new AddressBookModel(this); treeView->setModel(model); - connect(treeView->selectionModel(), SIGNAL(currentChanged(QModelIndex, QModelIndex)), this, SLOT(itemSelected(QModelIndex))); + connect(treeView->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(itemSelected(QModelIndex))); mainGrid->addWidget(treeView, 2, 0, 1, 5); } diff --git a/examples/activeqt/simple/main.cpp b/examples/activeqt/simple/main.cpp index 4adc00de37..78fa1b42ce 100644 --- a/examples/activeqt/simple/main.cpp +++ b/examples/activeqt/simple/main.cpp @@ -64,8 +64,8 @@ public: LCD = new QLCDNumber( 3, this ); edit = new QLineEdit( this ); - connect( slider, SIGNAL( valueChanged( int ) ), this, SLOT( setValue(int) ) ); - connect( edit, SIGNAL(textChanged(const QString&)), this, SLOT(setText(const QString&)) ); + connect( slider, SIGNAL(valueChanged(int)), this, SLOT(setValue(int)) ); + connect( edit, SIGNAL(textChanged(QString)), this, SLOT(setText(QString)) ); vbox->addWidget( slider ); vbox->addWidget( LCD ); diff --git a/examples/assistant/simpletextviewer/findfiledialog.cpp b/examples/assistant/simpletextviewer/findfiledialog.cpp index 1435ca6275..0720111290 100644 --- a/examples/assistant/simpletextviewer/findfiledialog.cpp +++ b/examples/assistant/simpletextviewer/findfiledialog.cpp @@ -176,9 +176,9 @@ void FindFileDialog::createComboBoxes() directoryComboBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); - connect(fileNameComboBox, SIGNAL(editTextChanged(const QString &)), + connect(fileNameComboBox, SIGNAL(editTextChanged(QString)), this, SLOT(update())); - connect(directoryComboBox, SIGNAL(currentIndexChanged(const QString &)), + connect(directoryComboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(update())); } @@ -190,8 +190,8 @@ void FindFileDialog::createFilesTree() foundFilesTree->setRootIsDecorated(false); foundFilesTree->setSelectionMode(QAbstractItemView::SingleSelection); - connect(foundFilesTree, SIGNAL(itemActivated(QTreeWidgetItem *, int)), - this, SLOT(openFile(QTreeWidgetItem *))); + connect(foundFilesTree, SIGNAL(itemActivated(QTreeWidgetItem*,int)), + this, SLOT(openFile(QTreeWidgetItem*))); } void FindFileDialog::createLabels() diff --git a/examples/designer/containerextension/multipagewidgetplugin.cpp b/examples/designer/containerextension/multipagewidgetplugin.cpp index ec61b67010..b6a172f64f 100644 --- a/examples/designer/containerextension/multipagewidgetplugin.cpp +++ b/examples/designer/containerextension/multipagewidgetplugin.cpp @@ -102,8 +102,8 @@ QWidget *MultiPageWidgetPlugin::createWidget(QWidget *parent) MultiPageWidget *widget = new MultiPageWidget(parent); connect(widget, SIGNAL(currentIndexChanged(int)), this, SLOT(currentIndexChanged(int))); - connect(widget, SIGNAL(pageTitleChanged(const QString &)), - this, SLOT(pageTitleChanged(const QString &))); + connect(widget, SIGNAL(pageTitleChanged(QString)), + this, SLOT(pageTitleChanged(QString))); return widget; } diff --git a/examples/dialogs/configdialog/configdialog.cpp b/examples/dialogs/configdialog/configdialog.cpp index 5c5d161ab9..8d73f92522 100644 --- a/examples/dialogs/configdialog/configdialog.cpp +++ b/examples/dialogs/configdialog/configdialog.cpp @@ -104,8 +104,8 @@ void ConfigDialog::createIcons() queryButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); connect(contentsWidget, - SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)), - this, SLOT(changePage(QListWidgetItem *, QListWidgetItem*))); + SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), + this, SLOT(changePage(QListWidgetItem*,QListWidgetItem*))); } void ConfigDialog::changePage(QListWidgetItem *current, QListWidgetItem *previous) diff --git a/examples/dialogs/findfiles/window.cpp b/examples/dialogs/findfiles/window.cpp index afe6399087..66e1b464ea 100644 --- a/examples/dialogs/findfiles/window.cpp +++ b/examples/dialogs/findfiles/window.cpp @@ -76,7 +76,7 @@ Window::Window(QWidget *parent) mainLayout->addWidget(directoryComboBox, 2, 1); mainLayout->addWidget(browseButton, 2, 2); mainLayout->addWidget(filesTable, 3, 0, 1, 3); - mainLayout->addWidget(filesFoundLabel, 4, 0); + mainLayout->addWidget(filesFoundLabel, 4, 0, 1, 3); mainLayout->addLayout(buttonsLayout, 5, 0, 1, 3); setLayout(mainLayout); @@ -232,8 +232,8 @@ void Window::createFilesTable() filesTable->verticalHeader()->hide(); filesTable->setShowGrid(false); - connect(filesTable, SIGNAL(cellActivated(int, int)), - this, SLOT(openFileOfItem(int, int))); + connect(filesTable, SIGNAL(cellActivated(int,int)), + this, SLOT(openFileOfItem(int,int))); } //! [11] diff --git a/examples/dialogs/standarddialogs/dialog.cpp b/examples/dialogs/standarddialogs/dialog.cpp index 6e06190850..270fdd019c 100644 --- a/examples/dialogs/standarddialogs/dialog.cpp +++ b/examples/dialogs/standarddialogs/dialog.cpp @@ -124,7 +124,7 @@ Dialog::Dialog(QWidget *parent) errorLabel = new QLabel; errorLabel->setFrameStyle(frameStyle); QPushButton *errorButton = - new QPushButton(tr("QErrorMessage::show&M&essage()")); + new QPushButton(tr("QErrorMessage::showM&essage()")); connect(integerButton, SIGNAL(clicked()), this, SLOT(setInteger())); connect(doubleButton, SIGNAL(clicked()), this, SLOT(setDouble())); diff --git a/examples/draganddrop/delayedencoding/sourcewidget.cpp b/examples/draganddrop/delayedencoding/sourcewidget.cpp index 0d399a531c..29ee8d7d86 100644 --- a/examples/draganddrop/delayedencoding/sourcewidget.cpp +++ b/examples/draganddrop/delayedencoding/sourcewidget.cpp @@ -102,8 +102,8 @@ void SourceWidget::startDrag() { mimeData = new MimeData; - connect(mimeData, SIGNAL(dataRequested(const QString &)), - this, SLOT(createData(const QString &)), Qt::DirectConnection); + connect(mimeData, SIGNAL(dataRequested(QString)), + this, SLOT(createData(QString)), Qt::DirectConnection); QDrag *drag = new QDrag(this); drag->setMimeData(mimeData); diff --git a/examples/draganddrop/dropsite/dropsitewindow.cpp b/examples/draganddrop/dropsite/dropsitewindow.cpp index 7187b9ca9c..93c04de730 100644 --- a/examples/draganddrop/dropsite/dropsitewindow.cpp +++ b/examples/draganddrop/dropsite/dropsitewindow.cpp @@ -56,8 +56,8 @@ DropSiteWindow::DropSiteWindow() //! [constructor part2] dropArea = new DropArea; - connect(dropArea, SIGNAL(changed(const QMimeData *)), - this, SLOT(updateFormatsTable(const QMimeData *))); + connect(dropArea, SIGNAL(changed(const QMimeData*)), + this, SLOT(updateFormatsTable(const QMimeData*))); //! [constructor part2] //! [constructor part3] diff --git a/examples/effects/blurpicker/blurpicker.h b/examples/effects/blurpicker/blurpicker.h index b302db4058..6972a391b2 100644 --- a/examples/effects/blurpicker/blurpicker.h +++ b/examples/effects/blurpicker/blurpicker.h @@ -51,7 +51,7 @@ class BlurPicker: public QGraphicsView { Q_OBJECT - Q_PROPERTY(qreal index READ index WRITE setIndex); + Q_PROPERTY(qreal index READ index WRITE setIndex) public: BlurPicker(QWidget *parent = 0); diff --git a/examples/effects/customshader/blureffect.cpp b/examples/effects/customshader/blureffect.cpp deleted file mode 100644 index 956637d20a..0000000000 --- a/examples/effects/customshader/blureffect.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "blureffect.h" - -#include <QDebug> - -BlurEffect::BlurEffect(QGraphicsItem *item) - : QGraphicsBlurEffect() - , m_baseLine(200), item(item) -{ -} - -void BlurEffect::adjustForItem() -{ - qreal y = m_baseLine - item->pos().y(); - qreal radius = qBound(qreal(0.0), y / 32, qreal(16.0)); - setBlurRadius(radius); -} - -QRectF BlurEffect::boundingRect() const -{ - const_cast<BlurEffect *>(this)->adjustForItem(); - return QGraphicsBlurEffect::boundingRect(); -} - -void BlurEffect::draw(QPainter *painter) -{ - adjustForItem(); - QGraphicsBlurEffect::draw(painter); -} diff --git a/examples/effects/customshader/blurpicker.cpp b/examples/effects/customshader/blurpicker.cpp deleted file mode 100644 index d38d99b8ad..0000000000 --- a/examples/effects/customshader/blurpicker.cpp +++ /dev/null @@ -1,144 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "blurpicker.h" - -#include <QtGui> - -#include "blureffect.h" -#include "customshadereffect.h" - -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - -BlurPicker::BlurPicker(QWidget *parent): QGraphicsView(parent), m_index(0.0), m_animation(this, "index") -{ - setBackgroundBrush(QPixmap(":/images/background.jpg")); - setScene(new QGraphicsScene(this)); - - setupScene(); - setIndex(0); - - m_animation.setDuration(400); - m_animation.setEasingCurve(QEasingCurve::InOutSine); - - setRenderHint(QPainter::Antialiasing, true); - setFrameStyle(QFrame::NoFrame); -} - -qreal BlurPicker::index() const -{ - return m_index; -} - -void BlurPicker::setIndex(qreal index) -{ - m_index = index; - - qreal baseline = 0; - for (int i = 0; i < m_icons.count(); ++i) { - QGraphicsItem *icon = m_icons[i]; - qreal a = ((i + m_index) * 2 * M_PI) / m_icons.count(); - qreal xs = 170 * sin(a); - qreal ys = 100 * cos(a); - QPointF pos(xs, ys); - pos = QTransform().rotate(-20).map(pos); - pos -= QPointF(40, 40); - icon->setPos(pos); - baseline = qMax(baseline, ys); - if (i != 3) - static_cast<BlurEffect *>(icon->graphicsEffect())->setBaseLine(baseline); - } - - scene()->update(); -} - -void BlurPicker::setupScene() -{ - scene()->setSceneRect(-200, -120, 400, 240); - - QStringList names; - names << ":/images/accessories-calculator.png"; - names << ":/images/accessories-text-editor.png"; - names << ":/images/help-browser.png"; - names << ":/images/internet-group-chat.png"; - names << ":/images/internet-mail.png"; - names << ":/images/internet-web-browser.png"; - names << ":/images/office-calendar.png"; - names << ":/images/system-users.png"; - - for (int i = 0; i < names.count(); i++) { - QPixmap pixmap(names[i]); - QGraphicsPixmapItem *icon = scene()->addPixmap(pixmap); - icon->setZValue(1); - if (i == 3) - icon->setGraphicsEffect(new CustomShaderEffect()); - else - icon->setGraphicsEffect(new BlurEffect(icon)); - m_icons << icon; - } - - QGraphicsPixmapItem *bg = scene()->addPixmap(QPixmap(":/images/background.jpg")); - bg->setZValue(0); - bg->setPos(-200, -150); -} - -void BlurPicker::keyPressEvent(QKeyEvent *event) -{ - int delta = 0; - switch (event->key()) - { - case Qt::Key_Left: - delta = -1; - break; - case Qt::Key_Right: - delta = 1; - break; - default: - break; - } - if (m_animation.state() == QAbstractAnimation::Stopped && delta) { - m_animation.setEndValue(m_index + delta); - m_animation.start(); - event->accept(); - } -} diff --git a/examples/effects/customshader/blurpicker.h b/examples/effects/customshader/blurpicker.h deleted file mode 100644 index b302db4058..0000000000 --- a/examples/effects/customshader/blurpicker.h +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef BLURPICKER_H -#define BLURPICKER_H - -#include <QGraphicsEffect> -#include <QGraphicsView> -#include <QPropertyAnimation> - -#include "blureffect.h" - -class BlurPicker: public QGraphicsView -{ - Q_OBJECT - Q_PROPERTY(qreal index READ index WRITE setIndex); - -public: - BlurPicker(QWidget *parent = 0); - - qreal index() const; - void setIndex(qreal); - -protected: - void keyPressEvent(QKeyEvent *event); - -private: - void setupScene(); - -private: - qreal m_index; - QList<QGraphicsItem*> m_icons; - QPropertyAnimation m_animation; -}; - -#endif // BLURPICKER_H diff --git a/examples/effects/customshader/blurpicker.qrc b/examples/effects/customshader/blurpicker.qrc deleted file mode 100644 index e88eaca966..0000000000 --- a/examples/effects/customshader/blurpicker.qrc +++ /dev/null @@ -1,14 +0,0 @@ -<RCC> - <qresource prefix="/" > - <file>images/background.jpg</file> - <file>images/accessories-calculator.png</file> - <file>images/accessories-text-editor.png</file> - <file>images/help-browser.png</file> - <file>images/internet-group-chat.png</file> - <file>images/internet-mail.png</file> - <file>images/internet-web-browser.png</file> - <file>images/office-calendar.png</file> - <file>images/system-users.png</file> - </qresource> -</RCC> - diff --git a/examples/effects/customshader/customshader.pro b/examples/effects/customshader/customshader.pro deleted file mode 100644 index 4ce5d2ba7b..0000000000 --- a/examples/effects/customshader/customshader.pro +++ /dev/null @@ -1,10 +0,0 @@ -SOURCES += main.cpp blurpicker.cpp blureffect.cpp customshadereffect.cpp -HEADERS += blurpicker.h blureffect.h customshadereffect.h -RESOURCES += blurpicker.qrc -QT += opengl - -# install -target.path = $$[QT_INSTALL_EXAMPLES]/effects/customshader -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS customshader.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/effects/customshader -INSTALLS += target sources diff --git a/examples/effects/customshader/customshadereffect.cpp b/examples/effects/customshader/customshadereffect.cpp deleted file mode 100644 index 73bbf4f097..0000000000 --- a/examples/effects/customshader/customshadereffect.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "customshadereffect.h" -#include <QGLShaderProgram> - -static char const colorizeShaderCode[] = - "uniform lowp vec4 effectColor;\n" - "mediump vec4 customShader(lowp sampler2D imageTexture, highp vec2 textureCoords) {\n" - " vec4 src = texture2D(imageTexture, textureCoords);\n" - " float gray = dot(src.rgb, vec3(0.212671, 0.715160, 0.072169));\n" - " vec4 colorize = 1.0-((1.0-gray)*(1.0-effectColor));\n" - " return vec4(colorize.rgb * src.a, src.a);\n" - "}"; - -CustomShaderEffect::CustomShaderEffect() - : QGraphicsShaderEffect(), - color(Qt::red) -{ - setPixelShaderFragment(colorizeShaderCode); -} - -void CustomShaderEffect::setEffectColor(const QColor& c) -{ - color = c; - setUniformsDirty(); -} - -void CustomShaderEffect::setUniforms(QGLShaderProgram *program) -{ - program->setUniformValue("effectColor", color); -} diff --git a/examples/effects/customshader/customshadereffect.h b/examples/effects/customshader/customshadereffect.h deleted file mode 100644 index 48940db399..0000000000 --- a/examples/effects/customshader/customshadereffect.h +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef CUSTOMSHADEREFFECT_H -#define CUSTOMSHADEREFFECT_H - -#include <QGraphicsEffect> -#include <QtOpenGL/private/qgraphicsshadereffect_p.h> -#include <QGraphicsItem> - -class CustomShaderEffect: public QGraphicsShaderEffect -{ -public: - CustomShaderEffect(); - - QColor effectColor() const { return color; } - void setEffectColor(const QColor& c); - -protected: - void setUniforms(QGLShaderProgram *program); - -private: - QColor color; -}; - -#endif // CUSTOMSHADEREFFECT_H diff --git a/examples/effects/customshader/images/README.txt b/examples/effects/customshader/images/README.txt deleted file mode 100644 index 0927e177d2..0000000000 --- a/examples/effects/customshader/images/README.txt +++ /dev/null @@ -1,5 +0,0 @@ -The background is taken from a public domain photo at: -http://www.photos8.com/view/computer_board2-800x600.html - -All other icons are from the Tango Desktop project: -http://tango.freedesktop.org/Tango_Desktop_Project diff --git a/examples/effects/customshader/images/accessories-calculator.png b/examples/effects/customshader/images/accessories-calculator.png Binary files differdeleted file mode 100644 index 4e7661f65c..0000000000 --- a/examples/effects/customshader/images/accessories-calculator.png +++ /dev/null diff --git a/examples/effects/customshader/images/accessories-text-editor.png b/examples/effects/customshader/images/accessories-text-editor.png Binary files differdeleted file mode 100644 index 33bef0bc17..0000000000 --- a/examples/effects/customshader/images/accessories-text-editor.png +++ /dev/null diff --git a/examples/effects/customshader/images/background.jpg b/examples/effects/customshader/images/background.jpg Binary files differdeleted file mode 100644 index e75b38899d..0000000000 --- a/examples/effects/customshader/images/background.jpg +++ /dev/null diff --git a/examples/effects/customshader/images/help-browser.png b/examples/effects/customshader/images/help-browser.png Binary files differdeleted file mode 100644 index 8ef4fae91b..0000000000 --- a/examples/effects/customshader/images/help-browser.png +++ /dev/null diff --git a/examples/effects/customshader/images/internet-group-chat.png b/examples/effects/customshader/images/internet-group-chat.png Binary files differdeleted file mode 100644 index dd92d93947..0000000000 --- a/examples/effects/customshader/images/internet-group-chat.png +++ /dev/null diff --git a/examples/effects/customshader/images/internet-mail.png b/examples/effects/customshader/images/internet-mail.png Binary files differdeleted file mode 100644 index 7e6b93be83..0000000000 --- a/examples/effects/customshader/images/internet-mail.png +++ /dev/null diff --git a/examples/effects/customshader/images/internet-web-browser.png b/examples/effects/customshader/images/internet-web-browser.png Binary files differdeleted file mode 100644 index a979a92b4f..0000000000 --- a/examples/effects/customshader/images/internet-web-browser.png +++ /dev/null diff --git a/examples/effects/customshader/images/office-calendar.png b/examples/effects/customshader/images/office-calendar.png Binary files differdeleted file mode 100644 index e09590682b..0000000000 --- a/examples/effects/customshader/images/office-calendar.png +++ /dev/null diff --git a/examples/effects/customshader/images/system-users.png b/examples/effects/customshader/images/system-users.png Binary files differdeleted file mode 100644 index a7f630a5bd..0000000000 --- a/examples/effects/customshader/images/system-users.png +++ /dev/null diff --git a/examples/effects/effects.pro b/examples/effects/effects.pro index 2dec8d5829..0f062eee0c 100644 --- a/examples/effects/effects.pro +++ b/examples/effects/effects.pro @@ -5,12 +5,6 @@ SUBDIRS = \ lighting \ fademessage -!contains(QT_CONFIG, opengles1):!contains(QT_CONFIG, opengles1cl) { - contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles2) { - SUBDIRS += customshader - } -} - # install target.path = $$[QT_INSTALL_EXAMPLES]/effects sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS effects.pro README diff --git a/examples/graphicsview/diagramscene/diagramscene.cpp b/examples/graphicsview/diagramscene/diagramscene.cpp index ad7dbdffa4..a4f1d78434 100644 --- a/examples/graphicsview/diagramscene/diagramscene.cpp +++ b/examples/graphicsview/diagramscene/diagramscene.cpp @@ -163,10 +163,10 @@ void DiagramScene::mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent) textItem->setFont(myFont); textItem->setTextInteractionFlags(Qt::TextEditorInteraction); textItem->setZValue(1000.0); - connect(textItem, SIGNAL(lostFocus(DiagramTextItem *)), - this, SLOT(editorLostFocus(DiagramTextItem *))); - connect(textItem, SIGNAL(selectedChange(QGraphicsItem *)), - this, SIGNAL(itemSelected(QGraphicsItem *))); + connect(textItem, SIGNAL(lostFocus(DiagramTextItem*)), + this, SLOT(editorLostFocus(DiagramTextItem*))); + connect(textItem, SIGNAL(selectedChange(QGraphicsItem*)), + this, SIGNAL(itemSelected(QGraphicsItem*))); addItem(textItem); textItem->setDefaultTextColor(myTextColor); textItem->setPos(mouseEvent->scenePos()); diff --git a/examples/graphicsview/diagramscene/mainwindow.cpp b/examples/graphicsview/diagramscene/mainwindow.cpp index 868a3ebdc7..d4edcc4aea 100644 --- a/examples/graphicsview/diagramscene/mainwindow.cpp +++ b/examples/graphicsview/diagramscene/mainwindow.cpp @@ -58,12 +58,12 @@ MainWindow::MainWindow() scene = new DiagramScene(itemMenu); scene->setSceneRect(QRectF(0, 0, 5000, 5000)); - connect(scene, SIGNAL(itemInserted(DiagramItem *)), - this, SLOT(itemInserted(DiagramItem *))); - connect(scene, SIGNAL(textInserted(QGraphicsTextItem *)), - this, SLOT(textInserted(QGraphicsTextItem *))); - connect(scene, SIGNAL(itemSelected(QGraphicsItem *)), - this, SLOT(itemSelected(QGraphicsItem *))); + connect(scene, SIGNAL(itemInserted(DiagramItem*)), + this, SLOT(itemInserted(DiagramItem*))); + connect(scene, SIGNAL(textInserted(QGraphicsTextItem*)), + this, SLOT(textInserted(QGraphicsTextItem*))); + connect(scene, SIGNAL(itemSelected(QGraphicsItem*)), + this, SLOT(itemSelected(QGraphicsItem*))); createToolbars(); QHBoxLayout *layout = new QHBoxLayout; @@ -347,8 +347,8 @@ void MainWindow::createToolBox() itemWidget->setLayout(layout); backgroundButtonGroup = new QButtonGroup; - connect(backgroundButtonGroup, SIGNAL(buttonClicked(QAbstractButton *)), - this, SLOT(backgroundButtonGroupClicked(QAbstractButton *))); + connect(backgroundButtonGroup, SIGNAL(buttonClicked(QAbstractButton*)), + this, SLOT(backgroundButtonGroupClicked(QAbstractButton*))); QGridLayout *backgroundLayout = new QGridLayout; backgroundLayout->addWidget(createBackgroundCellWidget(tr("Blue Grid"), @@ -462,8 +462,8 @@ void MainWindow::createToolbars() fontCombo = new QFontComboBox(); fontSizeCombo = new QComboBox(); - connect(fontCombo, SIGNAL(currentFontChanged(const QFont &)), - this, SLOT(currentFontChanged(const QFont &))); + connect(fontCombo, SIGNAL(currentFontChanged(QFont)), + this, SLOT(currentFontChanged(QFont))); fontSizeCombo = new QComboBox; fontSizeCombo->setEditable(true); @@ -471,8 +471,8 @@ void MainWindow::createToolbars() fontSizeCombo->addItem(QString().setNum(i)); QIntValidator *validator = new QIntValidator(2, 64, this); fontSizeCombo->setValidator(validator); - connect(fontSizeCombo, SIGNAL(currentIndexChanged(const QString &)), - this, SLOT(fontSizeChanged(const QString &))); + connect(fontSizeCombo, SIGNAL(currentIndexChanged(QString)), + this, SLOT(fontSizeChanged(QString))); fontColorToolButton = new QToolButton; fontColorToolButton->setPopupMode(QToolButton::MenuButtonPopup); @@ -539,8 +539,8 @@ void MainWindow::createToolbars() scales << tr("50%") << tr("75%") << tr("100%") << tr("125%") << tr("150%"); sceneScaleCombo->addItems(scales); sceneScaleCombo->setCurrentIndex(2); - connect(sceneScaleCombo, SIGNAL(currentIndexChanged(const QString &)), - this, SLOT(sceneScaleChanged(const QString &))); + connect(sceneScaleCombo, SIGNAL(currentIndexChanged(QString)), + this, SLOT(sceneScaleChanged(QString))); pointerToolbar = addToolBar(tr("Pointer type")); pointerToolbar->addWidget(pointerButton); diff --git a/examples/graphicsview/portedasteroids/toplevel.cpp b/examples/graphicsview/portedasteroids/toplevel.cpp index c51ecca9e5..c2b59042b3 100644 --- a/examples/graphicsview/portedasteroids/toplevel.cpp +++ b/examples/graphicsview/portedasteroids/toplevel.cpp @@ -129,10 +129,10 @@ KAstTopLevel::KAstTopLevel( QWidget *parent, const char *name ) view = new KAsteroidsView( mainWin ); view->setFocusPolicy( Qt::StrongFocus ); - connect( view, SIGNAL( shipKilled() ), SLOT( slotShipKilled() ) ); - connect( view, SIGNAL( rockHit(int) ), SLOT( slotRockHit(int) ) ); - connect( view, SIGNAL( rocksRemoved() ), SLOT( slotRocksRemoved() ) ); - connect( view, SIGNAL( updateVitals() ), SLOT( slotUpdateVitals() ) ); + connect( view, SIGNAL(shipKilled()), SLOT(slotShipKilled()) ); + connect( view, SIGNAL(rockHit(int)), SLOT(slotRockHit(int)) ); + connect( view, SIGNAL(rocksRemoved()), SLOT(slotRocksRemoved()) ); + connect( view, SIGNAL(updateVitals()), SLOT(slotUpdateVitals()) ); Q3VBoxLayout *vb = new Q3VBoxLayout( mainWin ); Q3HBoxLayout *hb = new Q3HBoxLayout; diff --git a/examples/help/contextsensitivehelp/wateringconfigdialog.cpp b/examples/help/contextsensitivehelp/wateringconfigdialog.cpp index 15a0b291f3..a09409a633 100644 --- a/examples/help/contextsensitivehelp/wateringconfigdialog.cpp +++ b/examples/help/contextsensitivehelp/wateringconfigdialog.cpp @@ -54,8 +54,8 @@ WateringConfigDialog::WateringConfigDialog() m_widgetInfo.insert(m_ui.sourceComboBox, tr("water source")); m_widgetInfo.insert(m_ui.filterCheckBox, tr("water filtering")); - connect(qApp, SIGNAL(focusChanged(QWidget*, QWidget*)), - this, SLOT(focusChanged(QWidget*, QWidget*))); + connect(qApp, SIGNAL(focusChanged(QWidget*,QWidget*)), + this, SLOT(focusChanged(QWidget*,QWidget*))); } void WateringConfigDialog::focusChanged(QWidget *, QWidget *now) diff --git a/examples/help/remotecontrol/remotecontrol.cpp b/examples/help/remotecontrol/remotecontrol.cpp index adb92d097c..84f81df69f 100644 --- a/examples/help/remotecontrol/remotecontrol.cpp +++ b/examples/help/remotecontrol/remotecontrol.cpp @@ -68,7 +68,7 @@ RemoteControl::RemoteControl(QWidget *parent, Qt::WFlags flags) ui.startUrlLineEdit->setText(rc); process = new QProcess(this); - connect(process, SIGNAL(finished(int, QProcess::ExitStatus)), + connect(process, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(helpViewerClosed())); } diff --git a/examples/help/simpletextviewer/findfiledialog.cpp b/examples/help/simpletextviewer/findfiledialog.cpp index b1ac448cfc..fd5d2a6598 100644 --- a/examples/help/simpletextviewer/findfiledialog.cpp +++ b/examples/help/simpletextviewer/findfiledialog.cpp @@ -177,9 +177,9 @@ void FindFileDialog::createComboBoxes() directoryComboBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); - connect(fileNameComboBox, SIGNAL(editTextChanged(const QString &)), + connect(fileNameComboBox, SIGNAL(editTextChanged(QString)), this, SLOT(update())); - connect(directoryComboBox, SIGNAL(currentIndexChanged(const QString &)), + connect(directoryComboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(update())); } @@ -191,8 +191,8 @@ void FindFileDialog::createFilesTree() foundFilesTree->setRootIsDecorated(false); foundFilesTree->setSelectionMode(QAbstractItemView::SingleSelection); - connect(foundFilesTree, SIGNAL(itemActivated(QTreeWidgetItem *, int)), - this, SLOT(openFile(QTreeWidgetItem *))); + connect(foundFilesTree, SIGNAL(itemActivated(QTreeWidgetItem*,int)), + this, SLOT(openFile(QTreeWidgetItem*))); } void FindFileDialog::createLabels() diff --git a/examples/ipc/localfortuneclient/client.cpp b/examples/ipc/localfortuneclient/client.cpp index 803ec3d960..9262fbeaca 100644 --- a/examples/ipc/localfortuneclient/client.cpp +++ b/examples/ipc/localfortuneclient/client.cpp @@ -66,7 +66,7 @@ Client::Client(QWidget *parent) socket = new QLocalSocket(this); - connect(hostLineEdit, SIGNAL(textChanged(const QString &)), + connect(hostLineEdit, SIGNAL(textChanged(QString)), this, SLOT(enableGetFortuneButton())); connect(getFortuneButton, SIGNAL(clicked()), this, SLOT(requestNewFortune())); diff --git a/examples/itemviews/addressbook/addresswidget.cpp b/examples/itemviews/addressbook/addresswidget.cpp index e7e8a9c9d5..741fc0be5a 100644 --- a/examples/itemviews/addressbook/addresswidget.cpp +++ b/examples/itemviews/addressbook/addresswidget.cpp @@ -49,8 +49,8 @@ AddressWidget::AddressWidget(QWidget *parent) { table = new TableModel(this); newAddressTab = new NewAddressTab(this); - connect(newAddressTab, SIGNAL(sendDetails(QString, QString)), - this, SLOT(addEntry(QString, QString))); + connect(newAddressTab, SIGNAL(sendDetails(QString,QString)), + this, SLOT(addEntry(QString,QString))); addTab(newAddressTab, "Address Book"); @@ -186,8 +186,8 @@ void AddressWidget::setupTabs() proxyModel->sort(0, Qt::AscendingOrder); connect(tableView->selectionModel(), - SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)), - this, SIGNAL(selectionChanged(const QItemSelection &))); + SIGNAL(selectionChanged(QItemSelection,QItemSelection)), + this, SIGNAL(selectionChanged(QItemSelection))); addTab(tableView, str); } diff --git a/examples/itemviews/addressbook/mainwindow.cpp b/examples/itemviews/addressbook/mainwindow.cpp index 278786dcad..fb0ba5a0a2 100644 --- a/examples/itemviews/addressbook/mainwindow.cpp +++ b/examples/itemviews/addressbook/mainwindow.cpp @@ -97,8 +97,8 @@ void MainWindow::createMenus() connect(removeAct, SIGNAL(triggered()), addressWidget, SLOT(removeEntry())); - connect(addressWidget, SIGNAL(selectionChanged(const QItemSelection &)), - this, SLOT(updateActions(const QItemSelection &))); + connect(addressWidget, SIGNAL(selectionChanged(QItemSelection)), + this, SLOT(updateActions(QItemSelection))); } //! [1b] diff --git a/examples/itemviews/basicsortfiltermodel/window.cpp b/examples/itemviews/basicsortfiltermodel/window.cpp index b09089689b..cd0b52c816 100644 --- a/examples/itemviews/basicsortfiltermodel/window.cpp +++ b/examples/itemviews/basicsortfiltermodel/window.cpp @@ -82,7 +82,7 @@ Window::Window() filterColumnLabel = new QLabel(tr("Filter &column:")); filterColumnLabel->setBuddy(filterColumnComboBox); - connect(filterPatternLineEdit, SIGNAL(textChanged(const QString &)), + connect(filterPatternLineEdit, SIGNAL(textChanged(QString)), this, SLOT(filterRegExpChanged())); connect(filterSyntaxComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(filterRegExpChanged())); diff --git a/examples/itemviews/customsortfiltermodel/window.cpp b/examples/itemviews/customsortfiltermodel/window.cpp index 290314abee..78f8f816f6 100644 --- a/examples/itemviews/customsortfiltermodel/window.cpp +++ b/examples/itemviews/customsortfiltermodel/window.cpp @@ -89,15 +89,15 @@ Window::Window() toLabel = new QLabel(tr("&To:")); toLabel->setBuddy(toDateEdit); - connect(filterPatternLineEdit, SIGNAL(textChanged(const QString &)), + connect(filterPatternLineEdit, SIGNAL(textChanged(QString)), this, SLOT(textFilterChanged())); connect(filterSyntaxComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(textFilterChanged())); connect(filterCaseSensitivityCheckBox, SIGNAL(toggled(bool)), this, SLOT(textFilterChanged())); - connect(fromDateEdit, SIGNAL(dateChanged(const QDate &)), + connect(fromDateEdit, SIGNAL(dateChanged(QDate)), this, SLOT(dateFilterChanged())); - connect(toDateEdit, SIGNAL(dateChanged(const QDate &)), + connect(toDateEdit, SIGNAL(dateChanged(QDate)), //! [3] //! [4] this, SLOT(dateFilterChanged())); //! [4] diff --git a/examples/itemviews/fetchmore/window.cpp b/examples/itemviews/fetchmore/window.cpp index bf01664603..327754d302 100644 --- a/examples/itemviews/fetchmore/window.cpp +++ b/examples/itemviews/fetchmore/window.cpp @@ -59,9 +59,9 @@ Window::Window(QWidget *parent) logViewer = new QTextBrowser; logViewer->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred)); - connect(lineEdit, SIGNAL(textChanged(const QString &)), - model, SLOT(setDirPath(const QString &))); - connect(lineEdit, SIGNAL(textChanged(const QString &)), + connect(lineEdit, SIGNAL(textChanged(QString)), + model, SLOT(setDirPath(QString))); + connect(lineEdit, SIGNAL(textChanged(QString)), logViewer, SLOT(clear())); connect(model, SIGNAL(numberPopulated(int)), this, SLOT(updateLog(int))); diff --git a/examples/itemviews/frozencolumn/freezetablewidget.cpp b/examples/itemviews/frozencolumn/freezetablewidget.cpp index 103152799f..72dc2a1d10 100644 --- a/examples/itemviews/frozencolumn/freezetablewidget.cpp +++ b/examples/itemviews/frozencolumn/freezetablewidget.cpp @@ -52,10 +52,10 @@ FreezeTableWidget::FreezeTableWidget(QAbstractItemModel * model) init(); //connect the headers and scrollbars of both tableviews together - connect(horizontalHeader(),SIGNAL(sectionResized ( int ,int,int )), this, - SLOT(updateSectionWidth(int, int, int))); - connect(verticalHeader(),SIGNAL(sectionResized ( int ,int,int )), this, - SLOT(updateSectionHeight(int, int, int))); + connect(horizontalHeader(),SIGNAL(sectionResized(int,int,int)), this, + SLOT(updateSectionWidth(int,int,int))); + connect(verticalHeader(),SIGNAL(sectionResized(int,int,int)), this, + SLOT(updateSectionHeight(int,int,int))); connect(frozenTableView->verticalScrollBar(), SIGNAL(valueChanged(int)), verticalScrollBar(), SLOT(setValue(int))); @@ -84,7 +84,8 @@ void FreezeTableWidget::init() //! [init part2] frozenTableView->setStyleSheet("QTableView { border: none;" - "background-color: #8EDE21;}"); //for demo purposes + "background-color: #8EDE21;" + "selection-background-color: #999}"); //for demo purposes frozenTableView->setSelectionModel(selectionModel()); for(int col=1; col<model()->columnCount(); col++) frozenTableView->setColumnHidden(col, true); @@ -146,6 +147,12 @@ QModelIndex FreezeTableWidget::moveCursor(CursorAction cursorAction, } //! [navigate] +void FreezeTableWidget::scrollTo (const QModelIndex & index, ScrollHint hint){ + if(index.column()>0) + QTableView::scrollTo(index, hint); +} + + //! [geometry] void FreezeTableWidget::updateFrozenTableGeometry() diff --git a/examples/itemviews/frozencolumn/freezetablewidget.h b/examples/itemviews/frozencolumn/freezetablewidget.h index 403890fb34..d236d40a0e 100644 --- a/examples/itemviews/frozencolumn/freezetablewidget.h +++ b/examples/itemviews/frozencolumn/freezetablewidget.h @@ -56,6 +56,7 @@ public: protected: virtual void resizeEvent(QResizeEvent *event); virtual QModelIndex moveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers); + void scrollTo (const QModelIndex & index, ScrollHint hint = EnsureVisible); private: QTableView *frozenTableView; diff --git a/examples/itemviews/frozencolumn/grades.txt b/examples/itemviews/frozencolumn/grades.txt index 4b55b47348..e1c6fcc49e 100644 --- a/examples/itemviews/frozencolumn/grades.txt +++ b/examples/itemviews/frozencolumn/grades.txt @@ -32,4 +32,5 @@ 9a+ , , 5.15a , , , XI+ , , , , 12a 9b , , 5.15b , , , , , , , 12b -# Wikipedia contributors. Grade (climbing). Wikipedia, The Free Encyclopedia. May 15, 2009, 20:42 UTC. Available at: http://en.wikipedia.org/w/index.php?title=Grade_(climbing)&oldid=290165724. Accessed May 28, 2009. +# Wikipedia contributors. Grade (climbing). Wikipedia, The Free Encyclopedia. May 15, 2009, 20:42 UTC. +# Available at: http://en.wikipedia.org/w/index.php?title=Grade_(climbing)&oldid=290165724. Accessed May 28, 2009. diff --git a/examples/mainwindows/dockwidgets/mainwindow.cpp b/examples/mainwindows/dockwidgets/mainwindow.cpp index 01b8026613..a50ff68166 100644 --- a/examples/mainwindows/dockwidgets/mainwindow.cpp +++ b/examples/mainwindows/dockwidgets/mainwindow.cpp @@ -335,9 +335,9 @@ void MainWindow::createDockWindows() addDockWidget(Qt::RightDockWidgetArea, dock); viewMenu->addAction(dock->toggleViewAction()); - connect(customerList, SIGNAL(currentTextChanged(const QString &)), - this, SLOT(insertCustomer(const QString &))); - connect(paragraphsList, SIGNAL(currentTextChanged(const QString &)), - this, SLOT(addParagraph(const QString &))); + connect(customerList, SIGNAL(currentTextChanged(QString)), + this, SLOT(insertCustomer(QString))); + connect(paragraphsList, SIGNAL(currentTextChanged(QString)), + this, SLOT(addParagraph(QString))); } //! [9] diff --git a/examples/mainwindows/mdi/mainwindow.cpp b/examples/mainwindows/mdi/mainwindow.cpp index edb33b7a40..5f0aa06c20 100644 --- a/examples/mainwindows/mdi/mainwindow.cpp +++ b/examples/mainwindows/mdi/mainwindow.cpp @@ -50,11 +50,11 @@ MainWindow::MainWindow() mdiArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded); mdiArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); setCentralWidget(mdiArea); - connect(mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow *)), + connect(mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)), this, SLOT(updateMenus())); windowMapper = new QSignalMapper(this); - connect(windowMapper, SIGNAL(mapped(QWidget *)), - this, SLOT(setActiveSubWindow(QWidget *))); + connect(windowMapper, SIGNAL(mapped(QWidget*)), + this, SLOT(setActiveSubWindow(QWidget*))); createActions(); createMenus(); diff --git a/examples/network/blockingfortuneclient/blockingclient.cpp b/examples/network/blockingfortuneclient/blockingclient.cpp index a3d7c233a7..441b6f77ac 100644 --- a/examples/network/blockingfortuneclient/blockingclient.cpp +++ b/examples/network/blockingfortuneclient/blockingclient.cpp @@ -85,19 +85,19 @@ BlockingClient::BlockingClient(QWidget *parent) buttonBox->addButton(getFortuneButton, QDialogButtonBox::ActionRole); buttonBox->addButton(quitButton, QDialogButtonBox::RejectRole); - connect(hostLineEdit, SIGNAL(textChanged(const QString &)), + connect(hostLineEdit, SIGNAL(textChanged(QString)), this, SLOT(enableGetFortuneButton())); - connect(portLineEdit, SIGNAL(textChanged(const QString &)), + connect(portLineEdit, SIGNAL(textChanged(QString)), this, SLOT(enableGetFortuneButton())); connect(getFortuneButton, SIGNAL(clicked()), this, SLOT(requestNewFortune())); connect(quitButton, SIGNAL(clicked()), this, SLOT(close())); //! [0] - connect(&thread, SIGNAL(newFortune(const QString &)), - this, SLOT(showFortune(const QString &))); + connect(&thread, SIGNAL(newFortune(QString)), + this, SLOT(showFortune(QString))); //! [0] //! [1] - connect(&thread, SIGNAL(error(int, const QString &)), - this, SLOT(displayError(int, const QString &))); + connect(&thread, SIGNAL(error(int,QString)), + this, SLOT(displayError(int,QString))); //! [1] QGridLayout *mainLayout = new QGridLayout; diff --git a/examples/network/broadcastreceiver/receiver.cpp b/examples/network/broadcastreceiver/receiver.cpp index 0a5922b1a2..7889a058ca 100644 --- a/examples/network/broadcastreceiver/receiver.cpp +++ b/examples/network/broadcastreceiver/receiver.cpp @@ -52,7 +52,7 @@ Receiver::Receiver(QWidget *parent) //! [0] udpSocket = new QUdpSocket(this); - udpSocket->bind(45454); + udpSocket->bind(45454, QUdpSocket::ShareAddress); //! [0] //! [1] diff --git a/examples/network/fortuneclient/client.cpp b/examples/network/fortuneclient/client.cpp index e043f78a39..f870c0e9f4 100644 --- a/examples/network/fortuneclient/client.cpp +++ b/examples/network/fortuneclient/client.cpp @@ -95,9 +95,9 @@ Client::Client(QWidget *parent) tcpSocket = new QTcpSocket(this); //! [1] - connect(hostLineEdit, SIGNAL(textChanged(const QString &)), + connect(hostLineEdit, SIGNAL(textChanged(QString)), this, SLOT(enableGetFortuneButton())); - connect(portLineEdit, SIGNAL(textChanged(const QString &)), + connect(portLineEdit, SIGNAL(textChanged(QString)), this, SLOT(enableGetFortuneButton())); connect(getFortuneButton, SIGNAL(clicked()), this, SLOT(requestNewFortune())); diff --git a/examples/network/googlesuggest/googlesuggest.cpp b/examples/network/googlesuggest/googlesuggest.cpp index a1075ec803..e9746b5231 100644 --- a/examples/network/googlesuggest/googlesuggest.cpp +++ b/examples/network/googlesuggest/googlesuggest.cpp @@ -66,7 +66,7 @@ GSuggestCompletion::GSuggestCompletion(QLineEdit *parent): QObject(parent), edit popup->installEventFilter(this); - connect(popup, SIGNAL(itemClicked(QTreeWidgetItem*, int)), + connect(popup, SIGNAL(itemClicked(QTreeWidgetItem*,int)), SLOT(doneCompletion())); timer = new QTimer(this); diff --git a/examples/network/http/httpwindow.cpp b/examples/network/http/httpwindow.cpp index d7b4b8cd44..b0139effb5 100644 --- a/examples/network/http/httpwindow.cpp +++ b/examples/network/http/httpwindow.cpp @@ -72,19 +72,19 @@ HttpWindow::HttpWindow(QWidget *parent) http = new QHttp(this); - connect(urlLineEdit, SIGNAL(textChanged(const QString &)), + connect(urlLineEdit, SIGNAL(textChanged(QString)), this, SLOT(enableDownloadButton())); - connect(http, SIGNAL(requestFinished(int, bool)), - this, SLOT(httpRequestFinished(int, bool))); - connect(http, SIGNAL(dataReadProgress(int, int)), - this, SLOT(updateDataReadProgress(int, int))); - connect(http, SIGNAL(responseHeaderReceived(const QHttpResponseHeader &)), - this, SLOT(readResponseHeader(const QHttpResponseHeader &))); - connect(http, SIGNAL(authenticationRequired(const QString &, quint16, QAuthenticator *)), - this, SLOT(slotAuthenticationRequired(const QString &, quint16, QAuthenticator *))); + connect(http, SIGNAL(requestFinished(int,bool)), + this, SLOT(httpRequestFinished(int,bool))); + connect(http, SIGNAL(dataReadProgress(int,int)), + this, SLOT(updateDataReadProgress(int,int))); + connect(http, SIGNAL(responseHeaderReceived(QHttpResponseHeader)), + this, SLOT(readResponseHeader(QHttpResponseHeader))); + connect(http, SIGNAL(authenticationRequired(QString,quint16,QAuthenticator*)), + this, SLOT(slotAuthenticationRequired(QString,quint16,QAuthenticator*))); #ifndef QT_NO_OPENSSL - connect(http, SIGNAL(sslErrors(const QList<QSslError> &)), - this, SLOT(sslErrors(const QList<QSslError> &))); + connect(http, SIGNAL(sslErrors(QList<QSslError>)), + this, SLOT(sslErrors(QList<QSslError>))); #endif connect(progressDialog, SIGNAL(canceled()), this, SLOT(cancelDownload())); connect(downloadButton, SIGNAL(clicked()), this, SLOT(downloadFile())); diff --git a/examples/network/network-chat/chatdialog.cpp b/examples/network/network-chat/chatdialog.cpp index 4406844c7c..2dbfd0e3cb 100644 --- a/examples/network/network-chat/chatdialog.cpp +++ b/examples/network/network-chat/chatdialog.cpp @@ -58,12 +58,12 @@ ChatDialog::ChatDialog(QWidget *parent) connect(sendButton, SIGNAL(clicked()), this, SLOT(returnPressed())); #endif connect(lineEdit, SIGNAL(returnPressed()), this, SLOT(returnPressed())); - connect(&client, SIGNAL(newMessage(const QString &, const QString &)), - this, SLOT(appendMessage(const QString &, const QString &))); - connect(&client, SIGNAL(newParticipant(const QString &)), - this, SLOT(newParticipant(const QString &))); - connect(&client, SIGNAL(participantLeft(const QString &)), - this, SLOT(participantLeft(const QString &))); + connect(&client, SIGNAL(newMessage(QString,QString)), + this, SLOT(appendMessage(QString,QString))); + connect(&client, SIGNAL(newParticipant(QString)), + this, SLOT(newParticipant(QString))); + connect(&client, SIGNAL(participantLeft(QString)), + this, SLOT(participantLeft(QString))); myNickName = client.nickName(); newParticipant(myNickName); diff --git a/examples/network/network-chat/client.cpp b/examples/network/network-chat/client.cpp index f1d4ceda6f..58d74fb22b 100644 --- a/examples/network/network-chat/client.cpp +++ b/examples/network/network-chat/client.cpp @@ -51,10 +51,10 @@ Client::Client() peerManager->setServerPort(server.serverPort()); peerManager->startBroadcasting(); - QObject::connect(peerManager, SIGNAL(newConnection(Connection *)), - this, SLOT(newConnection(Connection *))); - QObject::connect(&server, SIGNAL(newConnection(Connection *)), - this, SLOT(newConnection(Connection *))); + QObject::connect(peerManager, SIGNAL(newConnection(Connection*)), + this, SLOT(newConnection(Connection*))); + QObject::connect(&server, SIGNAL(newConnection(Connection*)), + this, SLOT(newConnection(Connection*))); } void Client::sendMessage(const QString &message) @@ -107,8 +107,8 @@ void Client::readyForUse() connection->peerPort())) return; - connect(connection, SIGNAL(newMessage(const QString &, const QString &)), - this, SIGNAL(newMessage(const QString &, const QString &))); + connect(connection, SIGNAL(newMessage(QString,QString)), + this, SIGNAL(newMessage(QString,QString))); peers.insert(connection->peerAddress(), connection); QString nick = connection->name(); diff --git a/examples/network/qftp/ftpwindow.cpp b/examples/network/qftp/ftpwindow.cpp index f3fc52b26c..493b440664 100644 --- a/examples/network/qftp/ftpwindow.cpp +++ b/examples/network/qftp/ftpwindow.cpp @@ -85,9 +85,9 @@ FtpWindow::FtpWindow(QWidget *parent) progressDialog = new QProgressDialog(this); - connect(fileList, SIGNAL(itemActivated(QTreeWidgetItem *, int)), - this, SLOT(processItem(QTreeWidgetItem *, int))); - connect(fileList, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), + connect(fileList, SIGNAL(itemActivated(QTreeWidgetItem*,int)), + this, SLOT(processItem(QTreeWidgetItem*,int))); + connect(fileList, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), this, SLOT(enableDownloadButton())); connect(progressDialog, SIGNAL(canceled()), this, SLOT(cancelDownload())); connect(connectButton, SIGNAL(clicked()), this, SLOT(connectOrDisconnect())); @@ -163,12 +163,12 @@ void FtpWindow::connectOrDisconnect() //![1] ftp = new QFtp(this); - connect(ftp, SIGNAL(commandFinished(int, bool)), - this, SLOT(ftpCommandFinished(int, bool))); - connect(ftp, SIGNAL(listInfo(const QUrlInfo &)), - this, SLOT(addToList(const QUrlInfo &))); - connect(ftp, SIGNAL(dataTransferProgress(qint64, qint64)), - this, SLOT(updateDataTransferProgress(qint64, qint64))); + connect(ftp, SIGNAL(commandFinished(int,bool)), + this, SLOT(ftpCommandFinished(int,bool))); + connect(ftp, SIGNAL(listInfo(QUrlInfo)), + this, SLOT(addToList(QUrlInfo))); + connect(ftp, SIGNAL(dataTransferProgress(qint64,qint64)), + this, SLOT(updateDataTransferProgress(qint64,qint64))); fileList->clear(); currentPath.clear(); diff --git a/examples/network/torrent/addtorrentdialog.cpp b/examples/network/torrent/addtorrentdialog.cpp index ce7c402b30..da9f24c408 100644 --- a/examples/network/torrent/addtorrentdialog.cpp +++ b/examples/network/torrent/addtorrentdialog.cpp @@ -70,8 +70,8 @@ AddTorrentDialog::AddTorrentDialog(QWidget *parent) this, SLOT(selectTorrent())); connect(ui.browseDestination, SIGNAL(clicked()), this, SLOT(selectDestination())); - connect(ui.torrentFile, SIGNAL(textChanged(const QString &)), - this, SLOT(setTorrent(const QString &))); + connect(ui.torrentFile, SIGNAL(textChanged(QString)), + this, SLOT(setTorrent(QString))); ui.destinationFolder->setText(destinationDirectory = QDir::current().path()); ui.torrentFile->setFocus(); diff --git a/examples/network/torrent/mainwindow.cpp b/examples/network/torrent/mainwindow.cpp index f38682e1fd..4c35d93396 100644 --- a/examples/network/torrent/mainwindow.cpp +++ b/examples/network/torrent/mainwindow.cpp @@ -175,8 +175,8 @@ MainWindow::MainWindow(QWidget *parent) // Set up connections connect(torrentView, SIGNAL(itemSelectionChanged()), this, SLOT(setActionsEnabled())); - connect(torrentView, SIGNAL(fileDropped(const QString &)), - this, SLOT(acceptFileDrop(const QString &))); + connect(torrentView, SIGNAL(fileDropped(QString)), + this, SLOT(acceptFileDrop(QString))); connect(uploadLimitSlider, SIGNAL(valueChanged(int)), this, SLOT(setUploadLimit(int))); connect(downloadLimitSlider, SIGNAL(valueChanged(int)), diff --git a/examples/network/torrent/torrentclient.cpp b/examples/network/torrent/torrentclient.cpp index 5eaab10f72..62c1a139a7 100644 --- a/examples/network/torrent/torrentclient.cpp +++ b/examples/network/torrent/torrentclient.cpp @@ -225,20 +225,20 @@ TorrentClient::TorrentClient(QObject *parent) : QObject(parent), d(new TorrentClientPrivate(this)) { // Connect the file manager - connect(&d->fileManager, SIGNAL(dataRead(int, int, int, const QByteArray &)), - this, SLOT(sendToPeer(int, int, int, const QByteArray &))); + connect(&d->fileManager, SIGNAL(dataRead(int,int,int,QByteArray)), + this, SLOT(sendToPeer(int,int,int,QByteArray))); connect(&d->fileManager, SIGNAL(verificationProgress(int)), this, SLOT(updateProgress(int))); connect(&d->fileManager, SIGNAL(verificationDone()), this, SLOT(fullVerificationDone())); - connect(&d->fileManager, SIGNAL(pieceVerified(int, bool)), - this, SLOT(pieceVerified(int, bool))); + connect(&d->fileManager, SIGNAL(pieceVerified(int,bool)), + this, SLOT(pieceVerified(int,bool))); connect(&d->fileManager, SIGNAL(error()), this, SLOT(handleFileError())); // Connect the tracker client - connect(&d->trackerClient, SIGNAL(peerListUpdated(const QList<TorrentPeer> &)), - this, SLOT(addToPeerList(const QList<TorrentPeer> &))); + connect(&d->trackerClient, SIGNAL(peerListUpdated(QList<TorrentPeer>)), + this, SLOT(addToPeerList(QList<TorrentPeer>))); connect(&d->trackerClient, SIGNAL(stopped()), this, SIGNAL(stopped())); } @@ -836,12 +836,12 @@ void TorrentClient::initializeConnection(PeerWireClient *client) this, SLOT(removeClient())); connect(client, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(removeClient())); - connect(client, SIGNAL(piecesAvailable(const QBitArray &)), - this, SLOT(peerPiecesAvailable(const QBitArray &))); - connect(client, SIGNAL(blockRequested(int, int, int)), - this, SLOT(peerRequestsBlock(int, int, int))); - connect(client, SIGNAL(blockReceived(int, int, const QByteArray &)), - this, SLOT(blockReceived(int, int, const QByteArray &))); + connect(client, SIGNAL(piecesAvailable(QBitArray)), + this, SLOT(peerPiecesAvailable(QBitArray))); + connect(client, SIGNAL(blockRequested(int,int,int)), + this, SLOT(peerRequestsBlock(int,int,int))); + connect(client, SIGNAL(blockReceived(int,int,QByteArray)), + this, SLOT(blockReceived(int,int,QByteArray))); connect(client, SIGNAL(choked()), this, SLOT(peerChoked())); connect(client, SIGNAL(unchoked()), diff --git a/examples/network/torrent/torrentserver.cpp b/examples/network/torrent/torrentserver.cpp index a7955c8fe1..e9ae234b59 100644 --- a/examples/network/torrent/torrentserver.cpp +++ b/examples/network/torrent/torrentserver.cpp @@ -69,8 +69,8 @@ void TorrentServer::incomingConnection(int socketDescriptor) if (client->setSocketDescriptor(socketDescriptor)) { if (ConnectionManager::instance()->canAddConnection() && !clients.isEmpty()) { - connect(client, SIGNAL(infoHashReceived(const QByteArray &)), - this, SLOT(processInfoHash(const QByteArray &))); + connect(client, SIGNAL(infoHashReceived(QByteArray)), + this, SLOT(processInfoHash(QByteArray))); connect(client, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(removeClient())); RateController::instance()->addSocket(client); diff --git a/examples/painting/fontsampler/mainwindow.cpp b/examples/painting/fontsampler/mainwindow.cpp index 9ef4ad38ca..4f83ba99af 100644 --- a/examples/painting/fontsampler/mainwindow.cpp +++ b/examples/painting/fontsampler/mainwindow.cpp @@ -53,10 +53,10 @@ MainWindow::MainWindow(QWidget *parent) setupFontTree(); connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit())); - connect(fontTree, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), - this, SLOT(showFont(QTreeWidgetItem *))); - connect(fontTree, SIGNAL(itemChanged(QTreeWidgetItem *, int)), - this, SLOT(updateStyles(QTreeWidgetItem *, int))); + connect(fontTree, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), + this, SLOT(showFont(QTreeWidgetItem*))); + connect(fontTree, SIGNAL(itemChanged(QTreeWidgetItem*,int)), + this, SLOT(updateStyles(QTreeWidgetItem*,int))); fontTree->setItemSelected(fontTree->topLevelItem(0), true); showFont(fontTree->topLevelItem(0)); @@ -279,8 +279,8 @@ void MainWindow::on_printPreviewAction_triggered() QPrinter printer(QPrinter::HighResolution); QPrintPreviewDialog preview(&printer, this); - connect(&preview, SIGNAL(paintRequested(QPrinter *)), - this, SLOT(printDocument(QPrinter *))); + connect(&preview, SIGNAL(paintRequested(QPrinter*)), + this, SLOT(printDocument(QPrinter*))); preview.exec(); } diff --git a/examples/painting/svgviewer/mainwindow.cpp b/examples/painting/svgviewer/mainwindow.cpp index c204de3bcf..6bef5cebfb 100644 --- a/examples/painting/svgviewer/mainwindow.cpp +++ b/examples/painting/svgviewer/mainwindow.cpp @@ -103,8 +103,8 @@ MainWindow::MainWindow() connect(openAction, SIGNAL(triggered()), this, SLOT(openFile())); connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit())); - connect(rendererGroup, SIGNAL(triggered(QAction *)), - this, SLOT(setRenderer(QAction *))); + connect(rendererGroup, SIGNAL(triggered(QAction*)), + this, SLOT(setRenderer(QAction*))); setCentralWidget(m_view); setWindowTitle(tr("SVG Viewer")); diff --git a/examples/phonon/qmusicplayer/mainwindow.cpp b/examples/phonon/qmusicplayer/mainwindow.cpp index 787ae539fb..bc1fa1b327 100644 --- a/examples/phonon/qmusicplayer/mainwindow.cpp +++ b/examples/phonon/qmusicplayer/mainwindow.cpp @@ -54,12 +54,12 @@ MainWindow::MainWindow() //![0] //![2] connect(mediaObject, SIGNAL(tick(qint64)), this, SLOT(tick(qint64))); - connect(mediaObject, SIGNAL(stateChanged(Phonon::State, Phonon::State)), - this, SLOT(stateChanged(Phonon::State, Phonon::State))); + connect(mediaObject, SIGNAL(stateChanged(Phonon::State,Phonon::State)), + this, SLOT(stateChanged(Phonon::State,Phonon::State))); connect(metaInformationResolver, SIGNAL(stateChanged(Phonon::State,Phonon::State)), - this, SLOT(metaStateChanged(Phonon::State, Phonon::State))); - connect(mediaObject, SIGNAL(currentSourceChanged(const Phonon::MediaSource &)), - this, SLOT(sourceChanged(const Phonon::MediaSource &))); + this, SLOT(metaStateChanged(Phonon::State,Phonon::State))); + connect(mediaObject, SIGNAL(currentSourceChanged(Phonon::MediaSource)), + this, SLOT(sourceChanged(Phonon::MediaSource))); connect(mediaObject, SIGNAL(aboutToFinish()), this, SLOT(aboutToFinish())); //![2] @@ -328,8 +328,8 @@ void MainWindow::setupUi() musicTable->setHorizontalHeaderLabels(headers); musicTable->setSelectionMode(QAbstractItemView::SingleSelection); musicTable->setSelectionBehavior(QAbstractItemView::SelectRows); - connect(musicTable, SIGNAL(cellPressed(int, int)), - this, SLOT(tableClicked(int, int))); + connect(musicTable, SIGNAL(cellPressed(int,int)), + this, SLOT(tableClicked(int,int))); QHBoxLayout *seekerLayout = new QHBoxLayout; seekerLayout->addWidget(seekSlider); diff --git a/examples/qtconcurrent/progressdialog/main.cpp b/examples/qtconcurrent/progressdialog/main.cpp index 8228549cae..1c561c8199 100644 --- a/examples/qtconcurrent/progressdialog/main.cpp +++ b/examples/qtconcurrent/progressdialog/main.cpp @@ -74,7 +74,7 @@ int main(int argc, char **argv) QFutureWatcher<void> futureWatcher; QObject::connect(&futureWatcher, SIGNAL(finished()), &dialog, SLOT(reset())); QObject::connect(&dialog, SIGNAL(canceled()), &futureWatcher, SLOT(cancel())); - QObject::connect(&futureWatcher, SIGNAL(progressRangeChanged(int, int)), &dialog, SLOT(setRange(int, int))); + QObject::connect(&futureWatcher, SIGNAL(progressRangeChanged(int,int)), &dialog, SLOT(setRange(int,int))); QObject::connect(&futureWatcher, SIGNAL(progressValueChanged(int)), &dialog, SLOT(setValue(int))); // Start the computation. diff --git a/examples/script/context2d/window.cpp b/examples/script/context2d/window.cpp index a260347cad..b0fe231397 100644 --- a/examples/script/context2d/window.cpp +++ b/examples/script/context2d/window.cpp @@ -106,7 +106,7 @@ Window::Window(QWidget *parent) QFileInfoList entries = dir.entryInfoList(QStringList() << "*.js"); for (int i = 0; i < entries.size(); ++i) m_view->addItem(entries.at(i).fileName()); - connect(m_view, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), + connect(m_view, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), this, SLOT(selectScript(QListWidgetItem*))); //! [1] diff --git a/examples/sql/drilldown/informationwindow.cpp b/examples/sql/drilldown/informationwindow.cpp index 08fe2ac8a0..a440aad2f6 100644 --- a/examples/sql/drilldown/informationwindow.cpp +++ b/examples/sql/drilldown/informationwindow.cpp @@ -83,16 +83,15 @@ InformationWindow::InformationWindow(int id, QSqlRelationalTableModel *offices, connect(imageFileEditor, SIGNAL(currentIndexChanged(int)), this, SLOT(enableButtons())); - QGridLayout *layout = new QGridLayout; - layout->addWidget(locationLabel, 0, 0, Qt::AlignLeft | Qt::AlignTop); - layout->addWidget(countryLabel, 1, 0, Qt::AlignLeft | Qt::AlignTop); - layout->addWidget(imageFileLabel, 2, 0, Qt::AlignLeft | Qt::AlignTop); - layout->addWidget(descriptionLabel, 3, 0, Qt::AlignLeft | Qt::AlignTop); - layout->addWidget(locationText, 0, 1); - layout->addWidget(countryText, 1, 1); - layout->addWidget(imageFileEditor, 2, 1); - layout->addWidget(descriptionEditor, 3, 1); - layout->addWidget(buttonBox, 4, 0, 1, 2); + QFormLayout *formLayout = new QFormLayout; + formLayout->addRow(locationLabel, locationText); + formLayout->addRow(countryLabel, countryText); + formLayout->addRow(imageFileLabel, imageFileEditor); + formLayout->addRow(descriptionLabel, descriptionEditor); + + QVBoxLayout *layout = new QVBoxLayout; + layout->addLayout(formLayout); + layout->addWidget(buttonBox); setLayout(layout); locationId = id; @@ -101,9 +100,6 @@ InformationWindow::InformationWindow(int id, QSqlRelationalTableModel *offices, setWindowFlags(Qt::Window); enableButtons(false); setWindowTitle(tr("Office: %1").arg(locationText->text())); -#ifndef Q_OS_SYMBIAN - resize(320, sizeHint().height()); -#endif } //! [4] @@ -154,8 +150,8 @@ void InformationWindow::createButtons() //! [8] //! [9] - buttonBox = new QDialogButtonBox; - buttonBox->addButton(submitButton, QDialogButtonBox::ResetRole); + buttonBox = new QDialogButtonBox(this); + buttonBox->addButton(submitButton, QDialogButtonBox::AcceptRole); buttonBox->addButton(revertButton, QDialogButtonBox::ResetRole); buttonBox->addButton(closeButton, QDialogButtonBox::RejectRole); } diff --git a/examples/sql/drilldown/view.cpp b/examples/sql/drilldown/view.cpp index ff4c5119c1..da291986ea 100644 --- a/examples/sql/drilldown/view.cpp +++ b/examples/sql/drilldown/view.cpp @@ -134,20 +134,20 @@ void View::showInformation(ImageItem *image) #ifndef Q_OS_SYMBIAN window->show(); #else - window->showFullScreen(); + window->showMaximized(); #endif } else { InformationWindow *window; window = new InformationWindow(id, officeTable, this); - connect(window, SIGNAL(imageChanged(int, QString)), - this, SLOT(updateImage(int, QString))); + connect(window, SIGNAL(imageChanged(int,QString)), + this, SLOT(updateImage(int,QString))); #ifndef Q_OS_SYMBIAN window->move(pos() + QPoint(20, 40)); window->show(); #else - window->showFullScreen(); + window->showMaximized(); #endif informationWindows.append(window); } diff --git a/examples/sql/masterdetail/mainwindow.cpp b/examples/sql/masterdetail/mainwindow.cpp index 24bcda80d5..d2b4d45691 100644 --- a/examples/sql/masterdetail/mainwindow.cpp +++ b/examples/sql/masterdetail/mainwindow.cpp @@ -69,10 +69,10 @@ MainWindow::MainWindow(const QString &artistTable, const QString &albumTable, uniqueAlbumId = model->rowCount(); uniqueArtistId = artistView->count(); - connect(model, SIGNAL(rowsInserted(QModelIndex, int, int)), - this, SLOT(updateHeader(QModelIndex, int, int))); - connect(model, SIGNAL(rowsRemoved(QModelIndex, int, int)), - this, SLOT(updateHeader(QModelIndex, int, int))); + connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(updateHeader(QModelIndex,int,int))); + connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(updateHeader(QModelIndex,int,int))); QGridLayout *layout = new QGridLayout; layout->addWidget(artists, 0, 0); diff --git a/examples/symbianpkgrules.pri b/examples/symbianpkgrules.pri index 59c54807ec..35edbfbcaf 100644 --- a/examples/symbianpkgrules.pri +++ b/examples/symbianpkgrules.pri @@ -11,3 +11,5 @@ vendorinfo = \ " " default_deployment.pkg_prerules += vendorinfo + +isEmpty(ICON):ICON = $$QT_SOURCE_TREE/src/s60installs/qt.svg diff --git a/examples/threads/mandelbrot/mandelbrotwidget.cpp b/examples/threads/mandelbrot/mandelbrotwidget.cpp index 6db781f99a..3835cc8643 100644 --- a/examples/threads/mandelbrot/mandelbrotwidget.cpp +++ b/examples/threads/mandelbrot/mandelbrotwidget.cpp @@ -65,8 +65,8 @@ MandelbrotWidget::MandelbrotWidget(QWidget *parent) curScale = DefaultScale; qRegisterMetaType<QImage>("QImage"); - connect(&thread, SIGNAL(renderedImage(const QImage &, double)), - this, SLOT(updatePixmap(const QImage &, double))); + connect(&thread, SIGNAL(renderedImage(QImage,double)), + this, SLOT(updatePixmap(QImage,double))); setWindowTitle(tr("Mandelbrot")); #ifndef QT_NO_CURSOR diff --git a/examples/tools/customcompleter/textedit.cpp b/examples/tools/customcompleter/textedit.cpp index 83ab070df8..5965368257 100644 --- a/examples/tools/customcompleter/textedit.cpp +++ b/examples/tools/customcompleter/textedit.cpp @@ -79,8 +79,8 @@ void TextEdit::setCompleter(QCompleter *completer) c->setWidget(this); c->setCompletionMode(QCompleter::PopupCompletion); c->setCaseSensitivity(Qt::CaseInsensitive); - QObject::connect(c, SIGNAL(activated(const QString&)), - this, SLOT(insertCompletion(const QString&))); + QObject::connect(c, SIGNAL(activated(QString)), + this, SLOT(insertCompletion(QString))); } //! [2] diff --git a/examples/tools/inputpanel/myinputpanel.cpp b/examples/tools/inputpanel/myinputpanel.cpp index 2d897cb891..8b9c96a919 100644 --- a/examples/tools/inputpanel/myinputpanel.cpp +++ b/examples/tools/inputpanel/myinputpanel.cpp @@ -49,8 +49,8 @@ MyInputPanel::MyInputPanel() { form.setupUi(this); - connect(qApp, SIGNAL(focusChanged(QWidget *, QWidget *)), - this, SLOT(saveFocusWidget(QWidget *, QWidget *))); + connect(qApp, SIGNAL(focusChanged(QWidget*,QWidget*)), + this, SLOT(saveFocusWidget(QWidget*,QWidget*))); signalMapper.setMapping(form.panelButton_1, form.panelButton_1); signalMapper.setMapping(form.panelButton_2, form.panelButton_2); @@ -90,8 +90,8 @@ MyInputPanel::MyInputPanel() connect(form.panelButton_hash, SIGNAL(clicked()), &signalMapper, SLOT(map())); - connect(&signalMapper, SIGNAL(mapped(QWidget *)), - this, SLOT(buttonClicked(QWidget *))); + connect(&signalMapper, SIGNAL(mapped(QWidget*)), + this, SLOT(buttonClicked(QWidget*))); } //! [0] diff --git a/examples/tools/regexp/regexpdialog.cpp b/examples/tools/regexp/regexpdialog.cpp index 3becc2bab7..254456eff4 100644 --- a/examples/tools/regexp/regexpdialog.cpp +++ b/examples/tools/regexp/regexpdialog.cpp @@ -126,9 +126,9 @@ RegExpDialog::RegExpDialog(QWidget *parent) } setLayout(mainLayout); - connect(patternComboBox, SIGNAL(editTextChanged(const QString &)), + connect(patternComboBox, SIGNAL(editTextChanged(QString)), this, SLOT(refresh())); - connect(textComboBox, SIGNAL(editTextChanged(const QString &)), + connect(textComboBox, SIGNAL(editTextChanged(QString)), this, SLOT(refresh())); connect(caseSensitiveCheckBox, SIGNAL(toggled(bool)), this, SLOT(refresh())); diff --git a/examples/tools/settingseditor/settingstree.cpp b/examples/tools/settingseditor/settingstree.cpp index e7e8ba8c59..bf4db3d762 100644 --- a/examples/tools/settingseditor/settingstree.cpp +++ b/examples/tools/settingseditor/settingstree.cpp @@ -121,14 +121,14 @@ void SettingsTree::refresh() if (!settings) return; - disconnect(this, SIGNAL(itemChanged(QTreeWidgetItem *, int)), - this, SLOT(updateSetting(QTreeWidgetItem *))); + disconnect(this, SIGNAL(itemChanged(QTreeWidgetItem*,int)), + this, SLOT(updateSetting(QTreeWidgetItem*))); settings->sync(); updateChildItems(0); - connect(this, SIGNAL(itemChanged(QTreeWidgetItem *, int)), - this, SLOT(updateSetting(QTreeWidgetItem *))); + connect(this, SIGNAL(itemChanged(QTreeWidgetItem*,int)), + this, SLOT(updateSetting(QTreeWidgetItem*))); } bool SettingsTree::event(QEvent *event) diff --git a/examples/tools/treemodelcompleter/mainwindow.cpp b/examples/tools/treemodelcompleter/mainwindow.cpp index e6f6c425cf..0fe9de0268 100644 --- a/examples/tools/treemodelcompleter/mainwindow.cpp +++ b/examples/tools/treemodelcompleter/mainwindow.cpp @@ -52,8 +52,8 @@ MainWindow::MainWindow(QWidget *parent) completer = new TreeModelCompleter(this); completer->setModel(modelFromFile(":/resources/treemodel.txt")); completer->setSeparator(QLatin1String(".")); - QObject::connect(completer, SIGNAL(highlighted(const QModelIndex&)), - this, SLOT(highlight(const QModelIndex&))); + QObject::connect(completer, SIGNAL(highlighted(QModelIndex)), + this, SLOT(highlight(QModelIndex))); QWidget *centralWidget = new QWidget; @@ -82,8 +82,8 @@ MainWindow::MainWindow(QWidget *parent) QLineEdit *separatorLineEdit = new QLineEdit; separatorLineEdit->setText(completer->separator()); - connect(separatorLineEdit, SIGNAL(textChanged(const QString&)), - completer, SLOT(setSeparator(const QString&))); + connect(separatorLineEdit, SIGNAL(textChanged(QString)), + completer, SLOT(setSeparator(QString))); QCheckBox *wrapCheckBox = new QCheckBox; wrapCheckBox->setText(tr("Wrap around completions")); @@ -92,8 +92,8 @@ MainWindow::MainWindow(QWidget *parent) contentsLabel = new QLabel; contentsLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - connect(separatorLineEdit, SIGNAL(textChanged(const QString&)), - this, SLOT(updateContentsLabel(const QString&))); + connect(separatorLineEdit, SIGNAL(textChanged(QString)), + this, SLOT(updateContentsLabel(QString))); treeView = new QTreeView; treeView->setModel(completer->model()); diff --git a/examples/tools/undoframework/mainwindow.cpp b/examples/tools/undoframework/mainwindow.cpp index 9de953bffc..2a0f037006 100644 --- a/examples/tools/undoframework/mainwindow.cpp +++ b/examples/tools/undoframework/mainwindow.cpp @@ -61,8 +61,8 @@ MainWindow::MainWindow() diagramScene->setBackgroundBrush(pixmapBrush); diagramScene->setSceneRect(QRect(0, 0, 500, 500)); - connect(diagramScene, SIGNAL(itemMoved(DiagramItem *, const QPointF &)), - this, SLOT(itemMoved(DiagramItem *, const QPointF &))); + connect(diagramScene, SIGNAL(itemMoved(DiagramItem*,QPointF)), + this, SLOT(itemMoved(DiagramItem*,QPointF))); setWindowTitle("Undo Framework"); QGraphicsView *view = new QGraphicsView(diagramScene); diff --git a/examples/webkit/domtraversal/window.h b/examples/webkit/domtraversal/window.h index 5988df9cbb..2795976ad3 100644 --- a/examples/webkit/domtraversal/window.h +++ b/examples/webkit/domtraversal/window.h @@ -46,7 +46,9 @@ #include <QUrl> #include <QWebElement> +QT_BEGIN_NAMESPACE class QTreeWidgetItem; +QT_END_NAMESPACE //! [Window class definition] #include "ui_window.h" diff --git a/examples/webkit/fancybrowser/mainwindow.cpp b/examples/webkit/fancybrowser/mainwindow.cpp index 11fac91937..844106f28c 100644 --- a/examples/webkit/fancybrowser/mainwindow.cpp +++ b/examples/webkit/fancybrowser/mainwindow.cpp @@ -62,7 +62,7 @@ MainWindow::MainWindow() view = new QWebView(this); view->load(QUrl("http://www.google.com/ncr")); connect(view, SIGNAL(loadFinished(bool)), SLOT(adjustLocation())); - connect(view, SIGNAL(titleChanged(const QString&)), SLOT(adjustTitle())); + connect(view, SIGNAL(titleChanged(QString)), SLOT(adjustTitle())); connect(view, SIGNAL(loadProgress(int)), SLOT(setProgress(int))); connect(view, SIGNAL(loadFinished(bool)), SLOT(finishLoading(bool))); @@ -82,7 +82,7 @@ MainWindow::MainWindow() QMenu *effectMenu = menuBar()->addMenu(tr("&Effect")); effectMenu->addAction("Highlight all links", this, SLOT(highlightAllLinks())); - QAction *rotateAction = new QAction(this); + rotateAction = new QAction(this); rotateAction->setIcon(style()->standardIcon(QStyle::SP_FileDialogDetailedView)); rotateAction->setCheckable(true); rotateAction->setText(tr("Turn images upside down")); @@ -136,6 +136,8 @@ void MainWindow::finishLoading(bool) progress = 100; adjustTitle(); view->page()->mainFrame()->evaluateJavaScript(jQuery); + + rotateImages(rotateAction->isChecked()); } //! [6] @@ -148,10 +150,10 @@ void MainWindow::highlightAllLinks() //! [7] //! [8] -void MainWindow::rotateImages(bool toggle) +void MainWindow::rotateImages(bool invert) { QString code; - if (toggle) + if (invert) code = "$('img').each( function () { $(this).css('-webkit-transition', '-webkit-transform 2s'); $(this).css('-webkit-transform', 'rotate(180deg)') } )"; else code = "$('img').each( function () { $(this).css('-webkit-transition', '-webkit-transform 2s'); $(this).css('-webkit-transform', 'rotate(0deg)') } )"; diff --git a/examples/webkit/fancybrowser/mainwindow.h b/examples/webkit/fancybrowser/mainwindow.h index 33fd8f5370..214d84b168 100644 --- a/examples/webkit/fancybrowser/mainwindow.h +++ b/examples/webkit/fancybrowser/mainwindow.h @@ -63,7 +63,7 @@ protected slots: void finishLoading(bool); void highlightAllLinks(); - void rotateImages(bool toggle); + void rotateImages(bool invert); void removeGifImages(); void removeInlineFrames(); void removeObjectElements(); @@ -73,6 +73,7 @@ private: QString jQuery; QWebView *view; QLineEdit *locationEdit; + QAction *rotateAction; int progress; //! [1] }; diff --git a/examples/webkit/formextractor/formextractor.pro b/examples/webkit/formextractor/formextractor.pro index 4364b4cbf6..51e0c45f24 100644 --- a/examples/webkit/formextractor/formextractor.pro +++ b/examples/webkit/formextractor/formextractor.pro @@ -1,5 +1,5 @@ QT += webkit network -TARGET = formExtractor +TARGET = formextractor TEMPLATE = app SOURCES += main.cpp \ formextractor.cpp \ diff --git a/examples/webkit/framecapture/framecapture.cpp b/examples/webkit/framecapture/framecapture.cpp index 2c2e11b506..ef49e9365c 100644 --- a/examples/webkit/framecapture/framecapture.cpp +++ b/examples/webkit/framecapture/framecapture.cpp @@ -59,6 +59,7 @@ void FrameCapture::load(const QUrl &url, const QString &outputFileName) m_page.mainFrame()->load(url); m_page.mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff); m_page.mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff); + m_page.setViewportSize(QSize(1024, 768)); } void FrameCapture::printProgress(int percent) @@ -81,41 +82,36 @@ void FrameCapture::saveResult(bool ok) return; } - // save each internal frame in different image files - int frameCounter = 0; - foreach(QWebFrame *frame, m_page.mainFrame()->childFrames()) { - QString fileName(m_fileName); - int index = m_fileName.lastIndexOf('.'); - fileName = fileName.insert(index, "_frame" + QString::number(++frameCounter)); + // save each frame in different image files + saveFrame(m_page.mainFrame()); - frame->setClipRenderToViewport(false); + emit finished(); +} - QImage image(frame->contentsSize(), QImage::Format_ARGB32_Premultiplied); - image.fill(Qt::transparent); +void FrameCapture::saveFrame(QWebFrame *frame) +{ + static int frameCounter = 0; - saveFrame(frame, image, fileName); + QString fileName(m_fileName); + if (frameCounter) { + int index = m_fileName.lastIndexOf('.'); + fileName = fileName.insert(index, "_frame" + QString::number(frameCounter)); } - // save the main frame - m_page.setViewportSize(m_page.mainFrame()->contentsSize()); - QImage image(m_page.mainFrame()->contentsSize(), QImage::Format_ARGB32_Premultiplied); + QImage image(frame->contentsSize(), QImage::Format_ARGB32_Premultiplied); image.fill(Qt::transparent); - saveFrame(m_page.mainFrame(), image, m_fileName); - - emit finished(); -} -void FrameCapture::saveFrame(QWebFrame *frame, QImage image, QString fileName) -{ QPainter painter(&image); painter.setRenderHint(QPainter::Antialiasing, true); painter.setRenderHint(QPainter::TextAntialiasing, true); painter.setRenderHint(QPainter::SmoothPixmapTransform, true); - - frame->render(&painter); - + frame->documentElement().render(&painter); painter.end(); image.save(fileName); + + ++frameCounter; + foreach(QWebFrame *childFrame, frame->childFrames()) + saveFrame(childFrame); } diff --git a/examples/webkit/framecapture/framecapture.h b/examples/webkit/framecapture/framecapture.h index 9de9c4301a..7a6d5f32e9 100644 --- a/examples/webkit/framecapture/framecapture.h +++ b/examples/webkit/framecapture/framecapture.h @@ -64,7 +64,7 @@ private: QString m_fileName; int m_percent; - void saveFrame(QWebFrame *frame, QImage image, QString fileName); + void saveFrame(QWebFrame *frame); }; #endif diff --git a/examples/webkit/framecapture/main.cpp b/examples/webkit/framecapture/main.cpp index 050947ae60..65c002634c 100644 --- a/examples/webkit/framecapture/main.cpp +++ b/examples/webkit/framecapture/main.cpp @@ -63,7 +63,7 @@ int main(int argc, char * argv[]) return 0; } - QUrl url = QWebView::guessUrlFromString(QString::fromLatin1(argv[1])); + QUrl url = QUrl::fromUserInput(QString::fromLatin1(argv[1])); QString fileName = QString::fromLatin1(argv[2]); QApplication a(argc, argv); diff --git a/examples/widgets/calendarwidget/window.cpp b/examples/widgets/calendarwidget/window.cpp index b8cb39c6b9..f0bcc6ccc4 100644 --- a/examples/widgets/calendarwidget/window.cpp +++ b/examples/widgets/calendarwidget/window.cpp @@ -196,7 +196,7 @@ void Window::createPreviewGroupBox() calendar->setMaximumDate(QDate(3000, 1, 1)); calendar->setGridVisible(true); - connect(calendar, SIGNAL(currentPageChanged(int, int)), + connect(calendar, SIGNAL(currentPageChanged(int,int)), this, SLOT(reformatCalendarPage())); previewLayout = new QGridLayout; @@ -357,14 +357,14 @@ void Window::createDatesGroupBox() maximumDateLabel->setBuddy(maximumDateEdit); //! [13] //! [14] - connect(currentDateEdit, SIGNAL(dateChanged(const QDate &)), - calendar, SLOT(setSelectedDate(const QDate &))); + connect(currentDateEdit, SIGNAL(dateChanged(QDate)), + calendar, SLOT(setSelectedDate(QDate))); connect(calendar, SIGNAL(selectionChanged()), this, SLOT(selectedDateChanged())); - connect(minimumDateEdit, SIGNAL(dateChanged(const QDate &)), - this, SLOT(minimumDateChanged(const QDate &))); - connect(maximumDateEdit, SIGNAL(dateChanged(const QDate &)), - this, SLOT(maximumDateChanged(const QDate &))); + connect(minimumDateEdit, SIGNAL(dateChanged(QDate)), + this, SLOT(minimumDateChanged(QDate))); + connect(maximumDateEdit, SIGNAL(dateChanged(QDate)), + this, SLOT(maximumDateChanged(QDate))); //! [14] QGridLayout *dateBoxLayout = new QGridLayout; @@ -418,7 +418,7 @@ void Window::createTextFormatsGroupBox() this, SLOT(weekdayFormatChanged())); connect(weekendColorCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(weekendFormatChanged())); - connect(headerTextFormatCombo, SIGNAL(currentIndexChanged(const QString &)), + connect(headerTextFormatCombo, SIGNAL(currentIndexChanged(QString)), this, SLOT(reformatHeaders())); connect(firstFridayCheckBox, SIGNAL(toggled(bool)), this, SLOT(reformatCalendarPage())); diff --git a/examples/widgets/charactermap/mainwindow.cpp b/examples/widgets/charactermap/mainwindow.cpp index 199d47189c..8850e0d618 100644 --- a/examples/widgets/charactermap/mainwindow.cpp +++ b/examples/widgets/charactermap/mainwindow.cpp @@ -79,19 +79,19 @@ MainWindow::MainWindow() //! [3] //! [4] - connect(fontCombo, SIGNAL(currentFontChanged(const QFont &)), - this, SLOT(findStyles(const QFont &))); - connect(fontCombo, SIGNAL(currentFontChanged(const QFont &)), - this, SLOT(findSizes(const QFont &))); - connect(fontCombo, SIGNAL(currentFontChanged(const QFont &)), - characterWidget, SLOT(updateFont(const QFont &))); - connect(sizeCombo, SIGNAL(currentIndexChanged(const QString &)), - characterWidget, SLOT(updateSize(const QString &))); - connect(styleCombo, SIGNAL(currentIndexChanged(const QString &)), - characterWidget, SLOT(updateStyle(const QString &))); + connect(fontCombo, SIGNAL(currentFontChanged(QFont)), + this, SLOT(findStyles(QFont))); + connect(fontCombo, SIGNAL(currentFontChanged(QFont)), + this, SLOT(findSizes(QFont))); + connect(fontCombo, SIGNAL(currentFontChanged(QFont)), + characterWidget, SLOT(updateFont(QFont))); + connect(sizeCombo, SIGNAL(currentIndexChanged(QString)), + characterWidget, SLOT(updateSize(QString))); + connect(styleCombo, SIGNAL(currentIndexChanged(QString)), + characterWidget, SLOT(updateStyle(QString))); //! [4] //! [5] - connect(characterWidget, SIGNAL(characterSelected(const QString &)), - this, SLOT(insertCharacter(const QString &))); + connect(characterWidget, SIGNAL(characterSelected(QString)), + this, SLOT(insertCharacter(QString))); connect(clipboardButton, SIGNAL(clicked()), this, SLOT(updateClipboard())); //! [5] connect(fontMerging, SIGNAL(toggled(bool)), characterWidget, SLOT(updateFontMerging(bool))); diff --git a/examples/widgets/codeeditor/codeeditor.cpp b/examples/widgets/codeeditor/codeeditor.cpp index 4632466058..e8eb8cfe93 100644 --- a/examples/widgets/codeeditor/codeeditor.cpp +++ b/examples/widgets/codeeditor/codeeditor.cpp @@ -50,7 +50,7 @@ CodeEditor::CodeEditor(QWidget *parent) : QPlainTextEdit(parent) lineNumberArea = new LineNumberArea(this); connect(this, SIGNAL(blockCountChanged(int)), this, SLOT(updateLineNumberAreaWidth(int))); - connect(this, SIGNAL(updateRequest(const QRect &, int)), this, SLOT(updateLineNumberArea(const QRect &, int))); + connect(this, SIGNAL(updateRequest(QRect,int)), this, SLOT(updateLineNumberArea(QRect,int))); connect(this, SIGNAL(cursorPositionChanged()), this, SLOT(highlightCurrentLine())); updateLineNumberAreaWidth(0); diff --git a/examples/widgets/icons/mainwindow.cpp b/examples/widgets/icons/mainwindow.cpp index 51e46191c6..2fb72671d8 100644 --- a/examples/widgets/icons/mainwindow.cpp +++ b/examples/widgets/icons/mainwindow.cpp @@ -293,7 +293,7 @@ void MainWindow::createImagesGroupBox() //! [23] //! [24] - connect(imagesTable, SIGNAL(itemChanged(QTableWidgetItem *)), + connect(imagesTable, SIGNAL(itemChanged(QTableWidgetItem*)), //! [24] //! [25] this, SLOT(changeIcon())); diff --git a/examples/widgets/spinboxes/window.cpp b/examples/widgets/spinboxes/window.cpp index 19f6d26ab5..3a75fd38ab 100644 --- a/examples/widgets/spinboxes/window.cpp +++ b/examples/widgets/spinboxes/window.cpp @@ -144,8 +144,8 @@ void Window::createDateTimeEdits() formatComboBox->addItem("hh:mm ap"); //! [9] //! [10] - connect(formatComboBox, SIGNAL(activated(const QString &)), - this, SLOT(setFormatString(const QString &))); + connect(formatComboBox, SIGNAL(activated(QString)), + this, SLOT(setFormatString(QString))); //! [10] setFormatString(formatComboBox->currentText()); diff --git a/examples/widgets/styles/widgetgallery.cpp b/examples/widgets/styles/widgetgallery.cpp index 95267619e3..5cef57cc4e 100644 --- a/examples/widgets/styles/widgetgallery.cpp +++ b/examples/widgets/styles/widgetgallery.cpp @@ -70,9 +70,9 @@ WidgetGallery::WidgetGallery(QWidget *parent) //! [0] //! [1] - connect(styleComboBox, SIGNAL(activated(const QString &)), + connect(styleComboBox, SIGNAL(activated(QString)), //! [1] //! [2] - this, SLOT(changeStyle(const QString &))); + this, SLOT(changeStyle(QString))); connect(useStylePaletteCheckBox, SIGNAL(toggled(bool)), this, SLOT(changePalette())); connect(disableWidgetsCheckBox, SIGNAL(toggled(bool)), diff --git a/examples/widgets/tablet/mainwindow.cpp b/examples/widgets/tablet/mainwindow.cpp index 2a94259e6e..9fa8c24580 100644 --- a/examples/widgets/tablet/mainwindow.cpp +++ b/examples/widgets/tablet/mainwindow.cpp @@ -169,8 +169,8 @@ void MainWindow::createActions() alphaChannelGroup->addAction(alphaChannelPressureAction); alphaChannelGroup->addAction(alphaChannelTiltAction); alphaChannelGroup->addAction(noAlphaChannelAction); - connect(alphaChannelGroup, SIGNAL(triggered(QAction *)), - this, SLOT(alphaActionTriggered(QAction *))); + connect(alphaChannelGroup, SIGNAL(triggered(QAction*)), + this, SLOT(alphaActionTriggered(QAction*))); //! [9] colorSaturationVTiltAction = new QAction(tr("&Vertical Tilt"), this); @@ -191,8 +191,8 @@ void MainWindow::createActions() colorSaturationGroup->addAction(colorSaturationHTiltAction); colorSaturationGroup->addAction(colorSaturationPressureAction); colorSaturationGroup->addAction(noColorSaturationAction); - connect(colorSaturationGroup, SIGNAL(triggered(QAction *)), - this, SLOT(saturationActionTriggered(QAction *))); + connect(colorSaturationGroup, SIGNAL(triggered(QAction*)), + this, SLOT(saturationActionTriggered(QAction*))); lineWidthPressureAction = new QAction(tr("&Pressure"), this); lineWidthPressureAction->setCheckable(true); @@ -208,8 +208,8 @@ void MainWindow::createActions() lineWidthGroup->addAction(lineWidthPressureAction); lineWidthGroup->addAction(lineWidthTiltAction); lineWidthGroup->addAction(lineWidthFixedAction); - connect(lineWidthGroup, SIGNAL(triggered(QAction *)), - this, SLOT(lineWidthActionTriggered(QAction *))); + connect(lineWidthGroup, SIGNAL(triggered(QAction*)), + this, SLOT(lineWidthActionTriggered(QAction*))); exitAction = new QAction(tr("E&xit"), this); exitAction->setShortcuts(QKeySequence::Quit); diff --git a/examples/xml/dombookmarks/xbeltree.cpp b/examples/xml/dombookmarks/xbeltree.cpp index 996deccdf0..7e2cc08405 100644 --- a/examples/xml/dombookmarks/xbeltree.cpp +++ b/examples/xml/dombookmarks/xbeltree.cpp @@ -90,8 +90,8 @@ bool XbelTree::read(QIODevice *device) clear(); - disconnect(this, SIGNAL(itemChanged(QTreeWidgetItem *, int)), - this, SLOT(updateDomElement(QTreeWidgetItem *, int))); + disconnect(this, SIGNAL(itemChanged(QTreeWidgetItem*,int)), + this, SLOT(updateDomElement(QTreeWidgetItem*,int))); QDomElement child = root.firstChildElement("folder"); while (!child.isNull()) { @@ -99,8 +99,8 @@ bool XbelTree::read(QIODevice *device) child = child.nextSiblingElement("folder"); } - connect(this, SIGNAL(itemChanged(QTreeWidgetItem *, int)), - this, SLOT(updateDomElement(QTreeWidgetItem *, int))); + connect(this, SIGNAL(itemChanged(QTreeWidgetItem*,int)), + this, SLOT(updateDomElement(QTreeWidgetItem*,int))); return true; } diff --git a/examples/xml/rsslisting/rsslisting.cpp b/examples/xml/rsslisting/rsslisting.cpp index 526f3e0327..73797b50bd 100644 --- a/examples/xml/rsslisting/rsslisting.cpp +++ b/examples/xml/rsslisting/rsslisting.cpp @@ -83,18 +83,18 @@ RSSListing::RSSListing(QWidget *parent) abortButton->setEnabled(false); treeWidget = new QTreeWidget(this); - connect(treeWidget, SIGNAL(itemActivated(QTreeWidgetItem*, int)), + connect(treeWidget, SIGNAL(itemActivated(QTreeWidgetItem*,int)), this, SLOT(itemActivated(QTreeWidgetItem*))); QStringList headerLabels; headerLabels << tr("Title") << tr("Link"); treeWidget->setHeaderLabels(headerLabels); treeWidget->header()->setResizeMode(QHeaderView::ResizeToContents); - connect(&http, SIGNAL(readyRead(const QHttpResponseHeader &)), - this, SLOT(readData(const QHttpResponseHeader &))); + connect(&http, SIGNAL(readyRead(QHttpResponseHeader)), + this, SLOT(readData(QHttpResponseHeader))); - connect(&http, SIGNAL(requestFinished(int, bool)), - this, SLOT(finished(int, bool))); + connect(&http, SIGNAL(requestFinished(int,bool)), + this, SLOT(finished(int,bool))); connect(lineEdit, SIGNAL(returnPressed()), this, SLOT(fetch())); connect(fetchButton, SIGNAL(clicked()), this, SLOT(fetch())); diff --git a/mkspecs/features/symbian/application_icon.prf b/mkspecs/features/symbian/application_icon.prf index b0c1bb1b5f..1edbe14491 100644 --- a/mkspecs/features/symbian/application_icon.prf +++ b/mkspecs/features/symbian/application_icon.prf @@ -3,38 +3,49 @@ load(data_caging_paths) # If no_icon keyword exist, the S60 UI app is just made hidden. This because S60 app FW # requires the registration resource file to exist always contains( CONFIG, no_icon ) { - symbian:RSS_RULES ="hidden = KAppIsHidden;" + symbian:RSS_RULES ="hidden = KAppIsHidden;" CONFIG -= no_icon } else { # There is no point in compiling the MIF icon if no_icon CONFIGS is set !isEmpty(ICON) { - - !count(ICON, $$size(TRANSLATIONS)):!count(ICON, 1) { - message("ICON keyword must have one or the same amout of items as in TRANSLATIONS keyword") + + !count(ICON, 1) { + ICON = $$first(ICON) + warning("Only first icon specified in ICON variable is used: $$ICON") } - # MIF files will have UID in their names, if TARGET.UID3 is not set, remind the user - isEmpty(TARGET.UID3):error("TARGET.UID3 must be explicitly defined for ICON generation") + # Try to produce indentical string to fixedTarget in SymbianMakefileGenerator, replaced chars taken + # from SymbianMakefileGenerator::removeSpecialCharacters. + # + # Note: it is not a major problem even baseTarget is not 100% identical to fixedTarget since qmake + # only uses filename from RSS_RULES.icon_file when referring to icon file name. + baseTarget = $$basename(TARGET) + baseTarget = $$replace(baseTarget, /,_) + baseTarget = $$replace(baseTarget, \\,_) + baseTarget = $$replace(baseTarget, -,_) + baseTarget = $$replace(baseTarget, :,_) + baseTarget = $$replace(baseTarget, \.,_) + baseTarget = $$replace(baseTarget, " ",_) # Note: symbian-sbsv2 builds can't utilize extra compiler for mifconv, so ICON handling is done in code - symbian-abld { - #Makefile: requires paths with backslash + symbian-abld { + #Makefile: requires paths with backslash ICON = $$replace( ICON, /, \\) # Extra compiler rules for mifconv - mifconv.output = ${ZDIR}$$APP_RESOURCE_DIR/$${TARGET.UID3}.mif + mifconv.output = ${ZDIR}$$APP_RESOURCE_DIR/$${baseTarget}.mif # Based on: http://www.forum.nokia.com/document/Cpp_Developers_Library # svg-t icons should always use /c32 depth - mifconv.commands = mifconv ${QMAKE_FILE_OUT} $$join(ICON, " /c32 ", "/c32 ",) + mifconv.commands = mifconv ${QMAKE_FILE_OUT} /c32 ${QMAKE_FILE_IN} mifconv.input = ICON mifconv.CONFIG = no_link combine # target_predeps together with combine seems not to work correctly, lets define it by ourselves PRE_TARGETDEPS += $$mifconv.output QMAKE_EXTRA_COMPILERS += mifconv - } + } # Rules to use generated MIF file from symbian resources RSS_RULES.number_of_icons = $$size(ICON) - RSS_RULES.icon_file = $$replace( APP_RESOURCE_DIR, /, \\\\ )\\\\$${TARGET.UID3}.mif + RSS_RULES.icon_file = $$APP_RESOURCE_DIR/$${baseTarget}.mif } } diff --git a/mkspecs/features/symbian/armcc_warnings.prf b/mkspecs/features/symbian/armcc_warnings.prf index 95b3bc0869..72bc996202 100644 --- a/mkspecs/features/symbian/armcc_warnings.prf +++ b/mkspecs/features/symbian/armcc_warnings.prf @@ -8,3 +8,6 @@ # 2874: <variable> may be used before being set (this one sounds useful, but # it's output also for class instances, making it useless in practice) QMAKE_CFLAGS.ARMCC += --diag_suppress 111,185,191,368,1293,1294,2874 + +# 6780: <origvis> visibility removed from symbol '<symname>' through <impexp> +QMAKE_LFLAGS.ARMCC += --diag_suppress 6780 diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp index 1326a49687..afaf338db1 100644 --- a/qmake/generators/symbian/symmake.cpp +++ b/qmake/generators/symbian/symmake.cpp @@ -209,7 +209,7 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t) generatePkgFile(iconFile); } - writeBldInfContent(t, generatePkg); + writeBldInfContent(t, generatePkg, iconFile); // Generate empty wrapper makefile here, because wrapper makefile must exist before writeMkFile, // but all required data is not yet available. @@ -378,14 +378,11 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile) .arg(installPathRegResource) .arg(fixedTarget + "_reg.rsc") << endl; - QString myIconFile = iconFile; - myIconFile = myIconFile.replace("\\\\", "\\"); - if (!iconFile.isEmpty()) { t << QString("\"%1epoc32/data/z%2\" - \"!:%3\"") .arg(epocRoot()) - .arg(QString(myIconFile).replace('\\','/')) - .arg(myIconFile) << endl << endl; + .arg(iconFile) + .arg(QDir::toNativeSeparators(iconFile)) << endl << endl; } } } @@ -1120,7 +1117,7 @@ void SymbianMakefileGenerator::writeMmpFileRulesPart(QTextStream& t) } } -void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploymentExtension) +void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploymentExtension, const QString &iconFile) { // Read user defined bld inf rules @@ -1242,7 +1239,7 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy // Generate extension rules - writeBldInfExtensionRulesPart(t); + writeBldInfExtensionRulesPart(t, iconFile); userItems = userBldInfRules.value(BLD_INF_TAG_EXTENSIONS); foreach(QString item, userItems) @@ -1320,14 +1317,17 @@ void SymbianMakefileGenerator::writeRssFile(QString &numberOfIcons, QString &ico t << "\t\t{" << endl; t << "\t\tcaption = STRING_r_caption;" << endl; - if (numberOfIcons.isEmpty() || iconFile.isEmpty()) { + QString rssIconFile = iconFile; + rssIconFile = rssIconFile.replace("/", "\\\\"); + + if (numberOfIcons.isEmpty() || rssIconFile.isEmpty()) { // There can be maximum one item in this tag, validated when parsed t << "\t\tnumber_of_icons = 0;" << endl; t << "\t\ticon_file = \"\";" << endl; } else { // There can be maximum one item in this tag, validated when parsed t << "\t\tnumber_of_icons = " << numberOfIcons << ";" << endl; - t << "\t\ticon_file = \"" << iconFile << "\";" << endl; + t << "\t\ticon_file = \"" << rssIconFile << "\";" << endl; } t << "\t\t};" << endl; t << "\t}" << endl; @@ -1697,6 +1697,7 @@ void SymbianMakefileGenerator::generateCleanCommands(QTextStream& t, void SymbianMakefileGenerator::removeSpecialCharacters(QString& str) { + // When modifying this method check also application_icon.prf str.replace(QString("/"), QString("_")); str.replace(QString("\\"), QString("_")); str.replace(QString("-"), QString("_")); diff --git a/qmake/generators/symbian/symmake.h b/qmake/generators/symbian/symmake.h index a3e2c17fdd..2e78c46007 100644 --- a/qmake/generators/symbian/symmake.h +++ b/qmake/generators/symbian/symmake.h @@ -99,7 +99,7 @@ protected: void checkOverridability(QStringList &overridableKeywords, QString &checkString); void writeHeader(QTextStream &t); - void writeBldInfContent(QTextStream& t, bool addDeploymentExtension); + void writeBldInfContent(QTextStream& t, bool addDeploymentExtension, const QString &iconFile); static bool removeDuplicatedStrings(QStringList& stringList); @@ -143,7 +143,7 @@ protected: void generateDistcleanTargets(QTextStream& t); // Subclass implements - virtual void writeBldInfExtensionRulesPart(QTextStream& t) = 0; + virtual void writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile) = 0; virtual void writeBldInfMkFilePart(QTextStream& t, bool addDeploymentExtension) = 0; virtual void writeMkFile(const QString& wrapperFileName, bool deploymentOnly) = 0; virtual void writeWrapperMakefile(QFile& wrapperFile, bool isPrimaryMakefile) = 0; diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp index 1b5464fe97..6225720f56 100644 --- a/qmake/generators/symbian/symmake_abld.cpp +++ b/qmake/generators/symbian/symmake_abld.cpp @@ -379,10 +379,11 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool } } -void SymbianAbldMakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t) +void SymbianAbldMakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile) { // We don't use extensions for anything in abld Q_UNUSED(t); + Q_UNUSED(iconTargetFile); } bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t) diff --git a/qmake/generators/symbian/symmake_abld.h b/qmake/generators/symbian/symmake_abld.h index 11b9cd18a0..56d31e1e46 100644 --- a/qmake/generators/symbian/symmake_abld.h +++ b/qmake/generators/symbian/symmake_abld.h @@ -51,7 +51,7 @@ class SymbianAbldMakefileGenerator : public SymbianMakefileGenerator protected: // Inherited from parent - virtual void writeBldInfExtensionRulesPart(QTextStream& t); + virtual void writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile); virtual void writeBldInfMkFilePart(QTextStream& t, bool addDeploymentExtension); virtual void writeMkFile(const QString& wrapperFileName, bool deploymentOnly); virtual void writeWrapperMakefile(QFile& wrapperFile, bool isPrimaryMakefile); diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp index 5e624de033..c7eae646bc 100644 --- a/qmake/generators/symbian/symmake_sbsv2.cpp +++ b/qmake/generators/symbian/symmake_sbsv2.cpp @@ -238,7 +238,7 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo } } -void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t) +void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile) { // Makes sure we have needed FLMs in place. exportFlm(); @@ -376,12 +376,18 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t t << "START EXTENSION s60/mifconv" << endl; QFileInfo iconInfo = fileInfo(icon); - QString iconPath = iconInfo.path(); + + QFileInfo bldinf(project->values("MAKEFILE").first()); + QString iconPath = bldinf.dir().relativeFilePath(iconInfo.path()); + QString iconFile = iconInfo.baseName(); + QFileInfo iconTargetInfo = fileInfo(iconTargetFile); + QString iconTarget = iconTargetInfo.fileName(); + t << "OPTION SOURCES -c32 " << iconFile << endl; t << "OPTION SOURCEDIR " << iconPath << endl; - t << "OPTION TARGETFILE " << uid3 << ".mif" << endl; + t << "OPTION TARGETFILE " << iconTarget << endl; t << "OPTION SVGENCODINGVERSION 3" << endl; // Compatibility with S60 3.1 devices and up t << "END" << endl; } diff --git a/qmake/generators/symbian/symmake_sbsv2.h b/qmake/generators/symbian/symmake_sbsv2.h index 9472b68825..339490840b 100644 --- a/qmake/generators/symbian/symmake_sbsv2.h +++ b/qmake/generators/symbian/symmake_sbsv2.h @@ -51,7 +51,7 @@ class SymbianSbsv2MakefileGenerator : public SymbianMakefileGenerator protected: // Inherited from parent - virtual void writeBldInfExtensionRulesPart(QTextStream& t); + virtual void writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile); virtual void writeBldInfMkFilePart(QTextStream& t, bool addDeploymentExtension); virtual void writeMkFile(const QString& wrapperFileName, bool deploymentOnly); virtual void writeWrapperMakefile(QFile& wrapperFile, bool isPrimaryMakefile); diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp b/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp index 3008fca993..3c9df93787 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp +++ b/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp @@ -1551,6 +1551,7 @@ static bool indic_shape_syllable(HB_Bool openType, HB_ShaperItem *item, bool inv | PreSubstProperty | BelowSubstProperty | AboveSubstProperty + | PostSubstProperty | HalantProperty | PositioningProperties); @@ -1608,14 +1609,7 @@ static bool indic_shape_syllable(HB_Bool openType, HB_ShaperItem *item, bool inv // pres always applies // blws always applies // abvs always applies - - // psts - // ### this looks slightly different from before, but I believe it's correct - if (reordered[len-1] != halant || base != len-2) - properties[base] &= ~PostSubstProperty; - for (i = base+1; i < len; ++i) - properties[i] &= ~PostSubstProperty; - + // psts always applies // halant always applies #ifdef INDIC_DEBUG diff --git a/src/3rdparty/harfbuzz/tests/shaping/main.cpp b/src/3rdparty/harfbuzz/tests/shaping/main.cpp index 12fa7c48f2..827ac30803 100644 --- a/src/3rdparty/harfbuzz/tests/shaping/main.cpp +++ b/src/3rdparty/harfbuzz/tests/shaping/main.cpp @@ -686,7 +686,7 @@ void tst_QScriptEngine::bengali() void tst_QScriptEngine::gurmukhi() { { - FT_Face face = loadFace("lohit.punjabi.1.1.ttf"); + FT_Face face = loadFace("lohit_pa.ttf"); if (face) { const ShapeTable shape_table [] = { { { 0xA15, 0xA4D, 0xa39, 0x0 }, @@ -998,6 +998,36 @@ void tst_QScriptEngine::malayalam() QSKIP("couln't find AkrutiMal2Normal.ttf", SkipAll); } } + + { + FT_Face face = loadFace("Rachana.ttf"); + if (face) { + const ShapeTable shape_table [] = { + { { 0xd37, 0xd4d, 0xd1f, 0xd4d, 0xd30, 0xd40, 0x0 }, + { 0x385, 0xa3, 0x0 } }, + { { 0xd2f, 0xd4d, 0xd15, 0xd4d, 0xd15, 0xd41, 0x0 }, + { 0x2ff, 0x0 } }, + { { 0xd33, 0xd4d, 0xd33, 0x0 }, + { 0x3f8, 0x0 } }, + { { 0xd2f, 0xd4d, 0xd15, 0xd4d, 0xd15, 0xd41, 0x0 }, + { 0x2ff, 0x0 } }, + + { {0}, {0} } + }; + + + const ShapeTable *s = shape_table; + while (s->unicode[0]) { + QVERIFY( shaping(face, s, HB_Script_Malayalam) ); + ++s; + } + + FT_Done_Face(face); + } else { + QSKIP("couln't find Rachana.ttf", SkipAll); + } + } + } void tst_QScriptEngine::sinhala() @@ -1113,7 +1143,7 @@ void tst_QScriptEngine::nko() void tst_QScriptEngine::linearB() { { - FT_Face face = loadFace("PENUTURE.TTF"); + FT_Face face = loadFace("penuture.ttf"); if (face) { const ShapeTable shape_table [] = { { { 0xd800, 0xdc01, 0xd800, 0xdc02, 0xd800, 0xdc03, 0 }, diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pro b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pro deleted file mode 100644 index 0cd2e1a9fc..0000000000 --- a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pro +++ /dev/null @@ -1,69 +0,0 @@ -# JavaScriptCore - qmake build info -CONFIG += building-libs -include($$PWD/../WebKit.pri) - -TEMPLATE = lib -CONFIG += staticlib -TARGET = JavaScriptCore - -CONFIG += depend_includepath - -contains(QT_CONFIG, embedded):CONFIG += embedded - -CONFIG(QTDIR_build) { - GENERATED_SOURCES_DIR = $$PWD/generated - OLDDESTDIR = $$DESTDIR - include($$QT_SOURCE_TREE/src/qbase.pri) - INSTALLS = - DESTDIR = $$OLDDESTDIR - PRECOMPILED_HEADER = $$PWD/../WebKit/qt/WebKit_pch.h - DEFINES *= NDEBUG -} - -isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = tmp -GENERATED_SOURCES_DIR_SLASH = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP} - -INCLUDEPATH += $$GENERATED_SOURCES_DIR - -!CONFIG(QTDIR_build) { - CONFIG(debug, debug|release) { - OBJECTS_DIR = obj/debug - } else { # Release - OBJECTS_DIR = obj/release - } -} - -CONFIG(release):!CONFIG(QTDIR_build) { - contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols - unix:contains(QT_CONFIG, reduce_relocations):CONFIG += bsymbolic_functions -} - -linux-*: DEFINES += HAVE_STDINT_H -freebsd-*: DEFINES += HAVE_PTHREAD_NP_H - -DEFINES += BUILD_WEBKIT - -win32-*: DEFINES += _HAS_TR1=0 - -# Pick up 3rdparty libraries from INCLUDE/LIB just like with MSVC -win32-g++ { - TMPPATH = $$quote($$(INCLUDE)) - QMAKE_INCDIR_POST += $$split(TMPPATH,";") - TMPPATH = $$quote($$(LIB)) - QMAKE_LIBDIR_POST += $$split(TMPPATH,";") -} - -DEFINES += WTF_USE_JAVASCRIPTCORE_BINDINGS=1 - -DEFINES += WTF_CHANGES=1 - -include(JavaScriptCore.pri) - -QMAKE_EXTRA_TARGETS += generated_files - -lessThan(QT_MINOR_VERSION, 4) { - DEFINES += QT_BEGIN_NAMESPACE="" QT_END_NAMESPACE="" -} - -*-g++*:QMAKE_CXXFLAGS_RELEASE -= -O2 -*-g++*:QMAKE_CXXFLAGS_RELEASE += -O3 diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp index 073b35a924..b098728f22 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp +++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp @@ -561,6 +561,7 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiTrampoline) "\n" +HIDE_SYMBOL(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" "stmdb sp!, {r1-r3}" "\n" "stmdb sp!, {r4-r8, lr}" "\n" @@ -584,6 +585,7 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" +HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" "mov r0, sp" "\n" "mov lr, r6" "\n" @@ -593,6 +595,7 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" // Both has the same return sequence ".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" +HIDE_SYMBOL(ctiOpThrowNotCaught) "\n" SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" "add sp, sp, #32" "\n" "ldmia sp!, {r4-r8, lr}" "\n" diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h index 43975ff121..c2b8c02153 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h +++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h @@ -246,6 +246,10 @@ namespace JSC { MacroAssemblerCodePtr m_ctiNativeCallThunk; }; +#if COMPILER(GCC) +#pragma GCC visibility push(hidden) +#endif + extern "C" { EncodedJSValue JIT_STUB cti_op_add(STUB_ARGS_DECLARATION); EncodedJSValue JIT_STUB cti_op_bitand(STUB_ARGS_DECLARATION); @@ -363,6 +367,10 @@ extern "C" { void* JIT_STUB cti_vm_lazyLinkCall(STUB_ARGS_DECLARATION); } // extern "C" +#if COMPILER(GCC) +#pragma GCC visibility pop +#endif + } // namespace JSC #endif // ENABLE(JIT) diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h index 188b68faa8..be74e2a5f1 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h +++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h @@ -328,6 +328,16 @@ #define WTF_PLATFORM_BIG_ENDIAN 1 #endif +/* PLATFORM(SPARC32) */ +#if defined(__sparc) && !defined(__arch64__) || defined(__sparcv8) +#define WTF_PLATFORM_SPARC32 1 +#define WTF_PLATFORM_BIG_ENDIAN 1 +#endif + +#if PLATFORM(SPARC32) || PLATFORM(SPARC64) +#define WTF_PLATFORM_SPARC +#endif + /* PLATFORM(HPPA) */ /* a.k.a. PA-RISC */ #if defined(__hppa) || defined(__hppa__) diff --git a/src/3rdparty/phonon/ds9/mediaobject.cpp b/src/3rdparty/phonon/ds9/mediaobject.cpp index 106a4c8ed6..34f92c275f 100644 --- a/src/3rdparty/phonon/ds9/mediaobject.cpp +++ b/src/3rdparty/phonon/ds9/mediaobject.cpp @@ -361,17 +361,17 @@ namespace Phonon m_graphs[i] = new MediaGraph(this, i); } - connect(&m_thread, SIGNAL(stateReady(Graph, Phonon::State)), - SLOT(slotStateReady(Graph, Phonon::State))); + connect(&m_thread, SIGNAL(stateReady(Graph,Phonon::State)), + SLOT(slotStateReady(Graph,Phonon::State))); - connect(&m_thread, SIGNAL(eventReady(Graph, long, long)), - SLOT(handleEvents(Graph, long, long))); + connect(&m_thread, SIGNAL(eventReady(Graph,long,long)), + SLOT(handleEvents(Graph,long,long))); - connect(&m_thread, SIGNAL(asyncRenderFinished(quint16, HRESULT, Graph)), - SLOT(finishLoading(quint16, HRESULT, Graph))); + connect(&m_thread, SIGNAL(asyncRenderFinished(quint16,HRESULT,Graph)), + SLOT(finishLoading(quint16,HRESULT,Graph))); - connect(&m_thread, SIGNAL(asyncSeekingFinished(quint16, qint64)), - SLOT(finishSeeking(quint16, qint64))); + connect(&m_thread, SIGNAL(asyncSeekingFinished(quint16,qint64)), + SLOT(finishSeeking(quint16,qint64))); //really special case m_mediaObject = this; m_thread.start(); diff --git a/src/3rdparty/phonon/gstreamer/mediaobject.cpp b/src/3rdparty/phonon/gstreamer/mediaobject.cpp index eafaeec740..b6d23ecd09 100644 --- a/src/3rdparty/phonon/gstreamer/mediaobject.cpp +++ b/src/3rdparty/phonon/gstreamer/mediaobject.cpp @@ -95,8 +95,8 @@ MediaObject::MediaObject(Backend *backend, QObject *parent) m_backend->addBusWatcher(this); connect(m_tickTimer, SIGNAL(timeout()), SLOT(emitTick())); } - connect(this, SIGNAL(stateChanged(Phonon::State, Phonon::State)), - this, SLOT(notifyStateChange(Phonon::State, Phonon::State))); + connect(this, SIGNAL(stateChanged(Phonon::State,Phonon::State)), + this, SLOT(notifyStateChange(Phonon::State,Phonon::State))); } diff --git a/src/3rdparty/phonon/mmf/mediaobject.cpp b/src/3rdparty/phonon/mmf/mediaobject.cpp index e42e0fa623..21dcfe1caf 100644 --- a/src/3rdparty/phonon/mmf/mediaobject.cpp +++ b/src/3rdparty/phonon/mmf/mediaobject.cpp @@ -319,10 +319,10 @@ void MMF::MediaObject::createPlayer(const MediaSource &source) } connect(m_player.data(), SIGNAL(totalTimeChanged(qint64)), SIGNAL(totalTimeChanged(qint64))); - connect(m_player.data(), SIGNAL(stateChanged(Phonon::State, Phonon::State)), SIGNAL(stateChanged(Phonon::State, Phonon::State))); + connect(m_player.data(), SIGNAL(stateChanged(Phonon::State,Phonon::State)), SIGNAL(stateChanged(Phonon::State,Phonon::State))); connect(m_player.data(), SIGNAL(finished()), SIGNAL(finished())); connect(m_player.data(), SIGNAL(tick(qint64)), SIGNAL(tick(qint64))); - connect(m_player.data(), SIGNAL(metaDataChanged(const QMultiMap<QString, QString>&)), SIGNAL(metaDataChanged(const QMultiMap<QString, QString>&))); + connect(m_player.data(), SIGNAL(metaDataChanged(QMultiMap<QString,QString>)), SIGNAL(metaDataChanged(QMultiMap<QString,QString>))); // We need to call setError() after doing the connects, otherwise the // error won't be received. diff --git a/src/3rdparty/phonon/mmf/objectdump.cpp b/src/3rdparty/phonon/mmf/objectdump.cpp index 6b6b71e8be..3d10be4d06 100644 --- a/src/3rdparty/phonon/mmf/objectdump.cpp +++ b/src/3rdparty/phonon/mmf/objectdump.cpp @@ -16,8 +16,6 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef QT_NO_DEBUG - #include <QByteArray> #include <QDebug> #include <QHash> @@ -525,5 +523,3 @@ void dumpAncestors(const QObject& leaf, QVisitor& visitor) QT_END_NAMESPACE -#endif - diff --git a/src/3rdparty/phonon/mmf/objectdump.h b/src/3rdparty/phonon/mmf/objectdump.h index e94b3acaaa..86aeabada7 100644 --- a/src/3rdparty/phonon/mmf/objectdump.h +++ b/src/3rdparty/phonon/mmf/objectdump.h @@ -19,8 +19,6 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #ifndef OBJECTDUMP_H #define OBJECTDUMP_H -#include "objectdump_global.h" - #include <QObject> #include <QList> #include <QByteArray> @@ -34,7 +32,7 @@ namespace ObjectDump /** * Abstract base for annotator classes invoked by QVisitor. */ -class OBJECTDUMP_EXPORT QAnnotator : public QObject +class QAnnotator : public QObject { Q_OBJECT public: @@ -45,7 +43,7 @@ public: /** * Annotator which replicates QObject::dumpObjectTree functionality. */ -class OBJECTDUMP_EXPORT QAnnotatorBasic : public QAnnotator +class QAnnotatorBasic : public QAnnotator { Q_OBJECT public: @@ -55,7 +53,7 @@ public: /** * Annotator which returns widget information. */ -class OBJECTDUMP_EXPORT QAnnotatorWidget : public QAnnotator +class QAnnotatorWidget : public QAnnotator { Q_OBJECT public: @@ -68,7 +66,7 @@ class QDumperPrivate; /** * Class used to dump information about individual QObjects. */ -class OBJECTDUMP_EXPORT QDumper : public QObject +class QDumper : public QObject { Q_OBJECT Q_DECLARE_PRIVATE(QDumper) @@ -103,7 +101,7 @@ class QVisitorPrivate; /** * Visitor class which dumps information about nodes in the object tree. */ -class OBJECTDUMP_EXPORT QVisitor : public QObject +class QVisitor : public QObject { Q_OBJECT Q_DECLARE_PRIVATE(QVisitor) @@ -152,12 +150,12 @@ private: // Utility functions //----------------------------------------------------------------------------- -void OBJECTDUMP_EXPORT addDefaultAnnotators(QDumper& dumper); -void OBJECTDUMP_EXPORT addDefaultAnnotators(QVisitor& visitor); +void addDefaultAnnotators(QDumper& dumper); +void addDefaultAnnotators(QVisitor& visitor); -void OBJECTDUMP_EXPORT dumpTreeFromRoot(const QObject& root, QVisitor& visitor); -void OBJECTDUMP_EXPORT dumpTreeFromLeaf(const QObject& leaf, QVisitor& visitor); -void OBJECTDUMP_EXPORT dumpAncestors(const QObject& leaf, QVisitor& visitor); +void dumpTreeFromRoot(const QObject& root, QVisitor& visitor); +void dumpTreeFromLeaf(const QObject& leaf, QVisitor& visitor); +void dumpAncestors(const QObject& leaf, QVisitor& visitor); } // namespace ObjectDump diff --git a/src/3rdparty/phonon/mmf/objectdump_global.h b/src/3rdparty/phonon/mmf/objectdump_global.h deleted file mode 100644 index b8987e0b04..0000000000 --- a/src/3rdparty/phonon/mmf/objectdump_global.h +++ /dev/null @@ -1,30 +0,0 @@ -/* This file is part of the KDE project. - -Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). - -This library is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 2.1 or 3 of the License. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library. If not, see <http://www.gnu.org/licenses/>. - -*/ - -#ifndef OBJECTDUMP_GLOBAL_H -#define OBJECTDUMP_GLOBAL_H - -#include <QtCore/QtGlobal> - -#if defined(OBJECTDUMP_LIBRARY) -# define OBJECTDUMP_EXPORT -#else -# define OBJECTDUMP_EXPORT -#endif - -#endif diff --git a/src/3rdparty/phonon/mmf/objectdump_symbian.cpp b/src/3rdparty/phonon/mmf/objectdump_symbian.cpp index 41dd240964..2efebdbac9 100644 --- a/src/3rdparty/phonon/mmf/objectdump_symbian.cpp +++ b/src/3rdparty/phonon/mmf/objectdump_symbian.cpp @@ -16,8 +16,6 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef QT_NO_DEBUG - #include <QTextStream> #include <QWidget> #include <coecntrl.h> @@ -160,5 +158,3 @@ void addDefaultAnnotators_sys(QVisitor& visitor) QT_END_NAMESPACE -#endif - diff --git a/src/3rdparty/phonon/mmf/objecttree.cpp b/src/3rdparty/phonon/mmf/objecttree.cpp index 750db22788..06b0ced66c 100644 --- a/src/3rdparty/phonon/mmf/objecttree.cpp +++ b/src/3rdparty/phonon/mmf/objecttree.cpp @@ -16,8 +16,6 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef QT_NO_DEBUG - #include <QTextStream> #include <QWidget> #include "objecttree.h" @@ -100,5 +98,3 @@ AncestorConstIterator::AncestorConstIterator(const QObject& leaf) QT_END_NAMESPACE -#endif - diff --git a/src/3rdparty/phonon/mmf/objecttree.h b/src/3rdparty/phonon/mmf/objecttree.h index 98bdf14803..96adb6fb3a 100644 --- a/src/3rdparty/phonon/mmf/objecttree.h +++ b/src/3rdparty/phonon/mmf/objecttree.h @@ -19,8 +19,6 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #ifndef OBJECTTREE_H #define OBJECTTREE_H -#include "objectdump_global.h" - #include <QObject> #include <QStack> @@ -32,7 +30,7 @@ namespace ObjectTree /** * Depth-first iterator for QObject tree */ -class OBJECTDUMP_EXPORT DepthFirstConstIterator +class DepthFirstConstIterator { public: DepthFirstConstIterator(); @@ -60,7 +58,7 @@ private: /** * Ancestor iterator for QObject tree */ -class OBJECTDUMP_EXPORT AncestorConstIterator +class AncestorConstIterator { public: AncestorConstIterator(); diff --git a/src/3rdparty/phonon/phonon/factory.cpp b/src/3rdparty/phonon/phonon/factory.cpp index ab1f44f263..9967c971ec 100644 --- a/src/3rdparty/phonon/phonon/factory.cpp +++ b/src/3rdparty/phonon/phonon/factory.cpp @@ -469,7 +469,7 @@ GET_STRING_PROPERTY(backendWebsite) QObject *Factory::registerQObject(QObject *o) { if (o) { - QObject::connect(o, SIGNAL(destroyed(QObject *)), globalFactory, SLOT(objectDestroyed(QObject *)), Qt::DirectConnection); + QObject::connect(o, SIGNAL(destroyed(QObject*)), globalFactory, SLOT(objectDestroyed(QObject*)), Qt::DirectConnection); globalFactory->objects.append(o); } return o; diff --git a/src/3rdparty/phonon/phonon/mediaobject.cpp b/src/3rdparty/phonon/phonon/mediaobject.cpp index 13d303cabc..41e8dc2fc7 100644 --- a/src/3rdparty/phonon/phonon/mediaobject.cpp +++ b/src/3rdparty/phonon/phonon/mediaobject.cpp @@ -453,9 +453,9 @@ void MediaObjectPrivate::setupBackendObject() //pDebug() << Q_FUNC_INFO; #ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM - QObject::connect(m_backendObject, SIGNAL(stateChanged(Phonon::State, Phonon::State)), q, SLOT(_k_stateChanged(Phonon::State, Phonon::State))); + QObject::connect(m_backendObject, SIGNAL(stateChanged(Phonon::State,Phonon::State)), q, SLOT(_k_stateChanged(Phonon::State,Phonon::State))); #else - QObject::connect(m_backendObject, SIGNAL(stateChanged(Phonon::State, Phonon::State)), q, SIGNAL(stateChanged(Phonon::State, Phonon::State))); + QObject::connect(m_backendObject, SIGNAL(stateChanged(Phonon::State,Phonon::State)), q, SIGNAL(stateChanged(Phonon::State,Phonon::State))); #endif // QT_NO_PHONON_ABSTRACTMEDIASTREAM QObject::connect(m_backendObject, SIGNAL(tick(qint64)), q, SIGNAL(tick(qint64))); QObject::connect(m_backendObject, SIGNAL(seekableChanged(bool)), q, SIGNAL(seekableChanged(bool))); @@ -467,10 +467,10 @@ void MediaObjectPrivate::setupBackendObject() QObject::connect(m_backendObject, SIGNAL(aboutToFinish()), q, SLOT(_k_aboutToFinish())); QObject::connect(m_backendObject, SIGNAL(prefinishMarkReached(qint32)), q, SIGNAL(prefinishMarkReached(qint32))); QObject::connect(m_backendObject, SIGNAL(totalTimeChanged(qint64)), q, SIGNAL(totalTimeChanged(qint64))); - QObject::connect(m_backendObject, SIGNAL(metaDataChanged(const QMultiMap<QString, QString> &)), - q, SLOT(_k_metaDataChanged(const QMultiMap<QString, QString> &))); - QObject::connect(m_backendObject, SIGNAL(currentSourceChanged(const MediaSource&)), - q, SLOT(_k_currentSourceChanged(const MediaSource&))); + QObject::connect(m_backendObject, SIGNAL(metaDataChanged(QMultiMap<QString,QString>)), + q, SLOT(_k_metaDataChanged(QMultiMap<QString,QString>))); + QObject::connect(m_backendObject, SIGNAL(currentSourceChanged(MediaSource)), + q, SLOT(_k_currentSourceChanged(MediaSource))); // set up attributes pINTERFACE_CALL(setTickInterval(tickInterval)); diff --git a/src/3rdparty/phonon/phonon/seekslider.cpp b/src/3rdparty/phonon/phonon/seekslider.cpp index b5b25f00c5..41baf2d899 100644 --- a/src/3rdparty/phonon/phonon/seekslider.cpp +++ b/src/3rdparty/phonon/phonon/seekslider.cpp @@ -72,12 +72,12 @@ void SeekSlider::setMediaObject(MediaObject *media) d->media = media; if (media) { - connect(media, SIGNAL(stateChanged(Phonon::State, Phonon::State)), + connect(media, SIGNAL(stateChanged(Phonon::State,Phonon::State)), SLOT(_k_stateChanged(Phonon::State))); connect(media, SIGNAL(totalTimeChanged(qint64)), SLOT(_k_length(qint64))); connect(media, SIGNAL(tick(qint64)), SLOT(_k_tick(qint64))); connect(media, SIGNAL(seekableChanged(bool)), SLOT(_k_seekableChanged(bool))); - connect(media, SIGNAL(currentSourceChanged(const Phonon::MediaSource&)), SLOT(_k_currentSourceChanged())); + connect(media, SIGNAL(currentSourceChanged(Phonon::MediaSource)), SLOT(_k_currentSourceChanged())); d->_k_stateChanged(media->state()); d->_k_seekableChanged(media->isSeekable()); d->_k_length(media->totalTime()); diff --git a/src/3rdparty/phonon/waveout/mediaobject.cpp b/src/3rdparty/phonon/waveout/mediaobject.cpp index 35d9e0b3d2..db71942afa 100644 --- a/src/3rdparty/phonon/waveout/mediaobject.cpp +++ b/src/3rdparty/phonon/waveout/mediaobject.cpp @@ -247,7 +247,7 @@ namespace Phonon m_stopped(0) { m_thread = new WorkerThread(); - connect(this, SIGNAL(outOfData(QIODevice*, QByteArray*, bool*)), m_thread, SLOT(stream(QIODevice*, QByteArray*, bool*))); + connect(this, SIGNAL(outOfData(QIODevice*,QByteArray*,bool*)), m_thread, SLOT(stream(QIODevice*,QByteArray*,bool*))); m_thread->start(); m_soundBuffer1.waveHeader = new WAVEHDR; m_soundBuffer2.waveHeader = new WAVEHDR; @@ -258,7 +258,7 @@ namespace Phonon MediaObject::~MediaObject() { stop(); - disconnect(this, SIGNAL(outOfData(QIODevice*, QByteArray*, bool*)), m_thread, SLOT(stream(QIODevice*, QByteArray*, bool*))); + disconnect(this, SIGNAL(outOfData(QIODevice*,QByteArray*,bool*)), m_thread, SLOT(stream(QIODevice*,QByteArray*,bool*))); do { //The event loop of m_thread might not be started, yet m_thread->quit(); //If the event loop is not started yet quit() does nothing m_thread->wait(100); diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog index 0cbb3a5da4..382a8c7e87 100644 --- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog +++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog @@ -1,3 +1,32 @@ +2009-11-23 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Symbian] Fix lastIndexOf() for Symbian + https://bugs.webkit.org/show_bug.cgi?id=31773 + + Symbian soft floating point library has problems with operators + comparing NaN to numbers. Without a workaround lastIndexOf() + function does not work. + + Patch developed by David Leong. + + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncLastIndexOf):Add an extra test + to check for NaN for Symbian. + +2009-11-18 Harald Fernengel <harald.fernengel@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Fix detection of linux-g++ + + Never use "linux-g++*" to check for linux-g++, since this will break embedded + builds which use linux-arm-g++ and friends. Use 'linux*-g++*' to check for any + g++ on linux mkspec. + + * JavaScriptCore.pri: + 2009-11-16 Joerg Bornemann <joerg.bornemann@trolltech.com> Reviewed by Simon Hausmann. diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/StringPrototype.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/StringPrototype.cpp index a0713b8dda..a0cc9f1490 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/StringPrototype.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/StringPrototype.cpp @@ -469,6 +469,11 @@ JSValue JSC_HOST_CALL stringProtoFuncLastIndexOf(ExecState* exec, JSObject*, JSV dpos = 0; else if (!(dpos <= len)) // true for NaN dpos = len; +#if PLATFORM(SYMBIAN) + // Work around for broken NaN compare operator + else if (isnan(dpos)) + dpos = len; +#endif return jsNumber(exec, s.rfind(u2, static_cast<int>(dpos))); } diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index 2653e83fcc..5818e83db3 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -8,4 +8,4 @@ The commit imported was from the and has the sha1 checksum - ca38203fba92cf48d59328403f64036907fd3433 + efa69b6181ce5c045097351cdcf6c158da3f4888 diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index abb372ad31..9644470704 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,27 @@ +2009-11-19 Olivier Goffart <ogoffart@trolltech.com> + + Reviewed by Simon Hausmann. + + [Qt] Normalize signal and slot signatures. + + * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp: + (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): + +2009-11-18 Benjamin Poulain <benjamin.poulain@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] WebKit crashes when loading certain SVG images + + Check if the familly exist before creating the PlatformData from it. + + https://bugs.webkit.org/show_bug.cgi?id=29443 + + Test: svg/text/text-font-invalid.html + + * platform/graphics/qt/FontFallbackListQt.cpp: + (WebCore::FontFallbackList::fontDataAt): + 2009-11-14 Antonio Gomes <tonikitoo@webkit.org> Reviewed by Antti Koivisto. diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp index 8e1e4f60e9..0306abf864 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp @@ -102,7 +102,7 @@ const FontData* FontFallbackList::fontDataAt(const WebCore::Font* _font, unsigne const FontDescription& description = _font->fontDescription(); const FontFamily* family = &description.family(); while (family) { - if (m_fontSelector) { + if (family->family().length() && m_fontSelector) { FontData* data = m_fontSelector->getFontData(description, family->family()); if (data) { if (data->isLoading()) diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp index f0d513c7de..9faa234031 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp @@ -104,15 +104,15 @@ MediaPlayerPrivate::MediaPlayerPrivate(MediaPlayer* player) foreach (QWidget* widget, qFindChildren<QWidget*>(m_videoWidget)) widget->installEventFilter(this); - connect(m_mediaObject, SIGNAL(stateChanged(Phonon::State, Phonon::State)), - this, SLOT(stateChanged(Phonon::State, Phonon::State))); + connect(m_mediaObject, SIGNAL(stateChanged(Phonon::State,Phonon::State)), + this, SLOT(stateChanged(Phonon::State,Phonon::State))); connect(m_mediaObject, SIGNAL(metaDataChanged()), this, SLOT(metaDataChanged())); connect(m_mediaObject, SIGNAL(seekableChanged(bool)), this, SLOT(seekableChanged(bool))); connect(m_mediaObject, SIGNAL(hasVideoChanged(bool)), this, SLOT(hasVideoChanged(bool))); connect(m_mediaObject, SIGNAL(bufferStatus(int)), this, SLOT(bufferStatus(int))); connect(m_mediaObject, SIGNAL(finished()), this, SLOT(finished())); - connect(m_mediaObject, SIGNAL(currentSourceChanged(const Phonon::MediaSource&)), - this, SLOT(currentSourceChanged(const Phonon::MediaSource&))); + connect(m_mediaObject, SIGNAL(currentSourceChanged(Phonon::MediaSource)), + this, SLOT(currentSourceChanged(Phonon::MediaSource))); connect(m_mediaObject, SIGNAL(aboutToFinish()), this, SLOT(aboutToFinish())); connect(m_mediaObject, SIGNAL(totalTimeChanged(qint64)), this, SLOT(totalTimeChanged(qint64))); } diff --git a/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp b/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp index 5ccce0e3ff..b313afbc01 100644 --- a/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp +++ b/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp @@ -145,7 +145,7 @@ HDC WINAPI PluginView::hookedBeginPaint(HWND hWnd, PAINTSTRUCT* lpPaint) "push %3\n" "call *%4\n" : "=a" (result) - : "a" (beginPaintSysCall), "g" (lpPaint), "g" (hWnd), "m" (*beginPaint) + : "a" (beginPaintSysCall), "g" (lpPaint), "g" (hWnd), "m" (beginPaint) : "memory" ); return result; @@ -175,7 +175,7 @@ BOOL WINAPI PluginView::hookedEndPaint(HWND hWnd, const PAINTSTRUCT* lpPaint) "push %3\n" "call *%4\n" : "=a" (result) - : "a" (endPaintSysCall), "g" (lpPaint), "g" (hWnd), "m" (*endPaint) + : "a" (endPaintSysCall), "g" (lpPaint), "g" (hWnd), "m" (endPaint) ); return result; #elif defined (_M_IX86) diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp index 640a924b09..ceb5ee1f0c 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp @@ -419,22 +419,22 @@ void QGraphicsWebView::setPage(QWebPage* page) QWebFrame* mainFrame = d->page->mainFrame(); - connect(mainFrame, SIGNAL(titleChanged(const QString&)), - this, SIGNAL(titleChanged(const QString&))); + connect(mainFrame, SIGNAL(titleChanged(QString)), + this, SIGNAL(titleChanged(QString))); connect(mainFrame, SIGNAL(iconChanged()), this, SIGNAL(iconChanged())); - connect(mainFrame, SIGNAL(urlChanged(const QUrl&)), - this, SIGNAL(urlChanged(const QUrl&))); + connect(mainFrame, SIGNAL(urlChanged(QUrl)), + this, SIGNAL(urlChanged(QUrl))); connect(d->page, SIGNAL(loadStarted()), this, SIGNAL(loadStarted())); connect(d->page, SIGNAL(loadProgress(int)), this, SIGNAL(loadProgress(int))); connect(d->page, SIGNAL(loadFinished(bool)), this, SLOT(_q_doLoadFinished(bool))); - connect(d->page, SIGNAL(statusBarMessage(const QString&)), - this, SIGNAL(statusBarMessage(const QString&))); - connect(d->page, SIGNAL(linkClicked(const QUrl &)), - this, SIGNAL(linkClicked(const QUrl &))); + connect(d->page, SIGNAL(statusBarMessage(QString)), + this, SIGNAL(statusBarMessage(QString))); + connect(d->page, SIGNAL(linkClicked(QUrl)), + this, SIGNAL(linkClicked(QUrl))); } /*! diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp index 8ee43a102f..1d4b46f06b 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp @@ -219,12 +219,12 @@ void QWebView::setPage(QWebPage* page) d->page->setPalette(palette()); // #### connect signals QWebFrame *mainFrame = d->page->mainFrame(); - connect(mainFrame, SIGNAL(titleChanged(const QString&)), - this, SIGNAL(titleChanged(const QString&))); + connect(mainFrame, SIGNAL(titleChanged(QString)), + this, SIGNAL(titleChanged(QString))); connect(mainFrame, SIGNAL(iconChanged()), this, SIGNAL(iconChanged())); - connect(mainFrame, SIGNAL(urlChanged(const QUrl &)), - this, SIGNAL(urlChanged(const QUrl &))); + connect(mainFrame, SIGNAL(urlChanged(QUrl)), + this, SIGNAL(urlChanged(QUrl))); connect(d->page, SIGNAL(loadStarted()), this, SIGNAL(loadStarted())); @@ -232,10 +232,10 @@ void QWebView::setPage(QWebPage* page) this, SIGNAL(loadProgress(int))); connect(d->page, SIGNAL(loadFinished(bool)), this, SIGNAL(loadFinished(bool))); - connect(d->page, SIGNAL(statusBarMessage(const QString &)), - this, SIGNAL(statusBarMessage(const QString &))); - connect(d->page, SIGNAL(linkClicked(const QUrl &)), - this, SIGNAL(linkClicked(const QUrl &))); + connect(d->page, SIGNAL(statusBarMessage(QString)), + this, SIGNAL(statusBarMessage(QString))); + connect(d->page, SIGNAL(linkClicked(QUrl)), + this, SIGNAL(linkClicked(QUrl))); connect(d->page, SIGNAL(microFocusChanged()), this, SLOT(updateMicroFocus())); diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog index 1294d66821..2408dd4bb1 100644 --- a/src/3rdparty/webkit/WebKit/qt/ChangeLog +++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog @@ -1,3 +1,51 @@ +2009-11-19 Olivier Goffart <ogoffart@trolltech.com> + + Reviewed by Simon Hausmann. + + [Qt] Normalize signal and slot signatures. + + * Api/qgraphicswebview.cpp: + (QGraphicsWebView::setPage): + * Api/qwebview.cpp: + (QWebView::setPage): + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::setFrame): + * docs/webkitsnippets/qtwebkit_qwebinspector_snippet.cpp: + (wrapInFunction): + * tests/qwebframe/tst_qwebframe.cpp: + * tests/qwebpage/tst_qwebpage.cpp: + (tst_QWebPage::modified): + (tst_QWebPage::database): + +2009-11-18 Paul Olav Tvete <paul.tvete@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Make the QWebElement::render() test pass when pixmaps aren't 32 bit. + + * tests/qwebelement/tst_qwebelement.cpp: + (tst_QWebElement::render): + +2009-11-18 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Tor Arne Vestbø. + + Clarify and simplify the legal section in the overview documentation, + after review with our legal team. + + * docs/qtwebkit.qdoc: + +2009-11-18 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed and suggested by Tor Arne Vestbø. + + Fix the autotest after commit ecbb2c0dd21bfc197e1f7b53150ec9b1a1d8cb8f + to compare the Qt::ImFont property's family against an explicitly + previously configured family. + + * tests/qwebpage/tst_qwebpage.cpp: + (tst_QWebPage::inputMethods): + 2009-11-16 Simon Hausmann <simon.hausmann@nokia.com> Reviewed by Kenneth Rohde Christiansen. diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp index 9e13339363..5cabca04e3 100644 --- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp +++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp @@ -177,8 +177,8 @@ void FrameLoaderClientQt::setFrame(QWebFrame* webFrame, Frame* frame) m_webFrame->page(), SIGNAL(loadFinished(bool))); connect(this, SIGNAL(loadFinished(bool)), m_webFrame, SIGNAL(loadFinished(bool))); - connect(this, SIGNAL(titleChanged(const QString&)), - m_webFrame, SIGNAL(titleChanged(const QString&))); + connect(this, SIGNAL(titleChanged(QString)), + m_webFrame, SIGNAL(titleChanged(QString))); } QWebFrame* FrameLoaderClientQt::webFrame() const diff --git a/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_qwebinspector_snippet.cpp b/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_qwebinspector_snippet.cpp index 0ba1cadaa6..a6b662096c 100644 --- a/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_qwebinspector_snippet.cpp +++ b/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_qwebinspector_snippet.cpp @@ -10,7 +10,7 @@ void wrapInFunction() QWebInspector *inspector = new QWebInspector; inspector->setPage(page); - connect(page, SIGNAL(webInspectorTriggered(const QWebElement&)), inspector, SLOT(show())); + connect(page, SIGNAL(webInspectorTriggered(QWebElement)), inspector, SLOT(show())); //! [0] } diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp index a04e66110a..e9dae18cd4 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp @@ -995,7 +995,7 @@ void tst_QWebElement::render() QImage testImage(resource.width(), resource.height(), QImage::Format_ARGB32); QPainter painter0(&testImage); painter0.fillRect(imageRect, Qt::white); - //render() uses pixmaps internally, and pixmaps might have bit depths + // render() uses pixmaps internally, and pixmaps might have bit depths // other than 32, giving different pixel values due to rounding. QPixmap pix = QPixmap::fromImage(resource); painter0.drawPixmap(0, 0, pix); diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp index b00cf0930b..d88d90591b 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp @@ -2291,7 +2291,7 @@ void tst_QWebFrame::requestedUrl() qRegisterMetaType<QList<QSslError> >("QList<QSslError>"); qRegisterMetaType<QNetworkReply* >("QNetworkReply*"); - QSignalSpy spy2(page.networkAccessManager(), SIGNAL(sslErrors(QNetworkReply*, const QList<QSslError>&))); + QSignalSpy spy2(page.networkAccessManager(), SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>))); frame->setUrl(QUrl("qrc:/fake-ssl-error.html")); QTest::qWait(200); QCOMPARE(spy2.count(), 1); @@ -2780,7 +2780,7 @@ void tst_QWebFrame::evaluateWillCauseRepaint() view.page()->mainFrame()->evaluateJavaScript( "document.getElementById('junk').style.display = 'none';"); - ::waitForSignal(view.page(), SIGNAL(repaintRequested( const QRect &))); + ::waitForSignal(view.page(), SIGNAL(repaintRequested(QRect))); QTest::qWait(2000); } diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp index 7fc364028f..32002e78f0 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp @@ -448,7 +448,7 @@ void tst_QWebPage::modified() m_page->mainFrame()->setUrl(QUrl("data:text/html,<body>This is fourth page")); QVERIFY(m_page->history()->count() == 2); m_page->mainFrame()->setUrl(QUrl("data:text/html,<body>This is fifth page")); - QVERIFY(::waitForSignal(m_page, SIGNAL(saveFrameStateRequested(QWebFrame*, QWebHistoryItem*)))); + QVERIFY(::waitForSignal(m_page, SIGNAL(saveFrameStateRequested(QWebFrame*,QWebHistoryItem*)))); } void tst_QWebPage::contextMenuCrash() @@ -484,7 +484,7 @@ void tst_QWebPage::database() QFile::remove(dbFileName); qRegisterMetaType<QWebFrame*>("QWebFrame*"); - QSignalSpy spy(m_page, SIGNAL(databaseQuotaExceeded(QWebFrame *, QString))); + QSignalSpy spy(m_page, SIGNAL(databaseQuotaExceeded(QWebFrame*,QString))); m_view->setHtml(QString("<html><head><script>var db; db=openDatabase('testdb', '1.0', 'test database API', 50000); </script></head><body><div></div></body></html>"), QUrl("http://www.myexample.com")); QTRY_COMPARE(spy.count(), 1); m_page->mainFrame()->evaluateJavaScript("var db2; db2=openDatabase('testdb', '1.0', 'test database API', 50000);"); @@ -1371,6 +1371,7 @@ void tst_QWebPage::inputMethods() else QVERIFY2(false, "Unknown view type"); + page->settings()->setFontFamily(QWebSettings::SerifFont, "FooSerifFont"); page->mainFrame()->setHtml("<html><body>" \ "<input type='text' id='input1' style='font-family: serif' value='' maxlength='20'/><br>" \ "<input type='password'/>" \ @@ -1404,9 +1405,9 @@ void tst_QWebPage::inputMethods() QVERIFY(inputs.at(0).geometry().contains(variant.toRect().topLeft())); //ImFont - //variant = page->inputMethodQuery(Qt::ImFont); - //QFont font = variant.value<QFont>(); - //QCOMPARE(QString("-webkit-serif"), font.family()); + variant = page->inputMethodQuery(Qt::ImFont); + QFont font = variant.value<QFont>(); + QCOMPARE(page->settings()->fontFamily(QWebSettings::SerifFont), font.family()); QList<QInputMethodEvent::Attribute> inputAttributes; diff --git a/src/corelib/animation/qvariantanimation.cpp b/src/corelib/animation/qvariantanimation.cpp index c7357783f2..d529f670fa 100644 --- a/src/corelib/animation/qvariantanimation.cpp +++ b/src/corelib/animation/qvariantanimation.cpp @@ -104,15 +104,32 @@ QT_BEGIN_NAMESPACE \o \l{QMetaType::}{QLine} \o \l{QMetaType::}{QLineF} \o \l{QMetaType::}{QPoint} + \o \l{QMetaType::}{QPointF} \o \l{QMetaType::}{QSize} \o \l{QMetaType::}{QSizeF} \o \l{QMetaType::}{QRect} \o \l{QMetaType::}{QRectF} + \o \l{QMetaType::}{QColor} \endlist If you need to interpolate other variant types, including custom types, you have to implement interpolation for these yourself. - You do this by reimplementing interpolated(), which returns + To do this, you can register an interpolator function for a given + type. This function takes 3 parameters: the start value, the end value + and the current progress. + + Example: + \code + QVariant myColorInterpolator(const QColor &start, const QColor &end, qreal progress) + { + ... + return QColor(...); + } + ... + qRegisterAnimationInterpolator<QColor>(myColorInterpolator); + \endcode + + Another option is to reimplement interpolated(), which returns interpolation values for the value being interpolated. \omit We need some snippets around here. \endomit diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp index 680fcd762e..5d62095871 100644 --- a/src/corelib/codecs/qtextcodec.cpp +++ b/src/corelib/codecs/qtextcodec.cpp @@ -1573,9 +1573,6 @@ QTextCodec *QTextCodec::codecForHtml(const QByteArray &ba) cannot be detected from the content provided, \a defaultCodec is returned. - The behavior of this function is undefined if \a ba is not - encoded in unicode. - \sa codecForHtml() */ QTextCodec *QTextCodec::codecForUtfText(const QByteArray &ba, QTextCodec *defaultCodec) @@ -1620,9 +1617,6 @@ QTextCodec *QTextCodec::codecForUtfText(const QByteArray &ba, QTextCodec *defaul that is capable of decoding the text to unicode. If the codec cannot be detected, this overload returns a Latin-1 QTextCodec. - The behavior of this function is undefined if \a ba is not - encoded in unicode. - \sa codecForHtml() */ QTextCodec *QTextCodec::codecForUtfText(const QByteArray &ba) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 9558256e91..2e9f8391c9 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -910,6 +910,8 @@ QT_END_INCLUDE_NAMESPACE /* Symbian OS defines TRUE = 1 and FALSE = 0, redefine to built-in booleans to make autotests work properly */ #ifdef Q_OS_SYMBIAN + #include <e32def.h> /* Symbian OS defines */ + #undef TRUE #undef FALSE #endif diff --git a/src/corelib/io/qfilesystemwatcher_win.cpp b/src/corelib/io/qfilesystemwatcher_win.cpp index f3cc211a92..87fe63021e 100644 --- a/src/corelib/io/qfilesystemwatcher_win.cpp +++ b/src/corelib/io/qfilesystemwatcher_win.cpp @@ -201,10 +201,10 @@ QStringList QWindowsFileSystemWatcherEngine::addPaths(const QStringList &paths, else files->append(path); - connect(thread, SIGNAL(fileChanged(const QString &, bool)), - this, SIGNAL(fileChanged(const QString &, bool))); - connect(thread, SIGNAL(directoryChanged(const QString &, bool)), - this, SIGNAL(directoryChanged(const QString &, bool))); + connect(thread, SIGNAL(fileChanged(QString,bool)), + this, SIGNAL(fileChanged(QString,bool))); + connect(thread, SIGNAL(directoryChanged(QString,bool)), + this, SIGNAL(directoryChanged(QString,bool))); thread->msg = '@'; thread->start(); diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp index 05e6fabecf..8cbf6a3aac 100644 --- a/src/corelib/io/qfsfileengine_unix.cpp +++ b/src/corelib/io/qfsfileengine_unix.cpp @@ -1245,7 +1245,7 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size, QFile::MemoryMapFla } if (offset < 0 || offset != qint64(QT_OFF_T(offset)) - || size < 0 || size > qint64(size_t(-1))) { + || size < 0 || quint64(size) > quint64(size_t(-1))) { q->setError(QFile::UnspecifiedError, qt_error_string(int(EINVAL))); return 0; } @@ -1254,7 +1254,7 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size, QFile::MemoryMapFla // undefined behavior. Otherwise, let mmap have its say. if (doStat() && (QT_OFF_T(size) > st.st_size - QT_OFF_T(offset))) - return 0; + qWarning("QFSFileEngine::map: Mapping a file beyond its size is not portable"); int access = 0; if (openMode & QIODevice::ReadOnly) access |= PROT_READ; diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp index e4e6a15671..0e5a2de9ac 100644 --- a/src/corelib/io/qiodevice.cpp +++ b/src/corelib/io/qiodevice.cpp @@ -1157,6 +1157,10 @@ QByteArray QIODevice::readLine(qint64 maxSize) // If resize fails or maxSize == 0, read incrementally if (maxSize == 0) maxSize = INT_MAX; + + // The first iteration needs to leave an extra byte for the terminating null + result.resize(1); + qint64 readResult; do { result.resize(int(qMin(maxSize, result.size() + QIODEVICE_BUFFERSIZE))); @@ -1164,7 +1168,7 @@ QByteArray QIODevice::readLine(qint64 maxSize) if (readResult > 0 || readBytes == 0) readBytes += readResult; } while (readResult == QIODEVICE_BUFFERSIZE - && result[int(readBytes)] != '\n'); + && result[int(readBytes - 1)] != '\n'); } else readBytes = readLine(result.data(), result.size()); @@ -1404,6 +1408,9 @@ bool QIODevicePrivate::putCharHelper(char c) */ bool QIODevice::getChar(char *c) { + Q_D(QIODevice); + CHECK_READABLE(getChar, false); + char ch; return (1 == read(c ? c : &ch, 1)); } diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp index b3497b99b3..b197b9d0cd 100644 --- a/src/corelib/kernel/qeventdispatcher_win.cpp +++ b/src/corelib/kernel/qeventdispatcher_win.cpp @@ -725,7 +725,7 @@ bool QEventDispatcherWin32::processEvents(QEventLoop::ProcessEventsFlags flags) } } if (haveMessage) { - if (msg.message == WM_QT_SENDPOSTEDEVENTS) { + if (d->internalHwnd == msg.hwnd && msg.message == WM_QT_SENDPOSTEDEVENTS) { if (seenWM_QT_SENDPOSTEDEVENTS) { needWM_QT_SENDPOSTEDEVENTS = true; continue; diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 1260d47530..95602d9042 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -154,6 +154,15 @@ QObjectPrivate::QObjectPrivate(int version) hasGuards = false; } +#ifdef Q_CC_INTEL +/* Workaround for a bug in win32-icc where it seems to inline ~QObjectPrivate too aggressive. + When icc compiles QtGui, it inlines ~QObjectPrivate so that it would generate a call to + ~QObjectData. However, ~QObjectData is not exported from QtCore, so it does not link. + See also QTBUG-5145 for info on how this manifested itself. + */ +# pragma auto_inline(off) +#endif + QObjectPrivate::~QObjectPrivate() { delete static_cast<QAbstractDynamicMetaObject*>(metaObject); @@ -165,6 +174,9 @@ QObjectPrivate::~QObjectPrivate() delete extraData; #endif } +#ifdef Q_CC_INTEL +# pragma auto_inline(on) +#endif int *QObjectPrivate::setDeleteWatch(QObjectPrivate *d, int *w) { diff --git a/src/corelib/kernel/qtcore_eval.cpp b/src/corelib/kernel/qtcore_eval.cpp index fe47a30403..d5eb8c2962 100644 --- a/src/corelib/kernel/qtcore_eval.cpp +++ b/src/corelib/kernel/qtcore_eval.cpp @@ -88,23 +88,12 @@ static const char will_shutdown_now[] = "timeout and will shut down.\n" "Contact http://qt.nokia.com/about/contact-us for pricing and purchasing information.\n"; -static int qt_eval_days_left() +static int qt_eval_is_supported() { const char *const license_key = qt_eval_key_data + 12; // fast fail if (!qt_eval_key_data[0] || !*license_key) - return -2; - - QDate today = QDate::currentDate(); - QDate build = QLibraryInfo::buildDate(); - return qMax(-1, today.daysTo(build) + 30); -} - -static int qt_eval_is_supported() -{ - const char *const license_key = qt_eval_key_data + 12; - if (!qt_eval_key_data[0] || !*license_key) return -1; // is this an unsupported evaluation? @@ -123,6 +112,16 @@ static int qt_eval_is_supported() return -1; } +static int qt_eval_days_left() +{ + if (qt_eval_is_supported() < 0) + return -2; + + QDate today = QDate::currentDate(); + QDate build = QLibraryInfo::buildDate(); + return qMax(-1, today.daysTo(build) + 30); +} + static QString qt_eval_string() { const char *msg; @@ -178,6 +177,9 @@ public: void qt_core_eval_init(uint type) { + if (!type) + return; // GUI app + switch (qt_eval_days_left()) { case -2: return; diff --git a/src/corelib/statemachine/qstatemachine.h b/src/corelib/statemachine/qstatemachine.h index ff2b66706a..13c43e5d9e 100644 --- a/src/corelib/statemachine/qstatemachine.h +++ b/src/corelib/statemachine/qstatemachine.h @@ -70,7 +70,7 @@ class Q_CORE_EXPORT QStateMachine : public QState Q_PROPERTY(bool animated READ isAnimated WRITE setAnimated) #endif public: - class SignalEvent : public QEvent + class Q_CORE_EXPORT SignalEvent : public QEvent { public: SignalEvent(QObject *sender, int signalIndex, @@ -89,7 +89,7 @@ public: friend class QSignalTransitionPrivate; }; - class WrappedEvent : public QEvent + class Q_CORE_EXPORT WrappedEvent : public QEvent { public: WrappedEvent(QObject *object, QEvent *event); diff --git a/src/corelib/thread/qbasicatomic.h b/src/corelib/thread/qbasicatomic.h index 7b86ee078e..5017dbdd9b 100644 --- a/src/corelib/thread/qbasicatomic.h +++ b/src/corelib/thread/qbasicatomic.h @@ -137,7 +137,12 @@ public: #if defined(QT_ARCH_WINDOWS) || defined(QT_ARCH_WINDOWSCE) union { T * volatile _q_value; - long volatile _q_value_integral; +# if !defined(Q_OS_WINCE) && !defined(__i386__) && !defined(_M_IX86) + qint64 +# else + long +# endif + volatile _q_value_integral; }; #else T * volatile _q_value; diff --git a/src/corelib/xml/qxmlstream.g b/src/corelib/xml/qxmlstream.g index 22ba33da1e..9921d41a5d 100644 --- a/src/corelib/xml/qxmlstream.g +++ b/src/corelib/xml/qxmlstream.g @@ -915,6 +915,7 @@ markup ::= markup_start markup_list RBRACK; markup_list ::= markup_decl | space | pereference; markup_list ::= markup_list markup_decl | markup_list space | markup_list pereference; +markup_list ::=; markup_decl ::= element_decl | attlist_decl | entity_decl | entity_done | notation_decl | processing_instruction | comment; diff --git a/src/corelib/xml/qxmlstream_p.h b/src/corelib/xml/qxmlstream_p.h index 253f8bd5e3..5eea065fcb 100644 --- a/src/corelib/xml/qxmlstream_p.h +++ b/src/corelib/xml/qxmlstream_p.h @@ -121,7 +121,7 @@ public: XML = 54, ACCEPT_STATE = 416, - RULE_COUNT = 269, + RULE_COUNT = 270, STATE_COUNT = 427, TERMINAL_COUNT = 57, NON_TERMINAL_COUNT = 84, @@ -172,105 +172,105 @@ const char *const QXmlStreamReader_Table::spell [] = { const short QXmlStreamReader_Table::lhs [] = { 57, 57, 59, 59, 59, 59, 59, 59, 59, 59, 67, 68, 64, 72, 72, 72, 75, 66, 66, 66, - 66, 79, 78, 80, 80, 80, 80, 80, 80, 81, - 81, 81, 81, 81, 81, 81, 87, 83, 88, 88, - 88, 88, 91, 92, 93, 93, 93, 93, 94, 94, - 96, 96, 96, 97, 97, 98, 98, 99, 99, 100, - 100, 89, 89, 95, 90, 101, 101, 103, 103, 103, - 103, 103, 103, 103, 103, 103, 103, 104, 105, 105, - 105, 105, 107, 108, 109, 109, 84, 84, 110, 110, - 112, 112, 85, 85, 85, 65, 65, 76, 114, 63, - 115, 116, 86, 86, 86, 117, 117, 117, 117, 117, + 66, 79, 78, 80, 80, 80, 80, 80, 80, 80, + 81, 81, 81, 81, 81, 81, 81, 87, 83, 88, + 88, 88, 88, 91, 92, 93, 93, 93, 93, 94, + 94, 96, 96, 96, 97, 97, 98, 98, 99, 99, + 100, 100, 89, 89, 95, 90, 101, 101, 103, 103, + 103, 103, 103, 103, 103, 103, 103, 103, 104, 105, + 105, 105, 105, 107, 108, 109, 109, 84, 84, 110, + 110, 112, 112, 85, 85, 85, 65, 65, 76, 114, + 63, 115, 116, 86, 86, 86, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 118, 118, - 119, 119, 119, 119, 119, 119, 119, 119, 122, 70, - 70, 70, 70, 123, 124, 123, 124, 123, 124, 123, - 124, 126, 126, 126, 126, 126, 126, 126, 126, 126, + 117, 117, 117, 117, 117, 117, 117, 117, 117, 118, + 118, 119, 119, 119, 119, 119, 119, 119, 119, 122, + 70, 70, 70, 70, 123, 124, 123, 124, 123, 124, + 123, 124, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 125, 73, 113, 113, 113, 113, 127, - 128, 127, 128, 127, 128, 127, 128, 129, 129, 129, + 126, 126, 126, 126, 125, 73, 113, 113, 113, 113, + 127, 128, 127, 128, 127, 128, 127, 128, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, - 129, 129, 106, 106, 106, 106, 131, 132, 131, 132, - 131, 131, 132, 132, 133, 133, 133, 133, 135, 71, - 71, 71, 136, 136, 137, 62, 60, 61, 138, 121, - 82, 130, 134, 120, 139, 139, 139, 139, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 74, 69, - 69, 77, 111, 102, 102, 102, 102, 102, 140}; + 129, 129, 129, 106, 106, 106, 106, 131, 132, 131, + 132, 131, 131, 132, 132, 133, 133, 133, 133, 135, + 71, 71, 71, 136, 136, 137, 62, 60, 61, 138, + 121, 82, 130, 134, 120, 139, 139, 139, 139, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 74, + 69, 69, 77, 111, 102, 102, 102, 102, 102, 140}; const short QXmlStreamReader_Table::rhs [] = { 2, 1, 4, 2, 2, 2, 2, 2, 2, 0, 1, 1, 9, 2, 4, 0, 4, 4, 6, 6, - 4, 1, 3, 1, 1, 1, 2, 2, 2, 1, - 1, 1, 1, 1, 1, 1, 4, 4, 1, 1, - 1, 1, 1, 2, 1, 1, 1, 0, 2, 2, - 2, 6, 6, 1, 5, 1, 5, 3, 5, 0, - 1, 6, 8, 4, 2, 1, 5, 1, 1, 1, - 1, 1, 1, 1, 1, 6, 7, 1, 2, 2, - 1, 4, 3, 3, 1, 2, 5, 6, 4, 6, - 3, 5, 5, 3, 4, 4, 5, 2, 3, 2, - 2, 4, 5, 5, 7, 1, 1, 1, 1, 1, + 4, 1, 3, 1, 1, 1, 2, 2, 2, 0, + 1, 1, 1, 1, 1, 1, 1, 4, 4, 1, + 1, 1, 1, 1, 2, 1, 1, 1, 0, 2, + 2, 2, 6, 6, 1, 5, 1, 5, 3, 5, + 0, 1, 6, 8, 4, 2, 1, 5, 1, 1, + 1, 1, 1, 1, 1, 1, 6, 7, 1, 2, + 2, 1, 4, 3, 3, 1, 2, 5, 6, 4, + 6, 3, 5, 5, 3, 4, 4, 5, 2, 3, + 2, 2, 4, 5, 5, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, - 2, 3, 3, 2, 2, 2, 2, 1, 1, 1, + 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, + 2, 2, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 2, 2, 3, 3, 2, - 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, + 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 2, 2, 3, 3, 2, 2, 2, 2, - 1, 1, 1, 1, 1, 1, 1, 1, 5, 0, - 1, 3, 1, 3, 2, 4, 3, 5, 1, 3, - 3, 3, 3, 4, 1, 1, 2, 2, 2, 4, - 2, 2, 2, 2, 2, 2, 2, 0, 1, 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2}; + 1, 1, 1, 2, 2, 3, 3, 2, 2, 2, + 2, 1, 1, 1, 1, 1, 1, 1, 1, 5, + 0, 1, 3, 1, 3, 2, 4, 3, 5, 1, + 3, 3, 3, 3, 4, 1, 1, 2, 2, 2, + 4, 2, 2, 2, 2, 2, 2, 2, 0, 1, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 2}; const short QXmlStreamReader_Table::action_default [] = { - 10, 258, 0, 2, 1, 0, 124, 116, 118, 119, - 126, 128, 122, 11, 113, 107, 0, 108, 127, 110, - 114, 112, 120, 123, 125, 106, 109, 111, 117, 115, - 130, 121, 239, 12, 253, 135, 249, 252, 0, 129, - 139, 256, 16, 251, 137, 136, 0, 255, 138, 258, - 230, 257, 254, 0, 0, 263, 0, 246, 245, 0, - 248, 247, 244, 240, 98, 262, 0, 235, 0, 0, - 259, 96, 97, 100, 0, 131, 133, 132, 134, 0, - 0, 260, 0, 0, 175, 0, 172, 164, 166, 167, - 141, 153, 170, 161, 155, 156, 152, 158, 162, 160, - 168, 171, 151, 154, 157, 159, 165, 163, 173, 169, - 149, 174, 0, 143, 147, 145, 150, 140, 148, 0, - 146, 142, 144, 0, 15, 14, 261, 0, 22, 21, - 260, 0, 0, 20, 0, 0, 31, 36, 30, 0, - 32, 260, 0, 33, 0, 24, 0, 34, 0, 26, - 35, 25, 0, 241, 40, 39, 260, 42, 48, 260, - 41, 0, 43, 260, 48, 260, 0, 260, 0, 48, - 0, 47, 45, 46, 50, 51, 260, 260, 0, 56, - 260, 53, 260, 0, 57, 0, 54, 260, 52, 260, - 0, 55, 64, 0, 260, 60, 260, 0, 58, 61, - 62, 0, 260, 0, 0, 59, 63, 44, 49, 65, - 0, 38, 0, 0, 260, 0, 93, 94, 0, 0, - 0, 0, 260, 0, 209, 200, 202, 204, 177, 189, - 207, 198, 192, 190, 193, 188, 195, 197, 205, 208, - 187, 191, 194, 196, 201, 199, 203, 206, 210, 212, - 211, 185, 0, 0, 242, 179, 183, 181, 0, 0, - 92, 186, 176, 184, 0, 182, 178, 180, 91, 0, - 95, 0, 0, 0, 0, 0, 260, 85, 260, 0, - 261, 0, 86, 0, 88, 68, 73, 72, 69, 70, - 71, 260, 74, 75, 0, 0, 0, 268, 267, 265, - 266, 264, 66, 260, 0, 260, 0, 0, 67, 76, - 260, 0, 260, 0, 0, 77, 0, 78, 0, 81, - 84, 0, 0, 214, 224, 223, 0, 226, 228, 227, - 225, 0, 243, 216, 220, 218, 222, 213, 221, 0, - 219, 215, 217, 0, 80, 79, 0, 82, 0, 83, - 87, 99, 0, 37, 0, 0, 0, 0, 90, 89, - 0, 102, 23, 27, 29, 28, 0, 0, 260, 261, - 0, 260, 0, 105, 104, 260, 0, 103, 101, 0, - 0, 18, 260, 17, 0, 19, 0, 0, 250, 0, - 260, 0, 238, 0, 231, 237, 0, 236, 233, 260, - 260, 261, 232, 234, 0, 260, 0, 229, 260, 0, - 260, 0, 230, 0, 0, 13, 269, 9, 5, 8, - 4, 0, 7, 258, 6, 0, 3}; + 10, 259, 0, 2, 1, 0, 125, 117, 119, 120, + 127, 129, 123, 11, 114, 108, 0, 109, 128, 111, + 115, 113, 121, 124, 126, 107, 110, 112, 118, 116, + 131, 122, 240, 12, 254, 136, 250, 253, 0, 130, + 140, 257, 16, 252, 138, 137, 0, 256, 139, 259, + 231, 258, 255, 0, 0, 264, 0, 247, 246, 0, + 249, 248, 245, 241, 99, 263, 0, 236, 0, 0, + 260, 97, 98, 101, 0, 132, 134, 133, 135, 0, + 0, 261, 0, 0, 176, 0, 173, 165, 167, 168, + 142, 154, 171, 162, 156, 157, 153, 159, 163, 161, + 169, 172, 152, 155, 158, 160, 166, 164, 174, 170, + 150, 175, 0, 144, 148, 146, 151, 141, 149, 0, + 147, 143, 145, 0, 15, 14, 262, 0, 22, 21, + 261, 30, 0, 20, 0, 0, 32, 37, 31, 0, + 33, 261, 0, 34, 0, 24, 0, 35, 0, 26, + 36, 25, 0, 242, 41, 40, 261, 43, 49, 261, + 42, 0, 44, 261, 49, 261, 0, 261, 0, 49, + 0, 48, 46, 47, 51, 52, 261, 261, 0, 57, + 261, 54, 261, 0, 58, 0, 55, 261, 53, 261, + 0, 56, 65, 0, 261, 61, 261, 0, 59, 62, + 63, 0, 261, 0, 0, 60, 64, 45, 50, 66, + 0, 39, 0, 0, 261, 0, 94, 95, 0, 0, + 0, 0, 261, 0, 210, 201, 203, 205, 178, 190, + 208, 199, 193, 191, 194, 189, 196, 198, 206, 209, + 188, 192, 195, 197, 202, 200, 204, 207, 211, 213, + 212, 186, 0, 0, 243, 180, 184, 182, 0, 0, + 93, 187, 177, 185, 0, 183, 179, 181, 92, 0, + 96, 0, 0, 0, 0, 0, 261, 86, 261, 0, + 262, 0, 87, 0, 89, 69, 74, 73, 70, 71, + 72, 261, 75, 76, 0, 0, 0, 269, 268, 266, + 267, 265, 67, 261, 0, 261, 0, 0, 68, 77, + 261, 0, 261, 0, 0, 78, 0, 79, 0, 82, + 85, 0, 0, 215, 225, 224, 0, 227, 229, 228, + 226, 0, 244, 217, 221, 219, 223, 214, 222, 0, + 220, 216, 218, 0, 81, 80, 0, 83, 0, 84, + 88, 100, 0, 38, 0, 0, 0, 0, 91, 90, + 0, 103, 23, 27, 29, 28, 0, 0, 261, 262, + 0, 261, 0, 106, 105, 261, 0, 104, 102, 0, + 0, 18, 261, 17, 0, 19, 0, 0, 251, 0, + 261, 0, 239, 0, 232, 238, 0, 237, 234, 261, + 261, 262, 233, 235, 0, 261, 0, 230, 261, 0, + 261, 0, 231, 0, 0, 13, 270, 9, 5, 8, + 4, 0, 7, 259, 6, 0, 3}; const short QXmlStreamReader_Table::goto_default [] = { 2, 4, 3, 49, 388, 43, 37, 52, 47, 41, @@ -736,8 +736,8 @@ public: } }; -class QXmlStreamEntityResolver; +class QXmlStreamEntityResolver; #ifndef QT_NO_XMLSTREAMREADER class QXmlStreamReaderPrivate : public QXmlStreamReader_Table, public QXmlStreamPrivateTagStack{ QXmlStreamReader *q_ptr; @@ -1355,44 +1355,44 @@ bool QXmlStreamReaderPrivate::parse() scanDtd = false; break; - case 36: + case 37: if (!scanString(spell[EMPTY], EMPTY, false) && !scanString(spell[ANY], ANY, false) && atEnd) { - resume(36); + resume(37); return false; } break; - case 42: + case 43: if (!scanString(spell[PCDATA], PCDATA, false) && atEnd) { - resume(42); + resume(43); return false; } break; - case 67: { + case 68: { lastAttributeIsCData = true; } break; - case 77: + case 78: if (!scanAfterDefaultDecl() && atEnd) { - resume(77); + resume(78); return false; } break; - case 82: + case 83: sym(1) = sym(2); lastAttributeValue.clear(); lastAttributeIsCData = false; if (!scanAttType() && atEnd) { - resume(82); + resume(83); return false; } break; - case 83: { + case 84: { DtdAttribute &dtdAttribute = dtdAttributes.push(); dtdAttribute.tagName.clear(); dtdAttribute.isCDATA = lastAttributeIsCData; @@ -1413,7 +1413,7 @@ bool QXmlStreamReaderPrivate::parse() } } break; - case 87: { + case 88: { if (referenceToUnparsedEntityDetected && !standalone) break; int n = dtdAttributes.size(); @@ -1433,9 +1433,9 @@ bool QXmlStreamReaderPrivate::parse() } } break; - case 88: { + case 89: { if (!scanPublicOrSystem() && atEnd) { - resume(88); + resume(89); return false; } EntityDeclaration &entityDeclaration = entityDeclarations.push(); @@ -1443,9 +1443,9 @@ bool QXmlStreamReaderPrivate::parse() entityDeclaration.name = symString(3); } break; - case 89: { + case 90: { if (!scanPublicOrSystem() && atEnd) { - resume(89); + resume(90); return false; } EntityDeclaration &entityDeclaration = entityDeclarations.push(); @@ -1454,9 +1454,9 @@ bool QXmlStreamReaderPrivate::parse() entityDeclaration.parameter = true; } break; - case 90: { + case 91: { if (!scanNData() && atEnd) { - resume(90); + resume(91); return false; } EntityDeclaration &entityDeclaration = entityDeclarations.top(); @@ -1464,9 +1464,9 @@ bool QXmlStreamReaderPrivate::parse() entityDeclaration.external = true; } break; - case 91: { + case 92: { if (!scanNData() && atEnd) { - resume(91); + resume(92); return false; } EntityDeclaration &entityDeclaration = entityDeclarations.top(); @@ -1475,7 +1475,7 @@ bool QXmlStreamReaderPrivate::parse() entityDeclaration.external = true; } break; - case 92: { + case 93: { EntityDeclaration &entityDeclaration = entityDeclarations.top(); entityDeclaration.notationName = symString(3); if (entityDeclaration.parameter) @@ -1483,8 +1483,8 @@ bool QXmlStreamReaderPrivate::parse() } //fall through - case 93: - case 94: { + case 94: + case 95: { if (referenceToUnparsedEntityDetected && !standalone) { entityDeclarations.pop(); break; @@ -1502,7 +1502,7 @@ bool QXmlStreamReaderPrivate::parse() } } break; - case 95: { + case 96: { setType(QXmlStreamReader::ProcessingInstruction); int pos = sym(4).pos + sym(4).len; processingInstructionTarget = symString(3); @@ -1515,39 +1515,39 @@ bool QXmlStreamReaderPrivate::parse() else if(!QXmlUtils::isNCName(piTarget)) raiseWellFormedError(QXmlStream::tr("%1 is an invalid processing instruction name.").arg(piTarget)); } else if (type != QXmlStreamReader::Invalid){ - resume(95); + resume(96); return false; } } break; - case 96: + case 97: setType(QXmlStreamReader::ProcessingInstruction); processingInstructionTarget = symString(3); if (!processingInstructionTarget.toString().compare(QLatin1String("xml"), Qt::CaseInsensitive)) raiseWellFormedError(QXmlStream::tr("Invalid processing instruction name.")); break; - case 97: + case 98: if (!scanAfterLangleBang() && atEnd) { - resume(97); + resume(98); return false; } break; - case 98: + case 99: if (!scanUntil("--")) { - resume(98); + resume(99); return false; } break; - case 99: { + case 100: { setType(QXmlStreamReader::Comment); int pos = sym(1).pos + 4; text = QStringRef(&textBuffer, pos, textBuffer.size() - pos - 3); } break; - case 100: { + case 101: { setType(QXmlStreamReader::Characters); isCDATA = true; isWhitespace = false; @@ -1555,131 +1555,131 @@ bool QXmlStreamReaderPrivate::parse() if (scanUntil("]]>", -1)) { text = QStringRef(&textBuffer, pos, textBuffer.size() - pos - 3); } else { - resume(100); + resume(101); return false; } } break; - case 101: { + case 102: { if (!scanPublicOrSystem() && atEnd) { - resume(101); + resume(102); return false; } NotationDeclaration ¬ationDeclaration = notationDeclarations.push(); notationDeclaration.name = symString(3); } break; - case 102: { + case 103: { NotationDeclaration ¬ationDeclaration = notationDeclarations.top(); notationDeclaration.systemId = symString(3); notationDeclaration.publicId.clear(); } break; - case 103: { + case 104: { NotationDeclaration ¬ationDeclaration = notationDeclarations.top(); notationDeclaration.systemId.clear(); checkPublicLiteral((notationDeclaration.publicId = symString(3))); } break; - case 104: { + case 105: { NotationDeclaration ¬ationDeclaration = notationDeclarations.top(); checkPublicLiteral((notationDeclaration.publicId = symString(3))); notationDeclaration.systemId = symString(5); } break; - case 128: + case 129: isWhitespace = false; // fall through - case 129: + case 130: sym(1).len += fastScanContentCharList(); if (atEnd && !inParseEntity) { - resume(129); + resume(130); return false; } break; - case 138: + case 139: if (!textBuffer.isEmpty()) { setType(QXmlStreamReader::Characters); text = &textBuffer; } break; - case 139: case 140: + case 141: clearSym(); break; - case 141: case 142: + case 143: sym(1) = sym(2); break; - case 143: case 144: case 145: case 146: + case 147: sym(1).len += sym(2).len; break; - case 172: + case 173: if (normalizeLiterals) textBuffer.data()[textBuffer.size()-1] = QLatin1Char(' '); break; - case 173: + case 174: sym(1).len += fastScanLiteralContent(); if (atEnd) { - resume(173); + resume(174); return false; } break; - case 174: { + case 175: { if (!QXmlUtils::isPublicID(symString(1).toString())) { raiseWellFormedError(QXmlStream::tr("%1 is an invalid PUBLIC identifier.").arg(symString(1).toString())); - resume(174); + resume(175); return false; } } break; - case 175: case 176: + case 177: clearSym(); break; - case 177: case 178: + case 179: sym(1) = sym(2); break; - case 179: case 180: case 181: case 182: + case 183: sym(1).len += sym(2).len; break; - case 212: case 213: + case 214: clearSym(); break; - case 214: case 215: + case 216: sym(1) = sym(2); lastAttributeValue = symString(1); break; - case 216: case 217: case 218: case 219: + case 220: sym(1).len += sym(2).len; break; - case 228: { + case 229: { QStringRef prefix = symPrefix(1); if (prefix.isEmpty() && symString(1) == QLatin1String("xmlns") && namespaceProcessing) { NamespaceDeclaration &namespaceDeclaration = namespaceDeclarations.push(); @@ -1749,7 +1749,7 @@ bool QXmlStreamReaderPrivate::parse() } } break; - case 234: { + case 235: { normalizeLiterals = true; Tag &tag = tagStack_push(); prefix = tag.namespaceDeclaration.prefix = addToStringStorage(symPrefix(2)); @@ -1759,11 +1759,11 @@ bool QXmlStreamReaderPrivate::parse() raiseWellFormedError(QXmlStream::tr("Invalid XML name.")); } break; - case 235: + case 236: isEmptyElement = true; // fall through - case 236: + case 237: setType(QXmlStreamReader::StartElement); resolveTag(); if (tagStack.size() == 1 && hasSeenTag && !inParseEntity) @@ -1771,7 +1771,7 @@ bool QXmlStreamReaderPrivate::parse() hasSeenTag = true; break; - case 237: { + case 238: { setType(QXmlStreamReader::EndElement); Tag &tag = tagStack_pop(); @@ -1782,7 +1782,7 @@ bool QXmlStreamReaderPrivate::parse() raiseWellFormedError(QXmlStream::tr("Opening and ending tag mismatch.")); } break; - case 238: + case 239: if (entitiesMustBeDeclared()) { raiseWellFormedError(QXmlStream::tr("Entity '%1' not declared.").arg(unresolvedEntity)); break; @@ -1791,7 +1791,7 @@ bool QXmlStreamReaderPrivate::parse() name = &unresolvedEntity; break; - case 239: { + case 240: { sym(1).len += sym(2).len + 1; QString reference = symString(2).toString(); if (entityHash.contains(reference)) { @@ -1830,7 +1830,7 @@ bool QXmlStreamReaderPrivate::parse() } break; - case 240: { + case 241: { sym(1).len += sym(2).len + 1; QString reference = symString(2).toString(); if (parameterEntityHash.contains(reference)) { @@ -1849,11 +1849,11 @@ bool QXmlStreamReaderPrivate::parse() } } break; - case 241: + case 242: sym(1).len += sym(2).len + 1; break; - case 242: { + case 243: { sym(1).len += sym(2).len + 1; QString reference = symString(2).toString(); if (entityHash.contains(reference)) { @@ -1889,7 +1889,7 @@ bool QXmlStreamReaderPrivate::parse() } } break; - case 243: { + case 244: { if (uint s = resolveCharRef(3)) { if (s >= 0xffff) putStringLiteral(QString::fromUcs4(&s, 1)); @@ -1903,43 +1903,43 @@ bool QXmlStreamReaderPrivate::parse() } } break; - case 246: case 247: + case 248: sym(1).len += sym(2).len; break; - case 258: + case 259: sym(1).len += fastScanSpace(); if (atEnd) { - resume(258); + resume(259); return false; } break; - case 261: { + case 262: { sym(1).len += fastScanName(&sym(1).prefix); if (atEnd) { - resume(261); + resume(262); return false; } } break; - case 262: + case 263: sym(1).len += fastScanName(); if (atEnd) { - resume(262); + resume(263); return false; } break; - case 263: case 264: case 265: case 266: case 267: + case 268: sym(1).len += fastScanNMTOKEN(); if (atEnd) { - resume(267); + resume(268); return false; } @@ -1958,7 +1958,8 @@ bool QXmlStreamReaderPrivate::parse() } return false; } +#endif //QT_NO_XMLSTREAMREADER.xml + -#endif //QT_NO_XMLSTREAMREADER #endif // QXMLSTREAM_P_H diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h index ed29e4ed34..b65e1017c2 100644 --- a/src/dbus/qdbusconnection_p.h +++ b/src/dbus/qdbusconnection_p.h @@ -123,6 +123,7 @@ public: QObject* obj; int midx; QList<int> params; + QStringList argumentMatch; QByteArray matchRule; }; @@ -198,9 +199,6 @@ public: QDBusMetaObject *findMetaObject(const QString &service, const QString &path, const QString &interface, QDBusError &error); - void registerService(const QString &serviceName); - void unregisterService(const QString &serviceName); - void postEventToThread(int action, QObject *target, QEvent *event); inline void serverConnection(const QDBusConnection &connection) @@ -237,6 +235,8 @@ public slots: void objectDestroyed(QObject *o); void relaySignal(QObject *obj, const QMetaObject *, int signalId, const QVariantList &args); void _q_serviceOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner); + void registerService(const QString &serviceName); + void unregisterService(const QString &serviceName); signals: void serviceOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner); diff --git a/src/dbus/qdbusconnectioninterface.cpp b/src/dbus/qdbusconnectioninterface.cpp index 414d3189c6..0f9a67f6f7 100644 --- a/src/dbus/qdbusconnectioninterface.cpp +++ b/src/dbus/qdbusconnectioninterface.cpp @@ -394,6 +394,12 @@ void QDBusConnectionInterface::disconnectNotify(const char *signalName) empty string, it means the name \a name has just been created; if \a newOwner is empty, the name \a name has no current owner and is no longer available. + + \note connecting to this signal will make the application listen for and + receive every single service ownership change on the bus. Depending on + how many services are running, this make the application be activated to + receive more signals than it needs. To avoid this problem, use the + QDBusServiceWatcher class, which can listen for specific changes. */ /*! diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp index 2d276680a6..40febc4638 100644 --- a/src/dbus/qdbusintegrator.cpp +++ b/src/dbus/qdbusintegrator.cpp @@ -948,9 +948,6 @@ QDBusConnectionPrivate::QDBusConnectionPrivate(QObject *p) rootNode.flags = 0; watchedServiceNames[QLatin1String(DBUS_SERVICE_DBUS)] = 1; - - connect(this, SIGNAL(serviceOwnerChanged(QString,QString,QString)), - this, SLOT(_q_serviceOwnerChanged(QString,QString,QString))); } QDBusConnectionPrivate::~QDBusConnectionPrivate() @@ -1180,11 +1177,7 @@ void QDBusConnectionPrivate::relaySignal(QObject *obj, const QMetaObject *mo, in void QDBusConnectionPrivate::_q_serviceOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner) { - if (oldOwner == baseService) - unregisterService(name); - if (newOwner == baseService) - registerService(name); - + Q_UNUSED(oldOwner); QDBusWriteLocker locker(UpdateSignalHookOwnerAction, this); QMutableHashIterator<QString, SignalHook> it(signalHooks); it.toFront(); @@ -1230,6 +1223,7 @@ bool QDBusConnectionPrivate::prepareHook(QDBusConnectionPrivate::SignalHook &hoo hook.owner = owner; // we don't care if the service has an owner yet hook.path = path; hook.obj = receiver; + hook.argumentMatch = argMatch; // build the D-Bus signal name and signature // This should not happen for QDBusConnection::connect, use buildSignature here, since @@ -1502,6 +1496,24 @@ void QDBusConnectionPrivate::handleSignal(const QString &key, const QDBusMessage continue; if (hook.signature.isEmpty() && !hook.signature.isNull() && !msg.signature().isEmpty()) continue; + if (!hook.argumentMatch.isEmpty()) { + const QVariantList arguments = msg.arguments(); + if (hook.argumentMatch.size() > arguments.size()) + continue; + + bool matched = true; + for (int i = 0; i < hook.argumentMatch.size(); ++i) { + const QString ¶m = hook.argumentMatch.at(i); + if (param.isNull()) + continue; // don't try to match against this + if (param == arguments.at(i).toString()) + continue; // matched + matched = false; + break; + } + if (!matched) + continue; + } activateSignal(hook, msg); } @@ -1636,9 +1648,16 @@ void QDBusConnectionPrivate::setConnection(DBusConnection *dbc, const QDBusError baseService = QString::fromUtf8(service); } else { - qWarning("QDBusConnectionPrivate::SetConnection: Unable to get base service"); + qWarning("QDBusConnectionPrivate::setConnection: Unable to get base service"); } + QString busService = QLatin1String(DBUS_SERVICE_DBUS); + connectSignal(busService, QString(), QString(), QString(), QLatin1String("NameAcquired"), QStringList(), QString(), + this, SLOT(registerService(QString))); + connectSignal(busService, QString(), QString(), QString(), QLatin1String("NameLost"), QStringList(), QString(), + this, SLOT(unregisterService(QString))); + + q_dbus_connection_add_filter(connection, qDBusSignalFilter, this, 0); //qDebug("base service: %s", service); diff --git a/src/dbus/qdbusserver.cpp b/src/dbus/qdbusserver.cpp index e028940691..d4e90f6e90 100644 --- a/src/dbus/qdbusserver.cpp +++ b/src/dbus/qdbusserver.cpp @@ -69,8 +69,8 @@ QDBusServer::QDBusServer(const QString &address, QObject *parent) if (address.isEmpty()) return; - QObject::connect(d, SIGNAL(newServerConnection(const QDBusConnection &)), - this, SIGNAL(newConnection(const QDBusConnection &))); + QObject::connect(d, SIGNAL(newServerConnection(QDBusConnection)), + this, SIGNAL(newConnection(QDBusConnection))); // server = q_dbus_server_listen( "unix:tmpdir=/tmp", &error); QDBusErrorInternal error; diff --git a/src/dbus/qdbusservicewatcher.cpp b/src/dbus/qdbusservicewatcher.cpp index 1557b47870..4328558ff0 100644 --- a/src/dbus/qdbusservicewatcher.cpp +++ b/src/dbus/qdbusservicewatcher.cpp @@ -50,7 +50,6 @@ QT_BEGIN_NAMESPACE Q_GLOBAL_STATIC_WITH_ARGS(QString, busService, (QLatin1String(DBUS_SERVICE_DBUS))) -Q_GLOBAL_STATIC_WITH_ARGS(QString, busPath, (QLatin1String(DBUS_PATH_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString, busInterface, (QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString, signalName, (QLatin1String("NameOwnerChanged"))) @@ -127,7 +126,7 @@ QStringList QDBusServiceWatcherPrivate::matchArgsForService(const QString &servi void QDBusServiceWatcherPrivate::addService(const QString &service) { QStringList matchArgs = matchArgsForService(service); - connection.connect(*busService(), *busPath(), *busInterface(), *signalName(), + connection.connect(*busService(), QString(), *busInterface(), *signalName(), matchArgs, QString(), q_func(), SLOT(_q_serviceOwnerChanged(QString,QString,QString))); } @@ -135,7 +134,7 @@ void QDBusServiceWatcherPrivate::addService(const QString &service) void QDBusServiceWatcherPrivate::removeService(const QString &service) { QStringList matchArgs = matchArgsForService(service); - connection.disconnect(*busService(), *busPath(), *busInterface(), *signalName(), + connection.disconnect(*busService(), QString(), *busInterface(), *signalName(), matchArgs, QString(), q_func(), SLOT(_q_serviceOwnerChanged(QString,QString,QString))); } diff --git a/src/gui/dialogs/qcolordialog.cpp b/src/gui/dialogs/qcolordialog.cpp index 44a82ef96a..a9126f651e 100644 --- a/src/gui/dialogs/qcolordialog.cpp +++ b/src/gui/dialogs/qcolordialog.cpp @@ -1594,8 +1594,8 @@ void QColorDialogPrivate::init(const QColor &initial) cs = new QColorShower(q); QObject::connect(cs, SIGNAL(newCol(QRgb)), q, SLOT(_q_newColorTypedIn(QRgb))); - QObject::connect(cs, SIGNAL(currentColorChanged(const QColor&)), - q, SIGNAL(currentColorChanged(const QColor&))); + QObject::connect(cs, SIGNAL(currentColorChanged(QColor)), + q, SIGNAL(currentColorChanged(QColor))); #if defined(Q_WS_S60) if (!nonTouchUI) pWidth -= cp->size().width(); @@ -1904,7 +1904,7 @@ void QColorDialog::setVisible(bool visible) void QColorDialog::open(QObject *receiver, const char *member) { Q_D(QColorDialog); - connect(this, SIGNAL(colorSelected(const QColor&)), receiver, member); + connect(this, SIGNAL(colorSelected(QColor)), receiver, member); d->receiverToDisconnectOnClose = receiver; d->memberToDisconnectOnClose = member; QDialog::open(); @@ -2036,7 +2036,7 @@ void QColorDialog::done(int result) d->selectedQColor = QColor(); } if (d->receiverToDisconnectOnClose) { - disconnect(this, SIGNAL(colorSelected(const QColor&)), + disconnect(this, SIGNAL(colorSelected(QColor)), d->receiverToDisconnectOnClose, d->memberToDisconnectOnClose); d->receiverToDisconnectOnClose = 0; } diff --git a/src/gui/dialogs/qcolordialog_mac.mm b/src/gui/dialogs/qcolordialog_mac.mm index 5f074c0d94..53d2e1e222 100644 --- a/src/gui/dialogs/qcolordialog_mac.mm +++ b/src/gui/dialogs/qcolordialog_mac.mm @@ -336,7 +336,6 @@ QT_USE_NAMESPACE } } - QAbstractEventDispatcher::instance()->interrupt(); if (mResultCode == NSCancelButton) mPriv->colorDialog()->reject(); else diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp index 3b1befde4c..45a410fb01 100644 --- a/src/gui/dialogs/qfiledialog.cpp +++ b/src/gui/dialogs/qfiledialog.cpp @@ -691,8 +691,8 @@ QFileDialog::Options QFileDialog::options() const void QFileDialog::open(QObject *receiver, const char *member) { Q_D(QFileDialog); - const char *signal = (fileMode() == ExistingFiles) ? SIGNAL(filesSelected(const QStringList&)) - : SIGNAL(fileSelected(const QString&)); + const char *signal = (fileMode() == ExistingFiles) ? SIGNAL(filesSelected(QStringList)) + : SIGNAL(fileSelected(QString)); connect(this, signal, receiver, member); d->signalToDisconnectOnClose = signal; d->receiverToDisconnectOnClose = receiver; @@ -2145,11 +2145,11 @@ void QFileDialogPrivate::createWidgets() model->setNameFilterDisables(false); #endif model->d_func()->disableRecursiveSort = true; - QFileDialog::connect(model, SIGNAL(fileRenamed(const QString &, const QString &, const QString &)), q, SLOT(_q_fileRenamed(const QString &, const QString &, const QString &))); - QFileDialog::connect(model, SIGNAL(rootPathChanged(const QString &)), - q, SLOT(_q_pathChanged(const QString &))); - QFileDialog::connect(model, SIGNAL(rowsInserted(const QModelIndex &, int, int)), - q, SLOT(_q_rowsInserted(const QModelIndex &))); + QFileDialog::connect(model, SIGNAL(fileRenamed(QString,QString,QString)), q, SLOT(_q_fileRenamed(QString,QString,QString))); + QFileDialog::connect(model, SIGNAL(rootPathChanged(QString)), + q, SLOT(_q_pathChanged(QString))); + QFileDialog::connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)), + q, SLOT(_q_rowsInserted(QModelIndex))); model->setReadOnly(false); qFileDialogUi.reset(new Ui_QFileDialog()); @@ -2159,8 +2159,8 @@ void QFileDialogPrivate::createWidgets() initialBookmarks << QUrl::fromLocalFile(QLatin1String("")) << QUrl::fromLocalFile(QDir::homePath()); qFileDialogUi->sidebar->init(model, initialBookmarks); - QFileDialog::connect(qFileDialogUi->sidebar, SIGNAL(goToUrl(const QUrl &)), - q, SLOT(_q_goToUrl(const QUrl &))); + QFileDialog::connect(qFileDialogUi->sidebar, SIGNAL(goToUrl(QUrl)), + q, SLOT(_q_goToUrl(QUrl))); QObject::connect(qFileDialogUi->buttonBox, SIGNAL(accepted()), q, SLOT(accept())); QObject::connect(qFileDialogUi->buttonBox, SIGNAL(rejected()), q, SLOT(reject())); @@ -2194,8 +2194,8 @@ void QFileDialogPrivate::createWidgets() qFileDialogUi->fileTypeCombo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); QObject::connect(qFileDialogUi->fileTypeCombo, SIGNAL(activated(int)), q, SLOT(_q_useNameFilter(int))); - QObject::connect(qFileDialogUi->fileTypeCombo, SIGNAL(activated(const QString &)), - q, SIGNAL(filterSelected(const QString &))); + QObject::connect(qFileDialogUi->fileTypeCombo, SIGNAL(activated(QString)), + q, SIGNAL(filterSelected(QString))); qFileDialogUi->listView->init(this); qFileDialogUi->listView->setModel(model); @@ -2221,8 +2221,8 @@ void QFileDialogPrivate::createWidgets() QActionGroup *showActionGroup = new QActionGroup(q); showActionGroup->setExclusive(false); - QObject::connect(showActionGroup, SIGNAL(triggered(QAction *)), - q, SLOT(_q_showHeader(QAction *)));; + QObject::connect(showActionGroup, SIGNAL(triggered(QAction*)), + q, SLOT(_q_showHeader(QAction*)));; QAbstractItemModel *abstractModel = model; #ifndef QT_NO_PROXYMODEL @@ -2251,7 +2251,7 @@ void QFileDialogPrivate::createWidgets() // Selections QItemSelectionModel *selections = qFileDialogUi->listView->selectionModel(); - QObject::connect(selections, SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)), + QObject::connect(selections, SIGNAL(selectionChanged(QItemSelection,QItemSelection)), q, SLOT(_q_selectionChanged())); QObject::connect(selections, SIGNAL(currentChanged(QModelIndex,QModelIndex)), q, SLOT(_q_currentChanged(QModelIndex))); @@ -2289,11 +2289,11 @@ void QFileDialog::setProxyModel(QAbstractProxyModel *proxyModel) QModelIndex idx = d->rootIndex(); if (d->proxyModel) { - disconnect(d->proxyModel, SIGNAL(rowsInserted(const QModelIndex &, int, int)), - this, SLOT(_q_rowsInserted(const QModelIndex &))); + disconnect(d->proxyModel, SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(_q_rowsInserted(QModelIndex))); } else { - disconnect(d->model, SIGNAL(rowsInserted(const QModelIndex &, int, int)), - this, SLOT(_q_rowsInserted(const QModelIndex &))); + disconnect(d->model, SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(_q_rowsInserted(QModelIndex))); } if (proxyModel != 0) { @@ -2306,8 +2306,8 @@ void QFileDialog::setProxyModel(QAbstractProxyModel *proxyModel) d->completer->setModel(d->proxyModel); d->completer->proxyModel = d->proxyModel; #endif - connect(d->proxyModel, SIGNAL(rowsInserted(const QModelIndex &, int, int)), - this, SLOT(_q_rowsInserted(const QModelIndex &))); + connect(d->proxyModel, SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(_q_rowsInserted(QModelIndex))); } else { d->proxyModel = 0; d->qFileDialogUi->listView->setModel(d->model); @@ -2317,8 +2317,8 @@ void QFileDialog::setProxyModel(QAbstractProxyModel *proxyModel) d->completer->sourceModel = d->model; d->completer->proxyModel = 0; #endif - connect(d->model, SIGNAL(rowsInserted(const QModelIndex &, int, int)), - this, SLOT(_q_rowsInserted(const QModelIndex &))); + connect(d->model, SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(_q_rowsInserted(QModelIndex))); } QScopedPointer<QItemSelectionModel> selModel(d->qFileDialogUi->treeView->selectionModel()); d->qFileDialogUi->treeView->setSelectionModel(d->qFileDialogUi->listView->selectionModel()); @@ -2327,7 +2327,7 @@ void QFileDialog::setProxyModel(QAbstractProxyModel *proxyModel) // reconnect selection QItemSelectionModel *selections = d->qFileDialogUi->listView->selectionModel(); - QObject::connect(selections, SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)), + QObject::connect(selections, SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(_q_selectionChanged())); QObject::connect(selections, SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(_q_currentChanged(QModelIndex))); diff --git a/src/gui/dialogs/qfileinfogatherer.cpp b/src/gui/dialogs/qfileinfogatherer.cpp index 76d87ae152..2729530377 100644 --- a/src/gui/dialogs/qfileinfogatherer.cpp +++ b/src/gui/dialogs/qfileinfogatherer.cpp @@ -75,8 +75,8 @@ QFileInfoGatherer::QFileInfoGatherer(QObject *parent) #endif #ifndef QT_NO_FILESYSTEMWATCHER watcher = new QFileSystemWatcher(this); - connect(watcher, SIGNAL(directoryChanged(const QString &)), this, SLOT(list(const QString &))); - connect(watcher, SIGNAL(fileChanged(const QString &)), this, SLOT(updateFile(const QString &))); + connect(watcher, SIGNAL(directoryChanged(QString)), this, SLOT(list(QString))); + connect(watcher, SIGNAL(fileChanged(QString)), this, SLOT(updateFile(QString))); #endif start(LowPriority); } diff --git a/src/gui/dialogs/qfilesystemmodel.cpp b/src/gui/dialogs/qfilesystemmodel.cpp index b9012c7654..8e785037e7 100644 --- a/src/gui/dialogs/qfilesystemmodel.cpp +++ b/src/gui/dialogs/qfilesystemmodel.cpp @@ -1864,12 +1864,12 @@ void QFileSystemModelPrivate::init() { Q_Q(QFileSystemModel); qRegisterMetaType<QList<QPair<QString,QFileInfo> > >("QList<QPair<QString,QFileInfo> >"); - q->connect(&fileInfoGatherer, SIGNAL(newListOfFiles(const QString &, const QStringList &)), - q, SLOT(_q_directoryChanged(const QString &, const QStringList &))); - q->connect(&fileInfoGatherer, SIGNAL(updates(const QString &, const QList<QPair<QString, QFileInfo> > &)), - q, SLOT(_q_fileSystemChanged(const QString &, const QList<QPair<QString, QFileInfo> > &))); - q->connect(&fileInfoGatherer, SIGNAL(nameResolved(const QString &, const QString &)), - q, SLOT(_q_resolvedName(const QString &, const QString &))); + q->connect(&fileInfoGatherer, SIGNAL(newListOfFiles(QString,QStringList)), + q, SLOT(_q_directoryChanged(QString,QStringList))); + q->connect(&fileInfoGatherer, SIGNAL(updates(QString,QList<QPair<QString,QFileInfo> >)), + q, SLOT(_q_fileSystemChanged(QString,QList<QPair<QString,QFileInfo> >))); + q->connect(&fileInfoGatherer, SIGNAL(nameResolved(QString,QString)), + q, SLOT(_q_resolvedName(QString,QString))); q->connect(&delayedSortTimer, SIGNAL(timeout()), q, SLOT(_q_performDelayedSort()), Qt::QueuedConnection); } diff --git a/src/gui/dialogs/qfontdialog.cpp b/src/gui/dialogs/qfontdialog.cpp index 60fae27ed5..d035ef4871 100644 --- a/src/gui/dialogs/qfontdialog.cpp +++ b/src/gui/dialogs/qfontdialog.cpp @@ -948,7 +948,7 @@ bool QFontDialogPrivate::sharedFontPanelAvailable = true; void QFontDialog::open(QObject *receiver, const char *member) { Q_D(QFontDialog); - connect(this, SIGNAL(fontSelected(const QFont&)), receiver, member); + connect(this, SIGNAL(fontSelected(QFont)), receiver, member); d->receiverToDisconnectOnClose = receiver; d->memberToDisconnectOnClose = member; QDialog::open(); @@ -1038,7 +1038,7 @@ void QFontDialog::done(int result) d->selectedFont = QFont(); } if (d->receiverToDisconnectOnClose) { - disconnect(this, SIGNAL(fontSelected(const QFont&)), + disconnect(this, SIGNAL(fontSelected(QFont)), d->receiverToDisconnectOnClose, d->memberToDisconnectOnClose); d->receiverToDisconnectOnClose = 0; } diff --git a/src/gui/dialogs/qinputdialog.cpp b/src/gui/dialogs/qinputdialog.cpp index 86213b4c35..39ce1ab8dd 100644 --- a/src/gui/dialogs/qinputdialog.cpp +++ b/src/gui/dialogs/qinputdialog.cpp @@ -95,7 +95,7 @@ class QInputDialogSpinBox : public QSpinBox public: QInputDialogSpinBox(QWidget *parent) : QSpinBox(parent) { - connect(lineEdit(), SIGNAL(textChanged(const QString&)), this, SLOT(notifyTextChanged())); + connect(lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(notifyTextChanged())); connect(this, SIGNAL(editingFinished()), this, SLOT(notifyTextChanged())); } @@ -130,7 +130,7 @@ class QInputDialogDoubleSpinBox : public QDoubleSpinBox public: QInputDialogDoubleSpinBox(QWidget *parent = 0) : QDoubleSpinBox(parent) { - connect(lineEdit(), SIGNAL(textChanged(const QString&)), this, SLOT(notifyTextChanged())); + connect(lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(notifyTextChanged())); connect(this, SIGNAL(editingFinished()), this, SLOT(notifyTextChanged())); } @@ -245,8 +245,8 @@ void QInputDialogPrivate::ensureLineEdit() if (!lineEdit) { lineEdit = new QLineEdit(q); lineEdit->hide(); - QObject::connect(lineEdit, SIGNAL(textChanged(const QString&)), - q, SLOT(_q_textChanged(const QString&))); + QObject::connect(lineEdit, SIGNAL(textChanged(QString)), + q, SLOT(_q_textChanged(QString))); } } @@ -256,10 +256,10 @@ void QInputDialogPrivate::ensureComboBox() if (!comboBox) { comboBox = new QComboBox(q); comboBox->hide(); - QObject::connect(comboBox, SIGNAL(editTextChanged(const QString&)), - q, SLOT(_q_textChanged(const QString&))); - QObject::connect(comboBox, SIGNAL(currentIndexChanged(const QString&)), - q, SLOT(_q_textChanged(const QString&))); + QObject::connect(comboBox, SIGNAL(editTextChanged(QString)), + q, SLOT(_q_textChanged(QString))); + QObject::connect(comboBox, SIGNAL(currentIndexChanged(QString)), + q, SLOT(_q_textChanged(QString))); } } @@ -276,8 +276,8 @@ void QInputDialogPrivate::ensureListView() listView->setModel(comboBox->model()); listView->setCurrentIndex(QModelIndex()); // ### QObject::connect(listView->selectionModel(), - SIGNAL(currentRowChanged(const QModelIndex&, const QModelIndex&)), - q, SLOT(_q_currentRowChanged(const QModelIndex&, const QModelIndex&))); + SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), + q, SLOT(_q_currentRowChanged(QModelIndex,QModelIndex))); } } diff --git a/src/gui/dialogs/qprintdialog_qws.cpp b/src/gui/dialogs/qprintdialog_qws.cpp index 37f01be074..05a290d5d7 100644 --- a/src/gui/dialogs/qprintdialog_qws.cpp +++ b/src/gui/dialogs/qprintdialog_qws.cpp @@ -266,8 +266,8 @@ void QPrintDialogPrivate::setupDestination() // print destinations printerOrFile = new QButtonGroup(q); - QObject::connect(printerOrFile, SIGNAL(buttonClicked(QAbstractButton *)), - q, SLOT(_q_printerOrFileSelected(QAbstractButton *))); + QObject::connect(printerOrFile, SIGNAL(buttonClicked(QAbstractButton*)), + q, SLOT(_q_printerOrFileSelected(QAbstractButton*))); printToPrinterButton = q->findChild<QRadioButton *>("printToPrinterButton"); printerOrFile->addButton(printToPrinterButton); @@ -288,8 +288,8 @@ void QPrintDialogPrivate::setupPrinterSettings() // color mode colorMode = new QButtonGroup(q); - QObject::connect(colorMode, SIGNAL(buttonClicked(QAbstractButton *)), - q, SLOT(_q_colorModeSelected(QAbstractButton *))); + QObject::connect(colorMode, SIGNAL(buttonClicked(QAbstractButton*)), + q, SLOT(_q_colorModeSelected(QAbstractButton*))); printColor = q->findChild<QRadioButton *>("printColor"); colorMode->addButton(printColor); diff --git a/src/gui/dialogs/qprintpreviewdialog.cpp b/src/gui/dialogs/qprintpreviewdialog.cpp index 1f0b51dc20..bb8437c34e 100644 --- a/src/gui/dialogs/qprintpreviewdialog.cpp +++ b/src/gui/dialogs/qprintpreviewdialog.cpp @@ -224,7 +224,7 @@ void QPrintPreviewDialogPrivate::init(QPrinter *_printer) printer = new QPrinter; preview = new QPrintPreviewWidget(printer, q); } - QObject::connect(preview, SIGNAL(paintRequested(QPrinter *)), q, SIGNAL(paintRequested(QPrinter *))); + QObject::connect(preview, SIGNAL(paintRequested(QPrinter*)), q, SIGNAL(paintRequested(QPrinter*))); QObject::connect(preview, SIGNAL(previewChanged()), q, SLOT(_q_previewChanged())); setupActions(); diff --git a/src/gui/dialogs/qsidebar.cpp b/src/gui/dialogs/qsidebar.cpp index 396889db5d..879d1b13bd 100644 --- a/src/gui/dialogs/qsidebar.cpp +++ b/src/gui/dialogs/qsidebar.cpp @@ -293,20 +293,20 @@ void QUrlModel::setFileSystemModel(QFileSystemModel *model) if (model == fileSystemModel) return; if (fileSystemModel != 0) { - disconnect(model, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), - this, SLOT(dataChanged(const QModelIndex &, const QModelIndex &))); + disconnect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), + this, SLOT(dataChanged(QModelIndex,QModelIndex))); disconnect(model, SIGNAL(layoutChanged()), this, SLOT(layoutChanged())); - disconnect(model, SIGNAL(rowsRemoved(const QModelIndex &, int, int)), + disconnect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(layoutChanged())); } fileSystemModel = model; if (fileSystemModel != 0) { - connect(model, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), - this, SLOT(dataChanged(const QModelIndex &, const QModelIndex &))); + connect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), + this, SLOT(dataChanged(QModelIndex,QModelIndex))); connect(model, SIGNAL(layoutChanged()), this, SLOT(layoutChanged())); - connect(model, SIGNAL(rowsRemoved(const QModelIndex &, int, int)), + connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(layoutChanged())); } clear(); @@ -381,14 +381,14 @@ void QSidebar::init(QFileSystemModel *model, const QList<QUrl> &newUrls) setModel(urlModel); setItemDelegate(new QSideBarDelegate(this)); - connect(selectionModel(), SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)), - this, SLOT(clicked(const QModelIndex &))); + connect(selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), + this, SLOT(clicked(QModelIndex))); #ifndef QT_NO_DRAGANDDROP setDragDropMode(QAbstractItemView::DragDrop); #endif setContextMenuPolicy(Qt::CustomContextMenu); - connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), - this, SLOT(showContextMenu(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(QPoint)), + this, SLOT(showContextMenu(QPoint))); urlModel->setUrls(newUrls); setCurrentIndex(this->model()->index(0,0)); } @@ -414,8 +414,8 @@ QSize QSidebar::sizeHint() const void QSidebar::selectUrl(const QUrl &url) { - disconnect(selectionModel(), SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)), - this, SLOT(clicked(const QModelIndex &))); + disconnect(selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), + this, SLOT(clicked(QModelIndex))); selectionModel()->clear(); for (int i = 0; i < model()->rowCount(); ++i) { @@ -425,8 +425,8 @@ void QSidebar::selectUrl(const QUrl &url) } } - connect(selectionModel(), SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)), - this, SLOT(clicked(const QModelIndex &))); + connect(selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), + this, SLOT(clicked(QModelIndex))); } #ifndef QT_NO_MENU diff --git a/src/gui/dialogs/qwizard.cpp b/src/gui/dialogs/qwizard.cpp index db1c9e9eff..472ca35fae 100644 --- a/src/gui/dialogs/qwizard.cpp +++ b/src/gui/dialogs/qwizard.cpp @@ -759,8 +759,8 @@ void QWizardPrivate::addField(const QWizardField &field) QObject::connect(myField.object, myField.changedSignal, myField.page, SLOT(_q_maybeEmitCompleteChanged())); QObject::connect( - myField.object, SIGNAL(destroyed(QObject *)), q, - SLOT(_q_handleFieldObjectDestroyed(QObject *))); + myField.object, SIGNAL(destroyed(QObject*)), q, + SLOT(_q_handleFieldObjectDestroyed(QObject*))); } void QWizardPrivate::removeFieldAt(int index) @@ -773,8 +773,8 @@ void QWizardPrivate::removeFieldAt(int index) QObject::disconnect(field.object, field.changedSignal, field.page, SLOT(_q_maybeEmitCompleteChanged())); QObject::disconnect( - field.object, SIGNAL(destroyed(QObject *)), q, - SLOT(_q_handleFieldObjectDestroyed(QObject *))); + field.object, SIGNAL(destroyed(QObject*)), q, + SLOT(_q_handleFieldObjectDestroyed(QObject*))); fields.remove(index); } diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp index fb6727815e..a6f59927b0 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp @@ -1272,7 +1272,6 @@ void QGraphicsAnchorLayoutPrivate::createLayoutEdges() addAnchor_helper(layout, Qt::AnchorLeft, layout, Qt::AnchorRight, data); data->maxSize = QWIDGETSIZE_MAX; - data->skipInPreferred = 1; // Save a reference to layout vertices layoutFirstVertex[Horizontal] = internalVertex(layout, Qt::AnchorLeft); @@ -1284,7 +1283,6 @@ void QGraphicsAnchorLayoutPrivate::createLayoutEdges() addAnchor_helper(layout, Qt::AnchorTop, layout, Qt::AnchorBottom, data); data->maxSize = QWIDGETSIZE_MAX; - data->skipInPreferred = 1; // Save a reference to layout vertices layoutFirstVertex[Vertical] = internalVertex(layout, Qt::AnchorTop); @@ -2271,13 +2269,21 @@ QList<QSimplexConstraint *> QGraphicsAnchorLayoutPrivate::constraintsFromSizeHin layoutEdge = graph[orient].edgeData(layoutFirstVertex[orient], layoutCentralVertex[orient]); } else { layoutEdge = graph[orient].edgeData(layoutFirstVertex[orient], layoutLastVertex[orient]); + } - // If maxSize is less then "infinite", that means there are other anchors - // grouped together with this one. We can't ignore its maximum value so we - // set back the variable to NULL to prevent the continue condition from being - // satisfied in the loop below. - if (layoutEdge->maxSize < QWIDGETSIZE_MAX) - layoutEdge = 0; + // If maxSize is less then "infinite", that means there are other anchors + // grouped together with this one. We can't ignore its maximum value so we + // set back the variable to NULL to prevent the continue condition from being + // satisfied in the loop below. + const qreal expectedMax = layoutCentralVertex[orient] ? QWIDGETSIZE_MAX / 2 : QWIDGETSIZE_MAX; + qreal actualMax; + if (layoutEdge->from == layoutFirstVertex[orient]) { + actualMax = layoutEdge->maxSize; + } else { + actualMax = -layoutEdge->minSize; + } + if (actualMax != expectedMax) { + layoutEdge = 0; } // For each variable, create constraints based on size hints @@ -2700,7 +2706,9 @@ bool QGraphicsAnchorLayoutPrivate::solvePreferred(const QList<QSimplexConstraint // for (int i = 0; i < variables.size(); ++i) { AnchorData *ad = variables.at(i); - if (ad->skipInPreferred) + + // The layout original structure anchors are not relevant in preferred size calculation + if (ad->isLayoutAnchor) continue; QSimplexVariable *grower = new QSimplexVariable; diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.h b/src/gui/graphicsview/qgraphicsanchorlayout_p.h index 2b365fb14e..8529e2e673 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.h +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.h @@ -124,8 +124,7 @@ struct AnchorData : public QSimplexVariable { : QSimplexVariable(), from(0), to(0), minSize(0), prefSize(0), maxSize(0), sizeAtMinimum(0), sizeAtPreferred(0), - sizeAtMaximum(0), item(0), - graphicsAnchor(0), skipInPreferred(0), + sizeAtMaximum(0), item(0), graphicsAnchor(0), type(Normal), isLayoutAnchor(false), isCenterAnchor(false), orientation(0), dependency(Independent) {} @@ -169,7 +168,6 @@ struct AnchorData : public QSimplexVariable { QGraphicsLayoutItem *item; QGraphicsAnchor *graphicsAnchor; - uint skipInPreferred : 1; uint type : 2; // either Normal, Sequential or Parallel uint isLayoutAnchor : 1; // if this anchor is an internal layout anchor uint isCenterAnchor : 1; diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 3f6dff2e4a..94a37a01bb 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -52,7 +52,7 @@ painting implementation and item interaction through its event handlers. QGraphicsItem is part of \l{The Graphics View Framework} - \img graphicsview-items.png + \image graphicsview-items.png For convenience, Qt provides a set of standard graphics items for the most common shapes. These are: @@ -378,14 +378,14 @@ it's parent if it's z-value is negative. This flag enables setZValue() to toggle ItemStacksBehindParent. - \value ItemIsPanel. The item is a panel. A panel provides activation and + \value ItemIsPanel The item is a panel. A panel provides activation and contained focus handling. Only one panel can be active at a time (see QGraphicsItem::isActive()). When no panel is active, QGraphicsScene activates all non-panel items. Window items (i.e., QGraphicsItem::isWindow() returns true) are panels. This flag was introduced in Qt 4.6. - \omitvalue ItemIsFocusScope Internal only (for now). + \omitvalue ItemIsFocusScope \omit Internal only (for now). \endomit \value ItemSendsScenePositionChanges The item enables itemChange() notifications for ItemScenePositionHasChanged. For performance reasons, @@ -1240,7 +1240,7 @@ void QGraphicsItemPrivate::initStyleOption(QStyleOptionGraphicsItem *option, con const QTransform reverseMap = worldTransform.inverted(); const QVector<QRect> exposedRects(exposedRegion.rects()); for (int i = 0; i < exposedRects.size(); ++i) { - option->exposedRect |= reverseMap.mapRect(exposedRects.at(i)); + option->exposedRect |= reverseMap.mapRect(QRectF(exposedRects.at(i))); if (option->exposedRect.contains(brect)) break; } diff --git a/src/gui/graphicsview/qgraphicsitemanimation.cpp b/src/gui/graphicsview/qgraphicsitemanimation.cpp index be2f300fbb..b67ee2edc9 100644 --- a/src/gui/graphicsview/qgraphicsitemanimation.cpp +++ b/src/gui/graphicsview/qgraphicsitemanimation.cpp @@ -45,6 +45,7 @@ support for QGraphicsItem. \since 4.2 \ingroup graphicsview-api + \deprecated The QGraphicsItemAnimation class animates a QGraphicsItem. You can schedule changes to the item's transformation matrix at diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 5b0643d3eb..10d251dcb7 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -2556,11 +2556,9 @@ void QGraphicsScene::addItem(QGraphicsItem *item) item->d_ptr->resolveFont(d->font.resolve()); item->d_ptr->resolvePalette(d->palette.resolve()); - if (!item->d_ptr->explicitlyHidden) { - if (d->unpolishedItems.isEmpty()) - QMetaObject::invokeMethod(this, "_q_polishItems", Qt::QueuedConnection); - d->unpolishedItems.insert(item); - } + if (d->unpolishedItems.isEmpty()) + QMetaObject::invokeMethod(this, "_q_polishItems", Qt::QueuedConnection); + d->unpolishedItems.insert(item); // Reenable selectionChanged() for individual items --d->selectionChanging; @@ -4422,9 +4420,12 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte bool allowPartialCacheExposure = !viewRect.contains(deviceRect); #else // Only if deviceRect is 20% taller or wider than the desktop. - QRect desktopRect = QApplication::desktop()->availableGeometry(widget); - bool allowPartialCacheExposure = (desktopRect.width() * 1.2 < deviceRect.width() - || desktopRect.height() * 1.2 < deviceRect.height()); + bool allowPartialCacheExposure = false; + if (widget) { + QRect desktopRect = QApplication::desktop()->availableGeometry(widget); + allowPartialCacheExposure = (desktopRect.width() * 1.2 < deviceRect.width() + || desktopRect.height() * 1.2 < deviceRect.height()); + } #endif QRegion scrollExposure; if (deviceData->cacheIndent != QPoint() || allowPartialCacheExposure) { diff --git a/src/gui/graphicsview/qgraphicssceneindex.cpp b/src/gui/graphicsview/qgraphicssceneindex.cpp index f0404fdb1f..70ecd4999a 100644 --- a/src/gui/graphicsview/qgraphicssceneindex.cpp +++ b/src/gui/graphicsview/qgraphicssceneindex.cpp @@ -354,8 +354,8 @@ void QGraphicsSceneIndexPrivate::init() if (!scene) return; - QObject::connect(scene, SIGNAL(sceneRectChanged(const QRectF&)), - q_func(), SLOT(updateSceneRect(const QRectF&))); + QObject::connect(scene, SIGNAL(sceneRectChanged(QRectF)), + q_func(), SLOT(updateSceneRect(QRectF))); } /*! diff --git a/src/gui/graphicsview/qgraphicsview_p.h b/src/gui/graphicsview/qgraphicsview_p.h index 762cad19e3..cd161ada3e 100644 --- a/src/gui/graphicsview/qgraphicsview_p.h +++ b/src/gui/graphicsview/qgraphicsview_p.h @@ -172,10 +172,17 @@ public: inline void dispatchPendingUpdateRequests() { +#ifndef Q_WS_MAC + // QWidget::update() works slightly different on the Mac; it's not part of + // our backing store so it needs special threatment. if (qt_widget_private(viewport)->paintOnScreen()) QCoreApplication::sendPostedEvents(viewport, QEvent::UpdateRequest); else QCoreApplication::sendPostedEvents(viewport->window(), QEvent::UpdateRequest); +#else + QCoreApplication::processEvents(QEventLoop::AllEvents | QEventLoop::ExcludeSocketNotifiers + | QEventLoop::ExcludeUserInputEvents); +#endif } bool updateRect(const QRect &rect); diff --git a/src/gui/gui.pro b/src/gui/gui.pro index 7c24002c71..4215f9755c 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -54,4 +54,4 @@ DEFINES += Q_INTERNAL_QAPP_SRC symbian:TARGET.UID3=0x2001B2DD # ro-section in gui can exceed default allocated space, so more rw-section little further -symbian-sbsv2: MMP_RULES += "LINKEROPTION armcc --rw-base 0x800000" +symbian-sbsv2: QMAKE_LFLAGS.ARMCC += --rw-base 0x800000" diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp index 15af7a2e4b..ad9bdd0d4e 100644 --- a/src/gui/image/qiconloader.cpp +++ b/src/gui/image/qiconloader.cpp @@ -249,21 +249,19 @@ QThemeIconEntries QIconLoader::findIconHelper(const QString &themeName, const QIconDirInfo &dirInfo = subDirs.at(i); QString subdir = dirInfo.path; QDir currentDir(contentDir + subdir); - - if (dirInfo.type == QIconDirInfo::Scalable && m_supportsSvg && - currentDir.exists(iconName + svgext)) { - ScalableEntry *iconEntry = new ScalableEntry; - iconEntry->dir = dirInfo; - iconEntry->filename = currentDir.filePath(iconName + svgext); - entries.append(iconEntry); - - } else if (currentDir.exists(iconName + pngext)) { + if (currentDir.exists(iconName + pngext)) { PixmapEntry *iconEntry = new PixmapEntry; iconEntry->dir = dirInfo; iconEntry->filename = currentDir.filePath(iconName + pngext); // Notice we ensure that pixmap entries allways come before // scalable to preserve search order afterwards entries.prepend(iconEntry); + } else if (m_supportsSvg && + currentDir.exists(iconName + svgext)) { + ScalableEntry *iconEntry = new ScalableEntry; + iconEntry->dir = dirInfo; + iconEntry->filename = currentDir.filePath(iconName + svgext); + entries.append(iconEntry); } } @@ -444,10 +442,8 @@ QIconLoaderEngineEntry *QIconLoaderEngine::entryForSize(const QSize &size) /* * Returns the actual icon size. For scalable svg's this is equivalent - * to the requested size. Otherwise the closest match is returned. - * - * todo: the spec is a bit fuzzy in this area, but we should probably - * allow scaling down pixmap icons as well. + * to the requested size. Otherwise the closest match is returned but + * we can never return a bigger size than the requested size. * */ QSize QIconLoaderEngine::actualSize(const QSize &size, QIcon::Mode mode, @@ -460,8 +456,10 @@ QSize QIconLoaderEngine::actualSize(const QSize &size, QIcon::Mode mode, const QIconDirInfo &dir = entry->dir; if (dir.type == QIconDirInfo::Scalable) return size; - else - return QSize(dir.size, dir.size); + else { + int result = qMin<int>(dir.size, qMin(size.width(), size.height())); + return QSize(result, result); + } } return QIconEngineV2::actualSize(size, mode, state); } diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp index e4ea2e9cad..3b43ab6043 100644 --- a/src/gui/image/qnativeimage.cpp +++ b/src/gui/image/qnativeimage.cpp @@ -178,6 +178,8 @@ QNativeImage::QNativeImage(int width, int height, QImage::Format format,bool /* if (ok) { xshmimg->data = (char*)shmat(xshminfo.shmid, 0, 0); xshminfo.shmaddr = xshmimg->data; + if (shmctl(xshminfo.shmid, IPC_RMID, 0) == -1) + qWarning() << "Error while marking the shared memory segment to be destroyed"; ok = (xshminfo.shmaddr != (char*)-1); if (ok) image = QImage((uchar *)xshmimg->data, width, height, systemFormat()); diff --git a/src/gui/image/qpixmap_mac.cpp b/src/gui/image/qpixmap_mac.cpp index 6175931f80..365c2715e9 100644 --- a/src/gui/image/qpixmap_mac.cpp +++ b/src/gui/image/qpixmap_mac.cpp @@ -160,8 +160,8 @@ QSet<QMacPixmapData*> QMacPixmapData::validDataPointers; QMacPixmapData::QMacPixmapData(PixelType type) : QPixmapData(type, MacClass), has_alpha(0), has_mask(0), - uninit(true), pixels(0), pixelsToFree(0), bytesPerRow(0), - cg_data(0), cg_dataBeingReleased(0), cg_mask(0), + uninit(true), pixels(0), pixelsSize(0), pixelsToFree(0), + bytesPerRow(0), cg_data(0), cg_dataBeingReleased(0), cg_mask(0), pengine(0) { } @@ -637,8 +637,9 @@ void QMacPixmapData::macCreatePixels() } if (pixels) - memcpy(base_pixels, pixels, numBytes); + memcpy(base_pixels, pixels, pixelsSize); pixels = base_pixels; + pixelsSize = numBytes; } #if 0 diff --git a/src/gui/image/qpixmap_mac_p.h b/src/gui/image/qpixmap_mac_p.h index a3fb95f847..45ab8e2141 100644 --- a/src/gui/image/qpixmap_mac_p.h +++ b/src/gui/image/qpixmap_mac_p.h @@ -107,6 +107,7 @@ private: pixelsToFree later on instead of malloc'ing memory. */ quint32 *pixels; + uint pixelsSize; quint32 *pixelsToFree; uint bytesPerRow; QRectF cg_mask_rect; diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp index 17baa50dcf..dc33adedc4 100644 --- a/src/gui/image/qpixmap_s60.cpp +++ b/src/gui/image/qpixmap_s60.cpp @@ -977,4 +977,9 @@ void QS60PixmapData::fromNativeType(void* pixmap, NativeType nativeType) } } +QPixmapData *QS60PixmapData::createCompatiblePixmapData() const +{ + return new QS60PixmapData(pixelType()); +} + QT_END_NAMESPACE diff --git a/src/gui/image/qpixmap_s60_p.h b/src/gui/image/qpixmap_s60_p.h index b1b58248d6..8631ebd29d 100644 --- a/src/gui/image/qpixmap_s60_p.h +++ b/src/gui/image/qpixmap_s60_p.h @@ -87,6 +87,8 @@ public: QS60PixmapData(PixelType type); ~QS60PixmapData(); + QPixmapData *createCompatiblePixmapData() const; + void resize(int width, int height); void fromImage(const QImage &image, Qt::ImageConversionFlags flags); void copy(const QPixmapData *data, const QRect &rect); diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp index 23bef12004..ad15655b9c 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -96,6 +96,7 @@ QAbstractItemViewPrivate::QAbstractItemViewPrivate() autoScrollMargin(16), autoScrollCount(0), shouldScrollToCurrentOnShow(false), + shouldClearStatusTip(false), alternatingColors(false), textElideMode(Qt::ElideRight), verticalScrollMode(QAbstractItemView::ScrollPerItem), @@ -138,10 +139,22 @@ void QAbstractItemViewPrivate::init() #endif } +void QAbstractItemViewPrivate::setHoverIndex(const QPersistentModelIndex &index) +{ + Q_Q(QAbstractItemView); + if (hover == index) + return; + + q->update(hover); //update the old one + hover = index; + q->update(hover); //update the new one +} + void QAbstractItemViewPrivate::checkMouseMove(const QPersistentModelIndex &index) { //we take a persistent model index because the model might change by emitting signals Q_Q(QAbstractItemView); + setHoverIndex(index); if (viewportEnteredNeeded || enteredIndex != index) { viewportEnteredNeeded = false; @@ -149,14 +162,15 @@ void QAbstractItemViewPrivate::checkMouseMove(const QPersistentModelIndex &index emit q->entered(index); #ifndef QT_NO_STATUSTIP QString statustip = model->data(index, Qt::StatusTipRole).toString(); - if (parent && !statustip.isEmpty()) { + if (parent && (shouldClearStatusTip || !statustip.isEmpty())) { QStatusTipEvent tip(statustip); QApplication::sendEvent(parent, &tip); + shouldClearStatusTip = !statustip.isEmpty(); } #endif } else { #ifndef QT_NO_STATUSTIP - if (parent) { + if (parent && shouldClearStatusTip) { QString emptyString; QStatusTipEvent tip( emptyString ); QApplication::sendEvent(parent, &tip); @@ -1536,26 +1550,25 @@ bool QAbstractItemView::viewportEvent(QEvent *event) { Q_D(QAbstractItemView); switch (event->type()) { - case QEvent::HoverEnter: { - QHoverEvent *he = static_cast<QHoverEvent*>(event); - d->hover = indexAt(he->pos()); - update(d->hover); - break; } - case QEvent::HoverLeave: { - update(d->hover); // update old - d->hover = QModelIndex(); - break; } - case QEvent::HoverMove: { - QHoverEvent *he = static_cast<QHoverEvent*>(event); - QModelIndex old = d->hover; - d->hover = indexAt(he->pos()); - if (d->hover != old) - d->viewport->update(visualRect(old)|visualRect(d->hover)); - break; } + case QEvent::HoverMove: + case QEvent::HoverEnter: + d->setHoverIndex(indexAt(static_cast<QHoverEvent*>(event)->pos())); + break; + case QEvent::HoverLeave: + d->setHoverIndex(QModelIndex()); + break; case QEvent::Enter: d->viewportEnteredNeeded = true; break; case QEvent::Leave: + #ifndef QT_NO_STATUSTIP + if (d->shouldClearStatusTip && d->parent) { + QString empty; + QStatusTipEvent tip(empty); + QApplication::sendEvent(d->parent, &tip); + d->shouldClearStatusTip = false; + } + #endif d->enteredIndex = QModelIndex(); break; case QEvent::ToolTip: diff --git a/src/gui/itemviews/qabstractitemview_p.h b/src/gui/itemviews/qabstractitemview_p.h index c691f61f9c..0b5cfbee16 100644 --- a/src/gui/itemviews/qabstractitemview_p.h +++ b/src/gui/itemviews/qabstractitemview_p.h @@ -152,6 +152,8 @@ public: const QEvent *event) const; virtual void selectAll(QItemSelectionModel::SelectionFlags command); + void setHoverIndex(const QPersistentModelIndex &index); + void checkMouseMove(const QPersistentModelIndex &index); inline void checkMouseMove(const QPoint &pos) { checkMouseMove(q_func()->indexAt(pos)); } @@ -394,6 +396,7 @@ public: int autoScrollMargin; int autoScrollCount; bool shouldScrollToCurrentOnShow; //used to know if we should scroll to current on show event + bool shouldClearStatusTip; //if there is a statustip currently shown that need to be cleared when leaving. bool alternatingColors; diff --git a/src/gui/itemviews/qcolumnview.cpp b/src/gui/itemviews/qcolumnview.cpp index d27d0614f7..da3e5a0b8e 100644 --- a/src/gui/itemviews/qcolumnview.cpp +++ b/src/gui/itemviews/qcolumnview.cpp @@ -672,8 +672,8 @@ QAbstractItemView *QColumnViewPrivate::createColumn(const QModelIndex &index, bo QAbstractItemView *view = 0; if (model->hasChildren(index)) { view = q->createColumn(index); - q->connect(view, SIGNAL(clicked(const QModelIndex &)), - q, SLOT(_q_clicked(const QModelIndex &))); + q->connect(view, SIGNAL(clicked(QModelIndex)), + q, SLOT(_q_clicked(QModelIndex))); } else { if (!previewColumn) setPreviewWidget(new QWidget(q)); @@ -681,16 +681,16 @@ QAbstractItemView *QColumnViewPrivate::createColumn(const QModelIndex &index, bo view->setMinimumWidth(qMax(view->minimumWidth(), previewWidget->minimumWidth())); } - q->connect(view, SIGNAL(activated(const QModelIndex &)), - q, SIGNAL(activated(const QModelIndex &))); - q->connect(view, SIGNAL(clicked(const QModelIndex &)), - q, SIGNAL(clicked(const QModelIndex &))); - q->connect(view, SIGNAL(doubleClicked(const QModelIndex &)), - q, SIGNAL(doubleClicked(const QModelIndex &))); - q->connect(view, SIGNAL(entered(const QModelIndex &)), - q, SIGNAL(entered(const QModelIndex &))); - q->connect(view, SIGNAL(pressed(const QModelIndex &)), - q, SIGNAL(pressed(const QModelIndex &))); + q->connect(view, SIGNAL(activated(QModelIndex)), + q, SIGNAL(activated(QModelIndex))); + q->connect(view, SIGNAL(clicked(QModelIndex)), + q, SIGNAL(clicked(QModelIndex))); + q->connect(view, SIGNAL(doubleClicked(QModelIndex)), + q, SIGNAL(doubleClicked(QModelIndex))); + q->connect(view, SIGNAL(entered(QModelIndex)), + q, SIGNAL(entered(QModelIndex))); + q->connect(view, SIGNAL(pressed(QModelIndex)), + q, SIGNAL(pressed(QModelIndex))); view->setFocusPolicy(Qt::NoFocus); view->setParent(viewport); diff --git a/src/gui/itemviews/qheaderview.cpp b/src/gui/itemviews/qheaderview.cpp index 6f2cff976c..6f0fba6a23 100644 --- a/src/gui/itemviews/qheaderview.cpp +++ b/src/gui/itemviews/qheaderview.cpp @@ -1913,7 +1913,6 @@ void QHeaderView::initializeSections(int start, int end) Q_ASSERT(start >= 0); Q_ASSERT(end >= 0); - d->executePostedLayout(); d->invalidateCachedSizeHint(); if (end + 1 < d->sectionCount) { @@ -1939,11 +1938,25 @@ void QHeaderView::initializeSections(int start, int end) d->sectionCount = end + 1; if (!d->logicalIndices.isEmpty()) { - d->logicalIndices.resize(d->sectionCount); - d->visualIndices.resize(d->sectionCount); - for (int i = start; i < d->sectionCount; ++i){ - d->logicalIndices[i] = i; - d->visualIndices[i] = i; + if (oldCount <= d->sectionCount) { + d->logicalIndices.resize(d->sectionCount); + d->visualIndices.resize(d->sectionCount); + for (int i = oldCount; i < d->sectionCount; ++i) { + d->logicalIndices[i] = i; + d->visualIndices[i] = i; + } + } else { + int j = 0; + for (int i = 0; i < oldCount; ++i) { + int v = d->logicalIndices.at(i); + if (v < d->sectionCount) { + d->logicalIndices[j] = v; + d->visualIndices[v] = j; + j++; + } + } + d->logicalIndices.resize(d->sectionCount); + d->visualIndices.resize(d->sectionCount); } } @@ -2396,7 +2409,12 @@ bool QHeaderView::viewportEvent(QEvent *e) d->state = QHeaderViewPrivate::NoState; d->pressed = d->section = d->target = -1; d->updateSectionIndicator(d->section, -1); - } + break; } + case QEvent::Wheel: { + QAbstractScrollArea *asa = qobject_cast<QAbstractScrollArea *>(parentWidget()); + if (asa) + return QApplication::sendEvent(asa->viewport(), e); + break; } default: break; } diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp index c6622cbf6e..d03cdd357c 100644 --- a/src/gui/itemviews/qlistview.cpp +++ b/src/gui/itemviews/qlistview.cpp @@ -773,7 +773,7 @@ void QListView::rowsAboutToBeRemoved(const QModelIndex &parent, int start, int e void QListView::mouseMoveEvent(QMouseEvent *e) { if (!isVisible()) - return; + return; Q_D(QListView); QAbstractItemView::mouseMoveEvent(e); if (state() == DragSelectingState @@ -832,16 +832,16 @@ void QListView::resizeEvent(QResizeEvent *e) return; bool listWrap = (d->viewMode == ListMode) && d->wrapItemText; - bool flowDimensionChanged = (d->flow == LeftToRight && delta.width() != 0) - || (d->flow == TopToBottom && delta.height() != 0); + bool flowDimensionChanged = (d->flow == LeftToRight && delta.width() != 0) + || (d->flow == TopToBottom && delta.height() != 0); // We post a delayed relayout in the following cases : // - we're wrapping // - the state is NoState, we're adjusting and the size has changed in the flowing direction - if (listWrap + if (listWrap || (state() == NoState && d->resizeMode == Adjust && flowDimensionChanged)) { - d->doDelayedItemsLayout(100); // wait 1/10 sec before starting the layout - } else { + d->doDelayedItemsLayout(100); // wait 1/10 sec before starting the layout + } else { QAbstractItemView::resizeEvent(e); } } @@ -966,15 +966,19 @@ void QListView::paintEvent(QPaintEvent *e) bool alternateBase = false; int previousRow = -2; // trigger the alternateBase adjustment on first pass + int maxSize = (flow() == TopToBottom) + ? qMax(viewport()->size().width(), d->contentsSize().width()) - 2 * d->spacing() + : qMax(viewport()->size().height(), d->contentsSize().height()) - 2 * d->spacing(); + QVector<QModelIndex>::const_iterator end = toBeRendered.constEnd(); for (QVector<QModelIndex>::const_iterator it = toBeRendered.constBegin(); it != end; ++it) { Q_ASSERT((*it).isValid()); option.rect = visualRect(*it); if (flow() == TopToBottom) - option.rect.setWidth(qMin(d->contentsSize().width() - 2 * d->spacing(), option.rect.width())); + option.rect.setWidth(qMin(maxSize, option.rect.width())); else - option.rect.setHeight(qMin(d->contentsSize().height() - 2 * d->spacing(), option.rect.height())); + option.rect.setHeight(qMin(maxSize, option.rect.height())); option.state = state; if (selections && selections->isSelected(*it)) @@ -1147,7 +1151,9 @@ QModelIndex QListView::moveCursor(CursorAction cursorAction, Qt::KeyboardModifie } return d->closestIndex(initialRect, intersectVector); case MovePageUp: - rect.moveTop(rect.top() - d->viewport->height()); + // move current by (visibileRowCount - 1) items. + // rect.translate(0, -rect.height()); will happen in the switch fallthrough for MoveUp. + rect.moveTop(rect.top() - d->viewport->height() + 2 * rect.height()); if (rect.top() < rect.height()) rect.moveTop(rect.height()); case MovePrevious: @@ -1173,7 +1179,9 @@ QModelIndex QListView::moveCursor(CursorAction cursorAction, Qt::KeyboardModifie } return d->closestIndex(initialRect, intersectVector); case MovePageDown: - rect.moveTop(rect.top() + d->viewport->height()); + // move current by (visibileRowCount - 1) items. + // rect.translate(0, rect.height()); will happen in the switch fallthrough for MoveDown. + rect.moveTop(rect.top() + d->viewport->height() - 2 * rect.height()); if (rect.bottom() > contents.height() - rect.height()) rect.moveBottom(contents.height() - rect.height()); case MoveNext: @@ -1445,7 +1453,7 @@ void QListView::doItemsLayout() // so we set the state to expanding to avoid // triggering another layout QAbstractItemView::State oldState = state(); - setState(ExpandingState); + setState(ExpandingState); if (d->model->columnCount(d->root) > 0) { // no columns means no contents d->resetBatchStartRow(); if (layoutMode() == SinglePass) diff --git a/src/gui/itemviews/qtableview.cpp b/src/gui/itemviews/qtableview.cpp index 02e5fffc6d..d27e693caf 100644 --- a/src/gui/itemviews/qtableview.cpp +++ b/src/gui/itemviews/qtableview.cpp @@ -114,7 +114,7 @@ void QSpanCollection::updateSpan(QSpanCollection::Span *span, int old_height) } } else if (old_height > span->height()) { //remove the span from all the subspans lists that intersect the columns not covered anymore - Index::iterator it_y = index.lowerBound(-span->bottom()); + Index::iterator it_y = index.lowerBound(qMin(-span->bottom(), 0)); Q_ASSERT(it_y != index.end()); //it_y must exist since the span is in the list while (-it_y.key() <= span->top() + old_height -1) { if (-it_y.key() > span->bottom()) { @@ -1064,14 +1064,29 @@ QTableView::~QTableView() void QTableView::setModel(QAbstractItemModel *model) { Q_D(QTableView); - connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)), - this, SLOT(_q_updateSpanInsertedRows(QModelIndex,int,int))); - connect(model, SIGNAL(columnsInserted(QModelIndex,int,int)), - this, SLOT(_q_updateSpanInsertedColumns(QModelIndex,int,int))); - connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)), - this, SLOT(_q_updateSpanRemovedRows(QModelIndex,int,int))); - connect(model, SIGNAL(columnsRemoved(QModelIndex,int,int)), - this, SLOT(_q_updateSpanRemovedColumns(QModelIndex,int,int))); + if (model == d->model) + return; + //let's disconnect from the old model + if (d->model && d->model != QAbstractItemModelPrivate::staticEmptyModel()) { + disconnect(d->model, SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(_q_updateSpanInsertedRows(QModelIndex,int,int))); + disconnect(d->model, SIGNAL(columnsInserted(QModelIndex,int,int)), + this, SLOT(_q_updateSpanInsertedColumns(QModelIndex,int,int))); + disconnect(d->model, SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(_q_updateSpanRemovedRows(QModelIndex,int,int))); + disconnect(d->model, SIGNAL(columnsRemoved(QModelIndex,int,int)), + this, SLOT(_q_updateSpanRemovedColumns(QModelIndex,int,int))); + } + if (model) { //and connect to the new one + connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(_q_updateSpanInsertedRows(QModelIndex,int,int))); + connect(model, SIGNAL(columnsInserted(QModelIndex,int,int)), + this, SLOT(_q_updateSpanInsertedColumns(QModelIndex,int,int))); + connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(_q_updateSpanRemovedRows(QModelIndex,int,int))); + connect(model, SIGNAL(columnsRemoved(QModelIndex,int,int)), + this, SLOT(_q_updateSpanRemovedColumns(QModelIndex,int,int))); + } d->verticalHeader->setModel(model); d->horizontalHeader->setModel(model); QAbstractItemView::setModel(model); diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp index a3cbc0d337..3ad9fbb67d 100644 --- a/src/gui/itemviews/qtreeview.cpp +++ b/src/gui/itemviews/qtreeview.cpp @@ -215,6 +215,13 @@ void QTreeView::setModel(QAbstractItemModel *model) Q_D(QTreeView); if (model == d->model) return; + if (d->model && d->model != QAbstractItemModelPrivate::staticEmptyModel()) { + disconnect(d->model, SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(rowsRemoved(QModelIndex,int,int))); + + disconnect(d->model, SIGNAL(modelAboutToBeReset()), this, SLOT(_q_modelAboutToBeReset())); + } + if (d->selectionModel) { // support row editing disconnect(d->selectionModel, SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), d->model, SLOT(submit())); @@ -838,10 +845,10 @@ void QTreeView::setSortingEnabled(bool enable) // because otherwise it will not call sort on the model. sortByColumn(header()->sortIndicatorSection(), header()->sortIndicatorOrder()); connect(header(), SIGNAL(sortIndicatorChanged(int,Qt::SortOrder)), - this, SLOT(_q_sortIndicatorChanged(int, Qt::SortOrder)), Qt::UniqueConnection); + this, SLOT(_q_sortIndicatorChanged(int,Qt::SortOrder)), Qt::UniqueConnection); } else { disconnect(header(), SIGNAL(sortIndicatorChanged(int,Qt::SortOrder)), - this, SLOT(_q_sortIndicatorChanged(int, Qt::SortOrder))); + this, SLOT(_q_sortIndicatorChanged(int,Qt::SortOrder))); } d->sortingEnabled = enable; } diff --git a/src/gui/itemviews/qtreewidget.cpp b/src/gui/itemviews/qtreewidget.cpp index c133ae4865..948ca79af1 100644 --- a/src/gui/itemviews/qtreewidget.cpp +++ b/src/gui/itemviews/qtreewidget.cpp @@ -1580,7 +1580,7 @@ void QTreeWidgetItem::setChildIndicatorPolicy(QTreeWidgetItem::ChildIndicatorPol if (!view) return; - view->viewport()->update( view->d_func()->itemDecorationRect(view->d_func()->index(this))); + view->scheduleDelayedItemsLayout(); } /*! diff --git a/src/gui/kernel/kernel.pri b/src/gui/kernel/kernel.pri index 8859358d06..7d0e5c7037 100644 --- a/src/gui/kernel/kernel.pri +++ b/src/gui/kernel/kernel.pri @@ -188,9 +188,8 @@ embedded { HEADERS += \ kernel/qeventdispatcher_glib_qws_p.h QMAKE_CXXFLAGS += $$QT_CFLAGS_GLIB + LIBS_PRIVATE +=$$QT_LIBS_GLIB } - - } !embedded:!x11:mac { diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 4b8f6a06ed..9f4cd0c512 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -933,7 +933,8 @@ void QApplicationPrivate::initialize() QApplicationPrivate::wheel_scroll_lines = 3; #endif - initializeMultitouch(); + if (qt_is_gui_used) + initializeMultitouch(); } /*! @@ -4105,8 +4106,17 @@ bool QApplication::notify(QObject *receiver, QEvent *e) } else if (widget->isWindow() || widget->testAttribute(Qt::WA_NoMousePropagation)) { break; } + QPoint offset = widget->pos(); widget = widget->parentWidget(); - d->updateTouchPointsForWidget(widget, touchEvent); + touchEvent->setWidget(widget); + for (int i = 0; i < touchEvent->_touchPoints.size(); ++i) { + QTouchEvent::TouchPoint &pt = touchEvent->_touchPoints[i]; + QRectF rect = pt.rect(); + rect.moveCenter(offset); + pt.d->rect = rect; + pt.d->startPos = pt.startPos() + offset; + pt.d->lastPos = pt.lastPos() + offset; + } } touchEvent->setAccepted(eventAccepted); @@ -5417,9 +5427,11 @@ void QApplicationPrivate::updateTouchPointsForWidget(QWidget *widget, QTouchEven const QPointF delta = screenPos - screenPos.toPoint(); rect.moveCenter(widget->mapFromGlobal(screenPos.toPoint()) + delta); - touchPoint.setRect(rect); - touchPoint.setStartPos(widget->mapFromGlobal(touchPoint.startScreenPos().toPoint()) + delta); - touchPoint.setLastPos(widget->mapFromGlobal(touchPoint.lastScreenPos().toPoint()) + delta); + touchPoint.d->rect = rect; + if (touchPoint.state() == Qt::TouchPointPressed) { + touchPoint.d->startPos = widget->mapFromGlobal(touchPoint.startScreenPos().toPoint()) + delta; + touchPoint.d->lastPos = widget->mapFromGlobal(touchPoint.lastScreenPos().toPoint()) + delta; + } } } @@ -5463,16 +5475,20 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window, for (int i = 0; i < touchPoints.count(); ++i) { QTouchEvent::TouchPoint touchPoint = touchPoints.at(i); + // explicitly detach from the original touch point that we got, so even + // if the touchpoint structs are reused, we will make a copy that we'll + // deliver to the user (which might want to store the struct for later use). + touchPoint.d = touchPoint.d->detach(); // update state - QWidget *widget = 0; + QWeakPointer<QWidget> widget; switch (touchPoint.state()) { case Qt::TouchPointPressed: { if (deviceType == QTouchEvent::TouchPad) { // on touch-pads, send all touch points to the same widget widget = d->widgetForTouchPointId.isEmpty() - ? 0 + ? QWeakPointer<QWidget>() : d->widgetForTouchPointId.constBegin().value(); } @@ -5489,20 +5505,21 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window, if (deviceType == QTouchEvent::TouchScreen) { int closestTouchPointId = d->findClosestTouchPointId(touchPoint.screenPos()); - QWidget *closestWidget = d->widgetForTouchPointId.value(closestTouchPointId); + QWidget *closestWidget = d->widgetForTouchPointId.value(closestTouchPointId).data(); if (closestWidget - && (widget->isAncestorOf(closestWidget) || closestWidget->isAncestorOf(widget))) { + && (widget.data()->isAncestorOf(closestWidget) || closestWidget->isAncestorOf(widget.data()))) { widget = closestWidget; } } d->widgetForTouchPointId[touchPoint.id()] = widget; - touchPoint.setStartScreenPos(touchPoint.screenPos()); - touchPoint.setLastScreenPos(touchPoint.screenPos()); - touchPoint.setStartNormalizedPos(touchPoint.normalizedPos()); - touchPoint.setLastNormalizedPos(touchPoint.normalizedPos()); + touchPoint.d->startScreenPos = touchPoint.screenPos(); + touchPoint.d->lastScreenPos = touchPoint.screenPos(); + touchPoint.d->startNormalizedPos = touchPoint.normalizedPos(); + touchPoint.d->lastNormalizedPos = touchPoint.normalizedPos(); if (touchPoint.pressure() < qreal(0.)) - touchPoint.setPressure(qreal(1.)); + touchPoint.d->pressure = qreal(1.); + d->appCurrentTouchPoints.insert(touchPoint.id(), touchPoint); break; } @@ -5513,12 +5530,14 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window, continue; QTouchEvent::TouchPoint previousTouchPoint = d->appCurrentTouchPoints.take(touchPoint.id()); - touchPoint.setStartScreenPos(previousTouchPoint.startScreenPos()); - touchPoint.setLastScreenPos(previousTouchPoint.screenPos()); - touchPoint.setStartNormalizedPos(previousTouchPoint.startNormalizedPos()); - touchPoint.setLastNormalizedPos(previousTouchPoint.normalizedPos()); + touchPoint.d->startScreenPos = previousTouchPoint.startScreenPos(); + touchPoint.d->lastScreenPos = previousTouchPoint.screenPos(); + touchPoint.d->startPos = previousTouchPoint.startPos(); + touchPoint.d->lastPos = previousTouchPoint.pos(); + touchPoint.d->startNormalizedPos = previousTouchPoint.startNormalizedPos(); + touchPoint.d->lastNormalizedPos = previousTouchPoint.normalizedPos(); if (touchPoint.pressure() < qreal(0.)) - touchPoint.setPressure(qreal(0.)); + touchPoint.d->pressure = qreal(0.); break; } default: @@ -5528,23 +5547,25 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window, Q_ASSERT(d->appCurrentTouchPoints.contains(touchPoint.id())); QTouchEvent::TouchPoint previousTouchPoint = d->appCurrentTouchPoints.value(touchPoint.id()); - touchPoint.setStartScreenPos(previousTouchPoint.startScreenPos()); - touchPoint.setLastScreenPos(previousTouchPoint.screenPos()); - touchPoint.setStartNormalizedPos(previousTouchPoint.startNormalizedPos()); - touchPoint.setLastNormalizedPos(previousTouchPoint.normalizedPos()); + touchPoint.d->startScreenPos = previousTouchPoint.startScreenPos(); + touchPoint.d->lastScreenPos = previousTouchPoint.screenPos(); + touchPoint.d->startPos = previousTouchPoint.startPos(); + touchPoint.d->lastPos = previousTouchPoint.pos(); + touchPoint.d->startNormalizedPos = previousTouchPoint.startNormalizedPos(); + touchPoint.d->lastNormalizedPos = previousTouchPoint.normalizedPos(); if (touchPoint.pressure() < qreal(0.)) - touchPoint.setPressure(qreal(1.)); + touchPoint.d->pressure = qreal(1.); d->appCurrentTouchPoints[touchPoint.id()] = touchPoint; break; } - Q_ASSERT(widget != 0); + Q_ASSERT(widget.data() != 0); // make the *scene* functions return the same as the *screen* functions - touchPoint.setSceneRect(touchPoint.screenRect()); - touchPoint.setStartScenePos(touchPoint.startScreenPos()); - touchPoint.setLastScenePos(touchPoint.lastScreenPos()); + touchPoint.d->sceneRect = touchPoint.screenRect(); + touchPoint.d->startScenePos = touchPoint.startScreenPos(); + touchPoint.d->lastScenePos = touchPoint.lastScreenPos(); - StatesAndTouchPoints &maskAndPoints = widgetsNeedingEvents[widget]; + StatesAndTouchPoints &maskAndPoints = widgetsNeedingEvents[widget.data()]; maskAndPoints.first |= touchPoint.state(); if (touchPoint.isPrimary()) maskAndPoints.first |= Qt::TouchPointPrimary; diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm index 84da56e5b9..22a0959305 100644 --- a/src/gui/kernel/qapplication_mac.mm +++ b/src/gui/kernel/qapplication_mac.mm @@ -2449,7 +2449,7 @@ OSStatus QApplicationPrivate::globalAppleEventProcessor(const AppleEvent *ae, Ap switch(aeID) { case kAEQuitApplication: { extern bool qt_mac_quit_menu_item_enabled; // qmenu_mac.cpp - if(!QApplicationPrivate::modalState() && qt_mac_quit_menu_item_enabled) { + if (qt_mac_quit_menu_item_enabled) { QCloseEvent ev; QApplication::sendSpontaneousEvent(app, &ev); if(ev.isAccepted()) { diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h index 992e4beae5..14d7215008 100644 --- a/src/gui/kernel/qapplication_p.h +++ b/src/gui/kernel/qapplication_p.h @@ -511,7 +511,7 @@ public: QWidget *gestureWidget; - QMap<int, QWidget *> widgetForTouchPointId; + QMap<int, QWeakPointer<QWidget> > widgetForTouchPointId; QMap<int, QTouchEvent::TouchPoint> appCurrentTouchPoints; static void updateTouchPointsForWidget(QWidget *widget, QTouchEvent *touchEvent); void initializeMultitouch(); diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index c7f0c00a6b..fb2bc72c7b 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -712,7 +712,7 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod Qt::KeyboardModifiers mods = mapToQtModifiers(keyEvent.iModifiers); QKeyEventEx qKeyEvent(type == EEventKeyUp ? QEvent::KeyRelease : QEvent::KeyPress, keyCode, mods, qt_keymapper_private()->translateKeyEvent(keyCode, mods), - false, 1, keyEvent.iScanCode, s60Keysym, keyEvent.iModifiers); + (keyEvent.iRepeats != 0), 1, keyEvent.iScanCode, s60Keysym, keyEvent.iModifiers); // WId wid = reinterpret_cast<RWindowGroup *>(keyEvent.Handle())->Child(); // if (!wid) // Could happen if window isn't shown yet. @@ -908,6 +908,8 @@ void QSymbianControl::FocusChanged(TDrawNow /* aDrawNow */) } QApplication::setActiveWindow(qwidget->window()); + qwidget->d_func()->setWindowIcon_sys(true); + qwidget->d_func()->setWindowTitle_sys(qwidget->windowTitle()); #ifdef Q_WS_S60 // If widget is fullscreen, hide status pane and button container // otherwise show them. @@ -945,7 +947,10 @@ void QSymbianControl::HandleResourceChange(int resourceType) TRect r = static_cast<CEikAppUi*>(S60->appUi())->ClientRect(); SetExtent(r.iTl, r.Size()); } - qwidget->d_func()->setWindowIcon_sys(true); + if (IsFocused() && IsVisible()) { + qwidget->d_func()->setWindowIcon_sys(true); + qwidget->d_func()->setWindowTitle_sys(qwidget->windowTitle()); + } break; case KUidValueCoeFontChangeEvent: // font change event diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index 05e75a2cac..b677228471 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -243,8 +243,12 @@ static PtrWTGet ptrWTGet = 0; static PACKET localPacketBuf[QT_TABLET_NPACKETQSIZE]; // our own tablet packet queue. HCTX qt_tablet_context; // the hardware context for the tablet (like a window handle) bool qt_tablet_tilt_support; -static void tabletInit(UINT wActiveCsr, HCTX hTab); + +#ifndef QT_NO_TABLETEVENT +static void tabletInit(const quint64 uniqueId, const UINT csr_type, HCTX hTab); +static void tabletUpdateCursor(QTabletDeviceData &tdd, const UINT currentCursor); static void initWinTabFunctions(); // resolve the WINTAB api functions +#endif // QT_NO_TABLETEVENT #ifndef QT_NO_ACCESSIBILITY @@ -256,7 +260,7 @@ extern QWidget* qt_get_tablet_widget(); extern bool qt_sendSpontaneousEvent(QObject*, QEvent*); extern QRegion qt_dirtyRegion(QWidget *); -typedef QHash<UINT, QTabletDeviceData> QTabletCursorInfo; +typedef QHash<quint64, QTabletDeviceData> QTabletCursorInfo; Q_GLOBAL_STATIC(QTabletCursorInfo, tCursorInfo) QTabletDeviceData currentTabletPointer; @@ -791,7 +795,9 @@ void qt_init(QApplicationPrivate *priv, int) if (QApplication::desktopSettingsAware()) qt_set_windows_resources(); +#ifndef QT_NO_TABLETEVENT initWinTabFunctions(); +#endif // QT_NO_TABLETEVENT QApplicationPrivate::inputContext = new QWinInputContext(0); // Read the initial cleartype settings... @@ -2325,25 +2331,43 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam } break; case WT_PROXIMITY: - if (ptrWTPacketsGet) { - bool enteredProximity = LOWORD(lParam) != 0; - PACKET proximityBuffer[QT_TABLET_NPACKETQSIZE]; - int totalPacks = ptrWTPacketsGet(qt_tablet_context, QT_TABLET_NPACKETQSIZE, proximityBuffer); - if (totalPacks > 0 && enteredProximity) { - uint currentCursor = proximityBuffer[0].pkCursor; - if (!tCursorInfo()->contains(currentCursor)) - tabletInit(currentCursor, qt_tablet_context); - currentTabletPointer = tCursorInfo()->value(currentCursor); + + #ifndef QT_NO_TABLETEVENT + if (ptrWTPacketsGet && ptrWTInfo) { + const bool enteredProximity = LOWORD(lParam) != 0; + PACKET proximityBuffer[1]; // we are only interested in the first packet in this case + const int totalPacks = ptrWTPacketsGet(qt_tablet_context, 1, proximityBuffer); + if (totalPacks > 0) { + const UINT currentCursor = proximityBuffer[0].pkCursor; + + UINT csr_physid; + ptrWTInfo(WTI_CURSORS + currentCursor, CSR_PHYSID, &csr_physid); + UINT csr_type; + ptrWTInfo(WTI_CURSORS + currentCursor, CSR_TYPE, &csr_type); + const UINT deviceIdMask = 0xFF6; // device type mask && device color mask + quint64 uniqueId = (csr_type & deviceIdMask); + uniqueId = (uniqueId << 32) | csr_physid; + + // initialising and updating the cursor should be done in response to + // WT_CSRCHANGE. We do it in WT_PROXIMITY because some wintab never send + // the event WT_CSRCHANGE even if asked with CXO_CSRMESSAGES + const QTabletCursorInfo *const globalCursorInfo = tCursorInfo(); + if (!globalCursorInfo->contains(uniqueId)) + tabletInit(uniqueId, csr_type, qt_tablet_context); + + currentTabletPointer = globalCursorInfo->value(uniqueId); + tabletUpdateCursor(currentTabletPointer, currentCursor); } qt_tabletChokeMouse = false; -#ifndef QT_NO_TABLETEVENT + QTabletEvent tabletProximity(enteredProximity ? QEvent::TabletEnterProximity : QEvent::TabletLeaveProximity, QPoint(), QPoint(), QPointF(), currentTabletPointer.currentDevice, currentTabletPointer.currentPointerType, 0, 0, 0, 0, 0, 0, 0, currentTabletPointer.llId); QApplication::sendEvent(qApp, &tabletProximity); -#endif // QT_NO_TABLETEVENT } + #endif // QT_NO_TABLETEVENT + break; #ifdef Q_WS_WINCE_WM case WM_SETFOCUS: { @@ -3317,63 +3341,57 @@ bool QETWidget::translateWheelEvent(const MSG &msg) // the following is adapted from the wintab syspress example (public domain) /* -------------------------------------------------------------------------- */ -static void tabletInit(UINT wActiveCsr, HCTX hTab) +// Initialize the "static" information of a cursor device (pen, airbrush, etc). +// The QTabletDeviceData is initialized with the data that do not change in time +// (number of button, type of device, etc) but do not initialize the variable data +// (e.g.: pen or eraser) +#ifndef QT_NO_TABLETEVENT + +static void tabletInit(const quint64 uniqueId, const UINT csr_type, HCTX hTab) { + Q_ASSERT(ptrWTInfo); + Q_ASSERT(ptrWTGet); + + Q_ASSERT(!tCursorInfo()->contains(uniqueId)); + /* browse WinTab's many info items to discover pressure handling. */ - if (ptrWTInfo && ptrWTGet) { - AXIS np; - LOGCONTEXT lc; - BYTE wPrsBtn; - BYTE logBtns[32]; - UINT size; - - /* discover the LOGICAL button generated by the pressure channel. */ - /* get the PHYSICAL button from the cursor category and run it */ - /* through that cursor's button map (usually the identity map). */ - wPrsBtn = (BYTE)-1; - ptrWTInfo(WTI_CURSORS + wActiveCsr, CSR_NPBUTTON, &wPrsBtn); - size = ptrWTInfo(WTI_CURSORS + wActiveCsr, CSR_BUTTONMAP, &logBtns); - if ((UINT)wPrsBtn < size) - wPrsBtn = logBtns[wPrsBtn]; - - /* get the current context for its device variable. */ - ptrWTGet(hTab, &lc); - - /* get the size of the pressure axis. */ - QTabletDeviceData tdd; - ptrWTInfo(WTI_DEVICES + lc.lcDevice, DVC_NPRESSURE, &np); - tdd.minPressure = int(np.axMin); - tdd.maxPressure = int(np.axMax); - - ptrWTInfo(WTI_DEVICES + lc.lcDevice, DVC_TPRESSURE, &np); - tdd.minTanPressure = int(np.axMin); - tdd.maxTanPressure = int(np.axMax); - - LOGCONTEXT lcMine; - - /* get default region */ - ptrWTInfo(WTI_DEFCONTEXT, 0, &lcMine); - - tdd.minX = 0; - tdd.maxX = int(lcMine.lcInExtX) - int(lcMine.lcInOrgX); - - tdd.minY = 0; - tdd.maxY = int(lcMine.lcInExtY) - int(lcMine.lcInOrgY); - - tdd.minZ = 0; - tdd.maxZ = int(lcMine.lcInExtZ) - int(lcMine.lcInOrgZ); - - int csr_type, - csr_physid; - ptrWTInfo(WTI_CURSORS + wActiveCsr, CSR_TYPE, &csr_type); - ptrWTInfo(WTI_CURSORS + wActiveCsr, CSR_PHYSID, &csr_physid); - tdd.llId = csr_type & 0x0F06; - tdd.llId = (tdd.llId << 24) | csr_physid; -#ifndef QT_NO_TABLETEVENT - if (((csr_type & 0x0006) == 0x0002) && ((csr_type & 0x0F06) != 0x0902)) { - tdd.currentDevice = QTabletEvent::Stylus; - } else { - switch (csr_type & 0x0F06) { + AXIS np; + LOGCONTEXT lc; + + /* get the current context for its device variable. */ + ptrWTGet(hTab, &lc); + + /* get the size of the pressure axis. */ + QTabletDeviceData tdd; + tdd.llId = uniqueId; + + ptrWTInfo(WTI_DEVICES + lc.lcDevice, DVC_NPRESSURE, &np); + tdd.minPressure = int(np.axMin); + tdd.maxPressure = int(np.axMax); + + ptrWTInfo(WTI_DEVICES + lc.lcDevice, DVC_TPRESSURE, &np); + tdd.minTanPressure = int(np.axMin); + tdd.maxTanPressure = int(np.axMax); + + LOGCONTEXT lcMine; + + /* get default region */ + ptrWTInfo(WTI_DEFCONTEXT, 0, &lcMine); + + tdd.minX = 0; + tdd.maxX = int(lcMine.lcInExtX) - int(lcMine.lcInOrgX); + + tdd.minY = 0; + tdd.maxY = int(lcMine.lcInExtY) - int(lcMine.lcInOrgY); + + tdd.minZ = 0; + tdd.maxZ = int(lcMine.lcInExtZ) - int(lcMine.lcInOrgZ); + + const uint cursorTypeBitMask = 0x0F06; // bitmask to find the specific cursor type (see Wacom FAQ) + if (((csr_type & 0x0006) == 0x0002) && ((csr_type & cursorTypeBitMask) != 0x0902)) { + tdd.currentDevice = QTabletEvent::Stylus; + } else { + switch (csr_type & cursorTypeBitMask) { case 0x0802: tdd.currentDevice = QTabletEvent::Stylus; break; @@ -3391,26 +3409,34 @@ static void tabletInit(UINT wActiveCsr, HCTX hTab) break; default: tdd.currentDevice = QTabletEvent::NoDevice; - } - } - - switch (wActiveCsr % 3) { - case 2: - tdd.currentPointerType = QTabletEvent::Eraser; - break; - case 1: - tdd.currentPointerType = QTabletEvent::Pen; - break; - case 0: - tdd.currentPointerType = QTabletEvent::Cursor; - break; - default: - tdd.currentPointerType = QTabletEvent::UnknownPointer; } + } + tCursorInfo()->insert(uniqueId, tdd); +} #endif // QT_NO_TABLETEVENT - tCursorInfo()->insert(wActiveCsr, tdd); + +// Update the "dynamic" informations of a cursor device (pen, airbrush, etc). +// The dynamic information is the information of QTabletDeviceData that can change +// in time (eraser or pen if a device is turned around). +#ifndef QT_NO_TABLETEVENT + +static void tabletUpdateCursor(QTabletDeviceData &tdd, const UINT currentCursor) +{ + switch (currentCursor % 3) { // %3 for dual track + case 0: + tdd.currentPointerType = QTabletEvent::Cursor; + break; + case 1: + tdd.currentPointerType = QTabletEvent::Pen; + break; + case 2: + tdd.currentPointerType = QTabletEvent::Eraser; + break; + default: + tdd.currentPointerType = QTabletEvent::UnknownPointer; } } +#endif // QT_NO_TABLETEVENT bool QETWidget::translateTabletEvent(const MSG &msg, PACKET *localPacketBuf, int numPackets) @@ -3546,6 +3572,10 @@ bool QETWidget::translateTabletEvent(const MSG &msg, PACKET *localPacketBuf, } extern bool qt_is_gui_used; + + +#ifndef QT_NO_TABLETEVENT + static void initWinTabFunctions() { #if defined(Q_OS_WINCE) @@ -3564,6 +3594,7 @@ static void initWinTabFunctions() } #endif // Q_OS_WINCE } +#endif // QT_NO_TABLETEVENT // diff --git a/src/gui/kernel/qcocoaapplicationdelegate_mac.mm b/src/gui/kernel/qcocoaapplicationdelegate_mac.mm index 37dcc67fe1..304e5d3583 100644 --- a/src/gui/kernel/qcocoaapplicationdelegate_mac.mm +++ b/src/gui/kernel/qcocoaapplicationdelegate_mac.mm @@ -178,6 +178,9 @@ static void cleanupCocoaApplicationDelegate() return [[qtMenuLoader retain] autorelease]; } +// This function will only be called when NSApp is actually running. Before +// that, the kAEQuitApplication apple event will be sendt to +// QApplicationPrivate::globalAppleEventProcessor in qapplication_mac.mm - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender { Q_UNUSED(sender); diff --git a/src/gui/kernel/qcocoamenuloader_mac.mm b/src/gui/kernel/qcocoamenuloader_mac.mm index 9ab077f034..990571dce2 100644 --- a/src/gui/kernel/qcocoamenuloader_mac.mm +++ b/src/gui/kernel/qcocoamenuloader_mac.mm @@ -76,9 +76,14 @@ QT_USE_NAMESPACE - (void)ensureAppMenuInMenu:(NSMenu *)menu { + // The application menu is the menu in the menu bar that contains the + // 'Quit' item. When changing menu bar (e.g when swithing between + // windows with different menu bars), we never recreate this menu, but + // instead pull it out the current menu bar and place into the new one: NSMenu *mainMenu = [NSApp mainMenu]; if ([NSApp mainMenu] == menu) - return; // nothing to do! + return; // nothing to do (menu is the current menu bar)! + #ifndef QT_NAMESPACE Q_ASSERT(mainMenu); #endif diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index a16d1f803d..3da783fd6f 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -64,12 +64,16 @@ #include <qdebug.h> -@interface NSEvent (DeviceDelta) +@interface NSEvent (Qt_Compile_Leopard_DeviceDelta) - (CGFloat)deviceDeltaX; - (CGFloat)deviceDeltaY; - (CGFloat)deviceDeltaZ; @end +@interface NSEvent (Qt_Compile_Leopard_Gestures) + - (CGFloat)magnification; +@end + QT_BEGIN_NAMESPACE Q_GLOBAL_STATIC(DnDParams, qMacDnDParams); @@ -79,6 +83,7 @@ extern bool qt_sendSpontaneousEvent(QObject *, QEvent *); // qapplication.cpp extern OSViewRef qt_mac_nativeview_for(const QWidget *w); // qwidget_mac.mm extern const QStringList& qEnabledDraggedTypes(); // qmime_mac.cpp extern QPointer<QWidget> qt_mouseover; //qapplication_mac.mm +extern QPointer<QWidget> qt_button_down; //qapplication_mac.cpp Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum) { @@ -691,6 +696,9 @@ extern "C" { - (void)mouseDown:(NSEvent *)theEvent { + if (!qt_button_down) + qt_button_down = qwidget; + qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonPress, Qt::LeftButton); // Don't call super here. This prevents us from getting the mouseUp event, // which we need to send even if the mouseDown event was not accepted. @@ -700,75 +708,62 @@ extern "C" { - (void)mouseUp:(NSEvent *)theEvent { - bool mouseOK = qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonRelease, Qt::LeftButton); + qt_button_down = 0; - if (!mouseOK) - [super mouseUp:theEvent]; + qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonRelease, Qt::LeftButton); } - (void)rightMouseDown:(NSEvent *)theEvent { - bool mouseOK = qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonPress, Qt::RightButton); + if (!qt_button_down) + qt_button_down = qwidget; - if (!mouseOK) - [super rightMouseDown:theEvent]; + qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonPress, Qt::RightButton); } - (void)rightMouseUp:(NSEvent *)theEvent { - bool mouseOK = qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonRelease, Qt::RightButton); + qt_button_down = 0; - if (!mouseOK) - [super rightMouseUp:theEvent]; + qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonRelease, Qt::RightButton); } - (void)otherMouseDown:(NSEvent *)theEvent { - Qt::MouseButton mouseButton = cocoaButton2QtButton([theEvent buttonNumber]); - bool mouseOK = qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonPress, mouseButton); + if (!qt_button_down) + qt_button_down = qwidget; - if (!mouseOK) - [super otherMouseDown:theEvent]; + Qt::MouseButton mouseButton = cocoaButton2QtButton([theEvent buttonNumber]); + qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonPress, mouseButton); } - (void)otherMouseUp:(NSEvent *)theEvent { - Qt::MouseButton mouseButton = cocoaButton2QtButton([theEvent buttonNumber]); - bool mouseOK = qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonRelease, mouseButton); - - if (!mouseOK) - [super otherMouseUp:theEvent]; + qt_button_down = 0; + Qt::MouseButton mouseButton = cocoaButton2QtButton([theEvent buttonNumber]); + qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonRelease, mouseButton); } - (void)mouseDragged:(NSEvent *)theEvent { qMacDnDParams()->view = self; qMacDnDParams()->theEvent = theEvent; - bool mouseOK = qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseMove, Qt::NoButton); - - if (!mouseOK) - [super mouseDragged:theEvent]; + qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseMove, Qt::NoButton); } - (void)rightMouseDragged:(NSEvent *)theEvent { qMacDnDParams()->view = self; qMacDnDParams()->theEvent = theEvent; - bool mouseOK = qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseMove, Qt::NoButton); - - if (!mouseOK) - [super rightMouseDragged:theEvent]; + qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseMove, Qt::NoButton); } - (void)otherMouseDragged:(NSEvent *)theEvent { qMacDnDParams()->view = self; qMacDnDParams()->theEvent = theEvent; - bool mouseOK = qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseMove, Qt::NoButton); - - if (!mouseOK) - [super otherMouseDragged:theEvent]; + qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseMove, Qt::NoButton); } - (void)scrollWheel:(NSEvent *)theEvent @@ -893,6 +888,7 @@ extern "C" { bool all = qwidget->testAttribute(Qt::WA_TouchPadAcceptSingleTouchEvents); qt_translateRawTouchEvent(qwidget, QTouchEvent::TouchPad, QCocoaTouch::getCurrentTouchPointList(event, all)); } +#endif // MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 - (void)magnifyWithEvent:(NSEvent *)event; { @@ -963,7 +959,6 @@ extern "C" { qNGEvent.position = flipPoint(p).toPoint(); qt_sendSpontaneousEvent(qwidget, &qNGEvent); } -#endif // MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 - (void)frameDidChange:(NSNotification *)note { @@ -1451,7 +1446,7 @@ Qt::DropAction QDragManager::drag(QDrag *o) [image release]; dragPrivate()->executed_action = Qt::IgnoreAction; object = 0; - Qt::DropAction performedAction(qt_mac_mapNSDragOperation(dndParams.performedAction)); + Qt::DropAction performedAction(qt_mac_mapNSDragOperation(qMacDnDParams()->performedAction)); // do post drag processing, if required. if(performedAction != Qt::IgnoreAction) { // check if the receiver points us to a file location. diff --git a/src/gui/kernel/qcocoawindowdelegate_mac.mm b/src/gui/kernel/qcocoawindowdelegate_mac.mm index 9fb674e0cf..8a22a65aae 100644 --- a/src/gui/kernel/qcocoawindowdelegate_mac.mm +++ b/src/gui/kernel/qcocoawindowdelegate_mac.mm @@ -324,8 +324,13 @@ static void cleanupCocoaWindowDelegate() NSRect frameToReturn = defaultFrame; QWidget *qwidget = m_windowHash->value(window); QSizeF size = qwidget->maximumSize(); - frameToReturn.size.width = qMin<CGFloat>(frameToReturn.size.width, size.width()); - frameToReturn.size.height = qMin<CGFloat>(frameToReturn.size.height, size.height()); + NSRect windowFrameRect = [window frame]; + NSRect viewFrameRect = [[window contentView] frame]; + // consider additional size required for titlebar & frame + frameToReturn.size.width = qMin<CGFloat>(frameToReturn.size.width, + size.width()+(windowFrameRect.size.width - viewFrameRect.size.width)); + frameToReturn.size.height = qMin<CGFloat>(frameToReturn.size.height, + size.height()+(windowFrameRect.size.height - viewFrameRect.size.height)); return frameToReturn; } diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h index 98392696df..461cc92254 100644 --- a/src/gui/kernel/qevent.h +++ b/src/gui/kernel/qevent.h @@ -787,6 +787,8 @@ public: private: QTouchEventTouchPointPrivate *d; + friend class QApplication; + friend class QApplicationPrivate; }; enum DeviceType { @@ -818,6 +820,7 @@ protected: Qt::TouchPointStates _touchPointStates; QList<QTouchEvent::TouchPoint> _touchPoints; + friend class QApplication; friend class QApplicationPrivate; }; diff --git a/src/gui/kernel/qeventdispatcher_mac.mm b/src/gui/kernel/qeventdispatcher_mac.mm index 427f0b0a15..e0eebfdb1f 100644 --- a/src/gui/kernel/qeventdispatcher_mac.mm +++ b/src/gui/kernel/qeventdispatcher_mac.mm @@ -572,7 +572,7 @@ bool QEventDispatcherMac::processEvents(QEventLoop::ProcessEventsFlags flags) while (!d->interrupt && [NSApp runModalSession:session] == NSRunContinuesResponse) qt_mac_waitForMoreModalSessionEvents(); if (!d->interrupt && session == d->currentModalSessionCached) { - // Someone called e.g. [NSApp stopModal:] from outside the event + // INVARIANT: Someone called e.g. [NSApp stopModal:] from outside the event // dispatcher (e.g to stop a native dialog). But that call wrongly stopped // 'session' as well. As a result, we need to restart all internal sessions: d->temporarilyStopAllModalSessions(); @@ -596,7 +596,13 @@ bool QEventDispatcherMac::processEvents(QEventLoop::ProcessEventsFlags flags) if (NSModalSession session = d->currentModalSession()) { if (flags & QEventLoop::WaitForMoreEvents) qt_mac_waitForMoreModalSessionEvents(); - [NSApp runModalSession:session]; + NSInteger status = [NSApp runModalSession:session]; + if (status != NSRunContinuesResponse && session == d->currentModalSessionCached) { + // INVARIANT: Someone called e.g. [NSApp stopModal:] from outside the event + // dispatcher (e.g to stop a native dialog). But that call wrongly stopped + // 'session' as well. As a result, we need to restart all internal sessions: + d->temporarilyStopAllModalSessions(); + } retVal = true; break; } else { diff --git a/src/gui/kernel/qeventdispatcher_s60.cpp b/src/gui/kernel/qeventdispatcher_s60.cpp index 9d18c9b0cd..4c1429a535 100644 --- a/src/gui/kernel/qeventdispatcher_s60.cpp +++ b/src/gui/kernel/qeventdispatcher_s60.cpp @@ -92,7 +92,7 @@ void QEventDispatcherS60::saveInputEvent(QSymbianControl *control, QWidget *widg { DeferredInputEvent inputEvent = {control, widget, event}; m_deferredInputEvents.append(inputEvent); - connect(widget, SIGNAL(destroyed(QObject *)), SLOT(removeInputEventsForWidget(QObject *))); + connect(widget, SIGNAL(destroyed(QObject*)), SLOT(removeInputEventsForWidget(QObject*))); } bool QEventDispatcherS60::sendDeferredInputEvents() diff --git a/src/gui/kernel/qformlayout.cpp b/src/gui/kernel/qformlayout.cpp index 3e5dadc268..33f5489dd9 100644 --- a/src/gui/kernel/qformlayout.cpp +++ b/src/gui/kernel/qformlayout.cpp @@ -1124,14 +1124,15 @@ QStyle* QFormLayoutPrivate::getStyle() const \value DontWrapRows Fields are always laid out next to their label. This is - the default policy for all styles except Qt Extended styles. + the default policy for all styles except Qt Extended styles + and QS60Style. \value WrapLongRows Labels are given enough horizontal space to fit the widest label, and the rest of the space is given to the fields. If the minimum size of a field pair is wider than the available space, the field is wrapped to the next line. This is the default policy for - Qt Extended styles. + Qt Extended styles and and QS60Style. \value WrapAllRows Fields are always laid out below their label. @@ -1720,8 +1721,8 @@ QFormLayout::FieldGrowthPolicy QFormLayout::fieldGrowthPolicy() const \brief the way in which the form's rows wrap The default value depends on the widget or application style. For - Qt Extended styles, the default is WrapLongRows; for the other styles, - the default is DontWrapRows. + Qt Extended styles and QS60Style, the default is WrapLongRows; + for the other styles, the default is DontWrapRows. If you want to display each label above its associated field (instead of next to it), set this property to WrapAllRows. diff --git a/src/gui/kernel/qmultitouch_mac.mm b/src/gui/kernel/qmultitouch_mac.mm index 2f6f9cab55..f736146ae0 100644 --- a/src/gui/kernel/qmultitouch_mac.mm +++ b/src/gui/kernel/qmultitouch_mac.mm @@ -180,7 +180,6 @@ QCocoaTouch::getCurrentTouchPointList(NSEvent *event, bool acceptSingleTouch) if (_touchCount != _currentTouches.size()) { // Remove all instances, and basically start from scratch: touchPoints.clear(); - QList<QCocoaTouch *> list = _currentTouches.values(); foreach (QCocoaTouch *qcocoaTouch, _currentTouches.values()) { if (!_updateInternalStateOnly) { qcocoaTouch->_touchPoint.setState(Qt::TouchPointReleased); diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index c0fb8aac00..2bf1465a32 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -899,6 +899,14 @@ bool qt_mac_handleMouseEvent(void * /* NSView * */view, void * /* NSEvent * */ev widgetToGetMouse = [static_cast<QT_MANGLE_NAMESPACE(QCocoaView) *>(tmpView) qt_qwidget]; } + } else { + extern QPointer<QWidget> qt_button_down; //qapplication_mac.cpp + if (!mac_mouse_grabber && qt_button_down) { + // if there is no explicit grabber, and the mouse was grabbed + // implicitely (i.e. a mousebutton was pressed) + widgetToGetMouse = qt_button_down; + tmpView = qt_mac_nativeview_for(widgetToGetMouse); + } } NSPoint localPoint = [tmpView convertPoint:windowPoint fromView:nil]; diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 709f6f3b34..fbb9115fb0 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -8248,7 +8248,8 @@ bool QWidget::event(QEvent *event) QList<QObject*> childList = d->children; for (int i = 0; i < childList.size(); ++i) { QObject *o = childList.at(i); - QApplication::sendEvent(o, event); + if (o) + QApplication::sendEvent(o, event); } } update(); @@ -8277,7 +8278,7 @@ bool QWidget::event(QEvent *event) QList<QObject*> childList = d->children; for (int i = 0; i < childList.size(); ++i) { QObject *o = childList.at(i); - if (o != QApplication::activeModalWidget()) { + if (o && o != QApplication::activeModalWidget()) { if (qobject_cast<QWidget *>(o) && static_cast<QWidget *>(o)->isWindow()) { // do not forward the event to child windows, // QApplication does this for us diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 71f0077521..0d9f9ee3f9 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -725,6 +725,23 @@ static OSWindowRef qt_mac_create_window(QWidget *, WindowClass wclass, WindowAtt return window; } +#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6 +/* We build the release package against the 10.4 SDK. + So, to enable gestures for applications running on + 10.6+, we define the missing constants here: */ +enum { + kEventClassGesture = 'gest', + kEventGestureStarted = 1, + kEventGestureEnded = 2, + kEventGestureMagnify = 4, + kEventGestureSwipe = 5, + kEventGestureRotate = 6, + kEventParamRotationAmount = 'rota', + kEventParamSwipeDirection = 'swip', + kEventParamMagnificationAmount = 'magn' +}; +#endif + // window events static EventTypeSpec window_events[] = { { kEventClassWindow, kEventWindowClose }, @@ -741,13 +758,11 @@ static EventTypeSpec window_events[] = { { kEventClassWindow, kEventWindowGetRegion }, { kEventClassWindow, kEventWindowGetClickModality }, { kEventClassWindow, kEventWindowTransitionCompleted }, -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 { kEventClassGesture, kEventGestureStarted }, { kEventClassGesture, kEventGestureEnded }, { kEventClassGesture, kEventGestureMagnify }, { kEventClassGesture, kEventGestureSwipe }, { kEventClassGesture, kEventGestureRotate }, -#endif { kEventClassMouse, kEventMouseDown } }; static EventHandlerUPP mac_win_eventUPP = 0; @@ -1036,7 +1051,6 @@ OSStatus QWidgetPrivate::qt_window_event(EventHandlerCallRef er, EventRef event, handled_event = false; break; } -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 case kEventClassGesture: { // First, find the widget that was under // the mouse when the gesture happened: @@ -1064,7 +1078,7 @@ OSStatus QWidgetPrivate::qt_window_event(EventHandlerCallRef er, EventRef event, break; case kEventGestureRotate: { CGFloat amount; - if (GetEventParameter(event, kEventParamRotationAmount, typeCGFloat, 0, + if (GetEventParameter(event, kEventParamRotationAmount, 'cgfl', 0, sizeof(amount), 0, &amount) != noErr) { handled_event = false; break; @@ -1091,7 +1105,7 @@ OSStatus QWidgetPrivate::qt_window_event(EventHandlerCallRef er, EventRef event, break; } case kEventGestureMagnify: { CGFloat amount; - if (GetEventParameter(event, kEventParamMagnificationAmount, typeCGFloat, 0, + if (GetEventParameter(event, kEventParamMagnificationAmount, 'cgfl', 0, sizeof(amount), 0, &amount) != noErr) { handled_event = false; break; @@ -1103,7 +1117,6 @@ OSStatus QWidgetPrivate::qt_window_event(EventHandlerCallRef er, EventRef event, QApplication::sendSpontaneousEvent(widget, &qNGEvent); break; } -#endif // gestures default: handled_event = false; diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index b1c37d3bc9..359df2abb5 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -488,12 +488,6 @@ void QWidgetPrivate::show_sys() if(q->isWindow()) id->setFocusSafely(true); - - // Force setting of the icon after window is made visible, - // this is needed even WA_SetWindowIcon is not set, as in that case we need - // to reset to the application level window icon - if(q->isWindow()) - setWindowIcon_sys(true); } invalidateBuffer(q->rect()); @@ -1180,18 +1174,6 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows) if (id->IsFocused()) // Avoid unnecessry calls to FocusChanged() id->setFocusSafely(false); id->ControlEnv()->AppUi()->RemoveFromStack(id); - - // Hack to activate window under destroyed one. With this activation - // the next visible window will get keyboard focus - WId wid = CEikonEnv::Static()->AppUi()->TopFocusedControl(); - if (wid) { - QWidget *widget = QWidget::find(wid); - QApplication::setActiveWindow(widget); - if (widget) { - // Reset global window title for focusing window - widget->d_func()->setWindowTitle_sys(widget->windowTitle()); - } - } } } diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp index 7461637ba0..0bc9cbcea6 100644 --- a/src/gui/kernel/qwidget_x11.cpp +++ b/src/gui/kernel/qwidget_x11.cpp @@ -527,8 +527,13 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO QX11InfoData *xd = &X11->screens[qt_x11_create_desktop_on_screen]; xinfo.setX11Data(xd); } else if (parentXinfo && (parentXinfo->screen() != xinfo.screen() - || parentXinfo->visual() != xinfo.visual())) + || (parentXinfo->visual() != xinfo.visual() + && !q->inherits("QGLWidget")))) { + // QGLWidgets have to be excluded here as they have a + // specially crafted QX11Info structure which can't be swapped + // out with the parent widgets QX11Info. The parent visual, + // for instance, might not even be GL capable. xinfo = *parentXinfo; } diff --git a/src/gui/kernel/qwidgetaction.cpp b/src/gui/kernel/qwidgetaction.cpp index 7dc2c67344..b72a41a4f3 100644 --- a/src/gui/kernel/qwidgetaction.cpp +++ b/src/gui/kernel/qwidgetaction.cpp @@ -212,8 +212,8 @@ void QWidgetAction::releaseWidget(QWidget *widget) if (!d->createdWidgets.contains(widget)) return; - disconnect(widget, SIGNAL(destroyed(QObject *)), - this, SLOT(_q_widgetDestroyed(QObject *))); + disconnect(widget, SIGNAL(destroyed(QObject*)), + this, SLOT(_q_widgetDestroyed(QObject*))); d->createdWidgets.removeAll(widget); deleteWidget(widget); } diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp index b92c5c20ee..1d15dac455 100644 --- a/src/gui/painting/qblendfunctions.cpp +++ b/src/gui/painting/qblendfunctions.cpp @@ -739,10 +739,6 @@ template <typename T> void qt_scale_image_32bit(uchar *destPixels, int dbpl, quint32 basex; quint32 srcy; - const int dstx = qCeil((tx1 + 0.5 - qMin(targetRect.left(), targetRect.right())) * ix) - 1; - const int dsty = qCeil((ty1 + 0.5 - qMin(targetRect.top(), targetRect.bottom())) * iy) - 1; - - if (sx < 0) { int dstx = qFloor((tx1 + qreal(0.5) - targetRect.right()) * ix) + 1; basex = quint32(srcRect.right() * 65536) + dstx; diff --git a/src/gui/painting/qpaintbuffer.cpp b/src/gui/painting/qpaintbuffer.cpp index b8700c33e9..51be3b3800 100644 --- a/src/gui/painting/qpaintbuffer.cpp +++ b/src/gui/painting/qpaintbuffer.cpp @@ -1708,7 +1708,7 @@ void QPaintEngineExReplayer::process(const QPaintBufferCommand &cmd) QPaintBufferResource::QPaintBufferResource(FreeFunc f, QObject *parent) : QObject(parent), free(f) { - connect(QPaintBufferSignalProxy::instance(), SIGNAL(aboutToDestroy(const QPaintBufferPrivate *)), this, SLOT(remove(const QPaintBufferPrivate *))); + connect(QPaintBufferSignalProxy::instance(), SIGNAL(aboutToDestroy(const QPaintBufferPrivate*)), this, SLOT(remove(const QPaintBufferPrivate*))); } QPaintBufferResource::~QPaintBufferResource() diff --git a/src/gui/painting/qprintengine_pdf.cpp b/src/gui/painting/qprintengine_pdf.cpp index 4cccc91fba..3d82edf2c4 100644 --- a/src/gui/painting/qprintengine_pdf.cpp +++ b/src/gui/painting/qprintengine_pdf.cpp @@ -206,7 +206,7 @@ void QPdfEngine::drawImage(const QRectF &rectangle, const QImage &image, const Q QRect sourceRect = sr.toRect(); QImage im = sourceRect != image.rect() ? image.copy(sourceRect) : image; bool bitmap = true; - const int object = d->addImage(image, &bitmap, im.cacheKey()); + const int object = d->addImage(im, &bitmap, im.cacheKey()); if (object < 0) return; diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp index a192e8776c..46fbaa958c 100644 --- a/src/gui/painting/qtextureglyphcache.cpp +++ b/src/gui/painting/qtextureglyphcache.cpp @@ -101,7 +101,7 @@ void QTextureGlyphCache::populate(const QTextItemInt &ti, Coord c = { 0, 0, // will be filled in later glyph_width, glyph_height, // texture coords - metrics.x.truncate(), + metrics.x.round().truncate(), -metrics.y.truncate() }; // baseline for horizontal scripts listItemCoordinates.insert(glyph, c); diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index 5566cc6a1e..b32c55b337 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -1368,7 +1368,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom else { gtkCachedPainter.paintFlatBox(gtkEntry, "entry_bg", contentRect, option->state & State_Enabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE, - GTK_SHADOW_NONE, style, entryPath + QString::number(focus)); + GTK_SHADOW_NONE, gtkCombo->style, entryPath + QString::number(focus)); } gtkCachedPainter.paintShadow(gtkEntry, comboBox->editable ? "entry" : "frame", frameRect, frameState, diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm index 38c3feb887..51c2a96ca6 100644 --- a/src/gui/styles/qmacstyle_mac.mm +++ b/src/gui/styles/qmacstyle_mac.mm @@ -2155,9 +2155,9 @@ int QMacStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QW wdi.titleWidth = tb->rect.width(); QCFType<HIShapeRef> region; HIRect hirect = qt_hirectForQRect(tb->rect); - if (hirect.size.width == -1) + if (hirect.size.width <= 0) hirect.size.width = 100; - if (hirect.size.height == -1) + if (hirect.size.height <= 0) hirect.size.height = 30; HIThemeGetWindowShape(&hirect, &wdi, kWindowTitleBarRgn, ®ion); diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 7c3e11fd01..ee10ff6da2 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -67,6 +67,7 @@ #include "qtoolbar.h" #include "qtoolbutton.h" #include "qfocusframe.h" +#include "qformlayout.h" #include "private/qtoolbarextension_p.h" #include "private/qcombobox_p.h" @@ -474,6 +475,8 @@ void QS60StylePrivate::setBackgroundTexture(QApplication *app) const QPalette applicationPalette = QApplication::palette(); applicationPalette.setBrush(QPalette::Window, backgroundTexture()); setThemePalette(&applicationPalette); + QApplication::setPalette(applicationPalette); + setThemePaletteHash(&applicationPalette); } void QS60StylePrivate::deleteBackground() @@ -867,6 +870,13 @@ QSize QS60StylePrivate::partSize(QS60StyleEnums::SkinParts part, SkinElementFlag return result; } +bool QS60StylePrivate::canDrawThemeBackground(const QBrush &backgroundBrush) +{ + //If brush is not changed from style's default values, draw theme graphics. + return (backgroundBrush.color() == Qt::transparent || + backgroundBrush.style() == Qt::NoBrush) ? true : false; +} + /*! \class QS60Style \brief The QS60Style class provides a look and feel suitable for applications on S60. @@ -1380,8 +1390,10 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, highlightRect = option->rect.adjusted(xBeginning, yBeginning, xEnd, yEnd); } if (vopt->showDecorationSelected && - (vopt->palette.highlight().color() == d->themePalette()->highlight().color())) + (vopt->palette.highlight().color() == QS60StylePrivate::themePalette()->highlight().color())) QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_ListHighlight, painter, highlightRect, flags); + else + painter->fillRect(highlightRect, vopt->palette.highlight()); } // draw the icon @@ -1853,7 +1865,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, case CE_ShapedFrame: if (const QTextEdit *textEdit = qobject_cast<const QTextEdit *>(widget)) { const QStyleOptionFrame *frame = qstyleoption_cast<const QStyleOptionFrame *>(option); - if (frame->palette.base().color()==Qt::transparent) + if (QS60StylePrivate::canDrawThemeBackground(frame->palette.base())) QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_Editor, painter, option->rect, flags); else QCommonStyle::drawControl(element, option, painter, widget); @@ -1927,7 +1939,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, if (option->state & State_Sunken && option->state & State_Enabled) { painter->save(); painter->setOpacity(0.5); - painter->setBrush(d->themePalette()->light()); + painter->setBrush(QS60StylePrivate::themePalette()->light()); painter->setRenderHint(QPainter::Antialiasing); const qreal roundRectRadius = 4 * goldenRatio; painter->drawRoundedRect(option->rect, roundRectRadius, roundRectRadius); @@ -1946,6 +1958,8 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti { Q_D(const QS60Style); const QS60StylePrivate::SkinElementFlags flags = (option->state & State_Enabled) ? QS60StylePrivate::SF_StateEnabled : QS60StylePrivate::SF_StateDisabled; + bool commonStyleDraws = false; + switch (element) { #ifndef QT_NO_LINEEDIT case PE_PanelLineEdit: @@ -1954,12 +1968,10 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti if (widget && qobject_cast<const QComboBox *>(widget->parentWidget())) break; #endif - QBrush editBrush = option->palette.brush(QPalette::Base); - if (editBrush.color() == Qt::transparent) - QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_FrameLineEdit, - painter, option->rect, flags); + if (QS60StylePrivate::canDrawThemeBackground(option->palette.base())) + QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_FrameLineEdit, painter, option->rect, flags); else - QCommonStyle::drawPrimitive(element, option, painter, widget); + commonStyleDraws = true; } break; #endif // QT_NO_LINEEDIT @@ -1969,10 +1981,13 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti const QS60StyleEnums::SkinParts skinPart = (option->state & QStyle::State_On) ? QS60StyleEnums::SP_QgnIndiCheckboxOn : QS60StyleEnums::SP_QgnIndiCheckboxOff; painter->save(); - QColor themeColor = d->s60Color(QS60StyleEnums::CL_QsnIconColors, 13, option); - QColor buttonTextColor = option->palette.buttonText().color(); - if (themeColor != buttonTextColor) - painter->setPen(buttonTextColor); + + QColor themeColor = QS60StylePrivate::themePalette()->windowText().color(); + QColor windowTextColor = option->palette.windowText().color(); + + if (themeColor != windowTextColor) + painter->setPen(windowTextColor); + QS60StylePrivate::drawSkinPart(skinPart, painter, option->rect, flags | QS60StylePrivate::SF_ColorSkinned ); painter->restore(); } @@ -2019,6 +2034,8 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti QColor buttonTextColor = option->palette.buttonText().color(); if (themeColor != buttonTextColor) painter->setPen(buttonTextColor); + else + painter->setPen(themeColor); // Draw radiobutton indicator as color skinned graphics. QS60StyleEnums::SkinParts skinPart = (option->state & QStyle::State_On) ? @@ -2032,14 +2049,13 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti case PE_PanelButtonTool: case PE_PanelButtonBevel: case PE_FrameButtonBevel: { - QBrush editBrush = option->palette.brush(QPalette::Base); - if (editBrush.color() == Qt::transparent) { + if (QS60StylePrivate::canDrawThemeBackground(option->palette.base())) { const bool isPressed = option->state & QStyle::State_Sunken; const QS60StylePrivate::SkinElements skinElement = isPressed ? QS60StylePrivate::SE_ButtonPressed : QS60StylePrivate::SE_ButtonNormal; QS60StylePrivate::drawSkinElement(skinElement, painter, option->rect, flags); } else { - QCommonStyle::drawPrimitive(element, option, painter, widget); + commonStyleDraws = true; } } break; @@ -2067,7 +2083,7 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti case PE_IndicatorSpinUp: if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) { QStyleOptionSpinBox optionSpinBox = *spinBox; - if (optionSpinBox.palette.base().color()==Qt::transparent) { + if (QS60StylePrivate::canDrawThemeBackground(optionSpinBox.palette.base())) { const QS60StyleEnums::SkinParts part = (element == PE_IndicatorSpinUp) ? QS60StyleEnums::SP_QgnGrafScrollArrowUp : QS60StyleEnums::SP_QgnGrafScrollArrowDown; @@ -2075,12 +2091,12 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti optionSpinBox.rect.translate(0, (element == PE_IndicatorSpinDown) ? adjustment : -adjustment ); QS60StylePrivate::drawSkinPart(part, painter, optionSpinBox.rect,flags); } else { - QCommonStyle::drawPrimitive(element, &optionSpinBox, painter, widget); + commonStyleDraws = true; } } #ifndef QT_NO_COMBOBOX else if (const QStyleOptionFrame *cmb = qstyleoption_cast<const QStyleOptionFrame *>(option)) { - if (cmb->palette.base().color()==Qt::transparent) { + if (QS60StylePrivate::canDrawThemeBackground( option->palette.base())) { // We want to draw down arrow here for comboboxes as well. const QS60StyleEnums::SkinParts part = QS60StyleEnums::SP_QgnGrafScrollArrowDown; QStyleOptionFrame comboBox = *cmb; @@ -2088,7 +2104,7 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti comboBox.rect.translate(0, (element == PE_IndicatorSpinDown) ? adjustment : -adjustment ); QS60StylePrivate::drawSkinPart(part, painter, comboBox.rect,flags); } else { - QCommonStyle::drawPrimitive(element, cmb, painter, widget); + commonStyleDraws = true; } } #endif //QT_NO_COMBOBOX @@ -2119,12 +2135,10 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti || qobject_cast<const QMenu *> (widget) #endif //QT_NO_MENU ) { - if (option->palette.base().color()==Qt::transparent) { - QS60StylePrivate::SkinElements skinElement = QS60StylePrivate::SE_OptionsMenu; - QS60StylePrivate::drawSkinElement(skinElement, painter, option->rect, flags); - } else { - QCommonStyle::drawPrimitive(element, option, painter, widget); - } + if (QS60StylePrivate::canDrawThemeBackground(option->palette.base())) + QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_OptionsMenu, painter, option->rect, flags); + else + commonStyleDraws = true; } break; case PE_FrameWindow: @@ -2256,6 +2270,9 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti #endif //QT_NO_COLUMNVIEW case PE_FrameTabBarBase: // since tabs are in S60 always in navipane, let's use common style for tab base in Qt. default: + commonStyleDraws = true; + } + if (commonStyleDraws) { QCommonStyle::drawPrimitive(element, option, painter, widget); } } @@ -2387,6 +2404,9 @@ int QS60Style::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w case SH_RequestSoftwareInputPanel: retValue = RSIP_OnMouseClickAndAlreadyFocused; break; + case SH_FormLayoutWrapPolicy: + retValue = QFormLayout::WrapLongRows; + break; default: break; } diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h index cfe87acbee..ea86bb2979 100644 --- a/src/gui/styles/qs60style_p.h +++ b/src/gui/styles/qs60style_p.h @@ -453,6 +453,10 @@ public: static QSize naviPaneSize(); + //Checks that the current brush is transparent or has BrushStyle NoBrush, + //so that theme graphic background can be drawn. + static bool canDrawThemeBackground(const QBrush &backgroundBrush); + private: static void drawPart(QS60StyleEnums::SkinParts part, QPainter *painter, const QRect &rect, SkinElementFlags flags = KDefaultSkinElementFlags); diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp index a8dbf8deea..48b8fad267 100644 --- a/src/gui/styles/qs60style_s60.cpp +++ b/src/gui/styles/qs60style_s60.cpp @@ -1324,9 +1324,9 @@ QS60Style::QS60Style() void QS60StylePrivate::handleDynamicLayoutVariantSwitch() { clearCaches(QS60StylePrivate::CC_LayoutChange); + setBackgroundTexture(qApp); setActiveLayout(); refreshUI(); - setBackgroundTexture(qApp); foreach (QWidget *widget, QApplication::allWidgets()) widget->ensurePolished(); } diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp index f894b8278c..30f2f35af6 100644 --- a/src/gui/styles/qwindowsstyle.cpp +++ b/src/gui/styles/qwindowsstyle.cpp @@ -2989,7 +2989,6 @@ void QWindowsStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComp #ifndef QT_NO_COMBOBOX case CC_ComboBox: if (const QStyleOptionComboBox *cmb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)) { - p->save(); QBrush editBrush = cmb->palette.brush(QPalette::Base); if ((cmb->subControls & SC_ComboBoxFrame)) { if (cmb->frame) { @@ -3059,7 +3058,6 @@ void QWindowsStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComp proxy()->drawPrimitive(PE_FrameFocusRect, &focus, p, widget); } } - p->restore(); } break; #endif // QT_NO_COMBOBOX diff --git a/src/gui/text/qfontengine_win.cpp b/src/gui/text/qfontengine_win.cpp index 6c367ab6fb..18851b7e1e 100644 --- a/src/gui/text/qfontengine_win.cpp +++ b/src/gui/text/qfontengine_win.cpp @@ -485,61 +485,78 @@ glyph_metrics_t QFontEngineWin::boundingBox(const QGlyphLayout &glyphs) return glyph_metrics_t(0, -tm.tmAscent, w, tm.tmHeight, w, 0); } +bool QFontEngineWin::getOutlineMetrics(glyph_t glyph, const QTransform &t, glyph_metrics_t *metrics) const +{ + Q_ASSERT(metrics != 0); + + HDC hdc = shared_dc(); + + GLYPHMETRICS gm; + DWORD res = 0; + MAT2 mat; + mat.eM11.value = mat.eM22.value = 1; + mat.eM11.fract = mat.eM22.fract = 0; + mat.eM21.value = mat.eM12.value = 0; + mat.eM21.fract = mat.eM12.fract = 0; + + if (t.type() > QTransform::TxTranslate) { + // We need to set the transform using the HDC's world + // matrix rather than using the MAT2 above, because the + // results provided when transforming via MAT2 does not + // match the glyphs that are drawn using a WorldTransform + XFORM xform; + xform.eM11 = t.m11(); + xform.eM12 = t.m12(); + xform.eM21 = t.m21(); + xform.eM22 = t.m22(); + xform.eDx = 0; + xform.eDy = 0; + SetGraphicsMode(hdc, GM_ADVANCED); + SetWorldTransform(hdc, &xform); + } + + uint format = GGO_METRICS; + if (ttf) + format |= GGO_GLYPH_INDEX; + res = GetGlyphOutline(hdc, glyph, format, &gm, 0, 0, &mat); + + if (t.type() > QTransform::TxTranslate) { + XFORM xform; + xform.eM11 = xform.eM22 = 1; + xform.eM12 = xform.eM21 = xform.eDx = xform.eDy = 0; + SetWorldTransform(hdc, &xform); + SetGraphicsMode(hdc, GM_COMPATIBLE); + } + + if (res != GDI_ERROR) { + *metrics = glyph_metrics_t(gm.gmptGlyphOrigin.x, -gm.gmptGlyphOrigin.y, + (int)gm.gmBlackBoxX, (int)gm.gmBlackBoxY, gm.gmCellIncX, gm.gmCellIncY); + return true; + } else { + return false; + } +} glyph_metrics_t QFontEngineWin::boundingBox(glyph_t glyph, const QTransform &t) { #ifndef Q_WS_WINCE - GLYPHMETRICS gm; - HDC hdc = shared_dc(); SelectObject(hdc, hfont); - if (!ttf) { + + glyph_metrics_t glyphMetrics; + bool success = getOutlineMetrics(glyph, t, &glyphMetrics); + + if (!ttf && !success) { + // Bitmap fonts wchar_t ch = glyph; ABCFLOAT abc; GetCharABCWidthsFloat(hdc, ch, ch, &abc); int width = qRound(abc.abcfB); - return glyph_metrics_t(0, -tm.tmAscent, width, tm.tmHeight, width, 0).transformed(t); - } else { - DWORD res = 0; - MAT2 mat; - mat.eM11.value = mat.eM22.value = 1; - mat.eM11.fract = mat.eM22.fract = 0; - mat.eM21.value = mat.eM12.value = 0; - mat.eM21.fract = mat.eM12.fract = 0; - - if (t.type() > QTransform::TxTranslate) { - // We need to set the transform using the HDC's world - // matrix rather than using the MAT2 above, because the - // results provided when transforming via MAT2 does not - // match the glyphs that are drawn using a WorldTransform - XFORM xform; - xform.eM11 = t.m11(); - xform.eM12 = t.m12(); - xform.eM21 = t.m21(); - xform.eM22 = t.m22(); - xform.eDx = 0; - xform.eDy = 0; - SetGraphicsMode(hdc, GM_ADVANCED); - SetWorldTransform(hdc, &xform); - } - - res = GetGlyphOutline(hdc, glyph, GGO_METRICS | GGO_GLYPH_INDEX, &gm, 0, 0, &mat); - - if (t.type() > QTransform::TxTranslate) { - XFORM xform; - xform.eM11 = xform.eM22 = 1; - xform.eM12 = xform.eM21 = xform.eDx = xform.eDy = 0; - SetWorldTransform(hdc, &xform); - SetGraphicsMode(hdc, GM_COMPATIBLE); - } - - if (res != GDI_ERROR) { - return glyph_metrics_t(gm.gmptGlyphOrigin.x, -gm.gmptGlyphOrigin.y, - (int)gm.gmBlackBoxX, (int)gm.gmBlackBoxY, gm.gmCellIncX, gm.gmCellIncY); - } + return glyph_metrics_t(QFixed::fromReal(abc.abcfA), -tm.tmAscent, width, tm.tmHeight, width, 0).transformed(t); } - return glyph_metrics_t(); + + return glyphMetrics; #else HDC hdc = shared_dc(); HGDIOBJ oldFont = SelectObject(hdc, hfont); @@ -1135,7 +1152,7 @@ QNativeImage *QFontEngineWin::drawGDIGlyph(HFONT font, glyph_t glyph, int margin { ExtTextOut(hdc, -gx + margin, -gy + margin, options, 0, (LPCWSTR) &glyph, 1, 0); } - + SelectObject(hdc, old_font); return ni; } diff --git a/src/gui/text/qfontengine_win_p.h b/src/gui/text/qfontengine_win_p.h index 9c4b0a9280..43e1f12105 100644 --- a/src/gui/text/qfontengine_win_p.h +++ b/src/gui/text/qfontengine_win_p.h @@ -109,6 +109,8 @@ public: int getGlyphIndexes(const QChar *ch, int numChars, QGlyphLayout *glyphs, bool mirrored) const; void getCMap(); + bool getOutlineMetrics(glyph_t glyph, const QTransform &t, glyph_metrics_t *metrics) const; + QString _name; HFONT hfont; LOGFONT logfont; diff --git a/src/gui/text/qfontmetrics.cpp b/src/gui/text/qfontmetrics.cpp index b8c1b3378f..3d3f1e14b4 100644 --- a/src/gui/text/qfontmetrics.cpp +++ b/src/gui/text/qfontmetrics.cpp @@ -1367,10 +1367,13 @@ qreal QFontMetricsF::rightBearing(QChar ch) const */ qreal QFontMetricsF::width(const QString &text) const { + int pos = text.indexOf(QLatin1Char('\x9c')); + int len = (pos != -1) ? pos : text.length(); + QTextEngine layout(text, d.data()); layout.ignoreBidi = true; layout.itemize(); - return layout.width(0, text.length()).toReal(); + return layout.width(0, len).toReal(); } /*! @@ -1587,7 +1590,7 @@ QRectF QFontMetricsF::boundingRect(const QRectF &rect, int flags, const QString& */ QSizeF QFontMetricsF::size(int flags, const QString &text, int tabStops, int *tabArray) const { - return boundingRect(QRectF(), flags, text, tabStops, tabArray).size(); + return boundingRect(QRectF(), flags | Qt::TextLongestVariant, text, tabStops, tabArray).size(); } /*! @@ -1642,7 +1645,20 @@ QRectF QFontMetricsF::tightBoundingRect(const QString &text) const */ QString QFontMetricsF::elidedText(const QString &text, Qt::TextElideMode mode, qreal width, int flags) const { - QStackTextEngine engine(text, QFont(d.data())); + QString _text = text; + if (!(flags & Qt::TextLongestVariant)) { + int posA = 0; + int posB = _text.indexOf(QLatin1Char('\x9c')); + while (posB >= 0) { + QString portion = _text.mid(posA, posB - posA); + if (size(flags, portion).width() <= width) + return portion; + posA = posB + 1; + posB = _text.indexOf(QLatin1Char('\x9c'), posA); + } + _text = _text.mid(posA); + } + QStackTextEngine engine(_text, QFont(d.data())); return engine.elidedText(mode, QFixed::fromReal(width), flags); } diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp index be79773518..f96f66b531 100644 --- a/src/gui/text/qtextcontrol.cpp +++ b/src/gui/text/qtextcontrol.cpp @@ -1849,8 +1849,8 @@ void QTextControlPrivate::inputMethodEvent(QInputMethodEvent *e) || e->preeditString() != cursor.block().layout()->preeditAreaText() || e->replacementLength() > 0; + cursor.beginEditBlock(); if (isGettingInput) { - cursor.beginEditBlock(); cursor.removeSelectedText(); } @@ -1876,7 +1876,8 @@ void QTextControlPrivate::inputMethodEvent(QInputMethodEvent *e) QTextBlock block = cursor.block(); QTextLayout *layout = block.layout(); - layout->setPreeditArea(cursor.position() - block.position(), e->preeditString()); + if (isGettingInput) + layout->setPreeditArea(cursor.position() - block.position(), e->preeditString()); QList<QTextLayout::FormatRange> overrides; preeditCursor = e->preeditString().length(); hideCursor = false; @@ -1897,9 +1898,7 @@ void QTextControlPrivate::inputMethodEvent(QInputMethodEvent *e) } } layout->setAdditionalFormats(overrides); - - if (isGettingInput) - cursor.endEditBlock(); + cursor.endEditBlock(); } QVariant QTextControl::inputMethodQuery(Qt::InputMethodQuery property) const diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index 048325c036..523dd18c86 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -1767,6 +1767,12 @@ void QTextDocument::print(QPrinter *printer) const fromPage = qMax(1, fromPage); toPage = qMin(doc->pageCount(), toPage); + if (toPage < fromPage) { + // if the user entered a page range outside the actual number + // of printable pages, just return + return; + } + if (printer->pageOrder() == QPrinter::LastPageFirst) { int tmp = fromPage; fromPage = toPage; diff --git a/src/gui/widgets/qabstractbutton.cpp b/src/gui/widgets/qabstractbutton.cpp index cb467914ed..8834373142 100644 --- a/src/gui/widgets/qabstractbutton.cpp +++ b/src/gui/widgets/qabstractbutton.cpp @@ -165,7 +165,7 @@ QAbstractButtonPrivate::QAbstractButtonPrivate(QSizePolicy::ControlType type) shortcutId(0), #endif checkable(false), checked(false), autoRepeat(false), autoExclusive(false), - down(false), blockRefresh(false), + down(false), blockRefresh(false), pressed(false), #ifndef QT_NO_BUTTONGROUP group(0), #endif @@ -1090,6 +1090,7 @@ void QAbstractButton::mousePressEvent(QMouseEvent *e) } if (hitButton(e->pos())) { setDown(true); + d->pressed = true; repaint(); //flush paint event before invoking potentially expensive operation QApplication::flush(); d->emitPressed(); @@ -1103,6 +1104,8 @@ void QAbstractButton::mousePressEvent(QMouseEvent *e) void QAbstractButton::mouseReleaseEvent(QMouseEvent *e) { Q_D(QAbstractButton); + d->pressed = false; + if (e->button() != Qt::LeftButton) { e->ignore(); return; @@ -1127,7 +1130,7 @@ void QAbstractButton::mouseReleaseEvent(QMouseEvent *e) void QAbstractButton::mouseMoveEvent(QMouseEvent *e) { Q_D(QAbstractButton); - if (!(e->buttons() & Qt::LeftButton)) { + if (!(e->buttons() & Qt::LeftButton) || !d->pressed) { e->ignore(); return; } diff --git a/src/gui/widgets/qabstractbutton_p.h b/src/gui/widgets/qabstractbutton_p.h index be7c022467..d86163b47a 100644 --- a/src/gui/widgets/qabstractbutton_p.h +++ b/src/gui/widgets/qabstractbutton_p.h @@ -77,6 +77,7 @@ public: uint autoExclusive :1; uint down :1; uint blockRefresh :1; + uint pressed : 1; #ifndef QT_NO_BUTTONGROUP QButtonGroup* group; diff --git a/src/gui/widgets/qabstractslider.cpp b/src/gui/widgets/qabstractslider.cpp index e0db9c29e2..988a7e7396 100644 --- a/src/gui/widgets/qabstractslider.cpp +++ b/src/gui/widgets/qabstractslider.cpp @@ -219,6 +219,10 @@ QAbstractSliderPrivate::QAbstractSliderPrivate() blocktracking(false), pressed(false), invertedAppearance(false), invertedControls(false), orientation(Qt::Horizontal), repeatAction(QAbstractSlider::SliderNoAction) +#ifdef QT_KEYPAD_NAVIGATION + , isAutoRepeating(false) + , repeatMultiplier(1) +#endif { } @@ -371,6 +375,9 @@ int QAbstractSlider::maximum() const abstract sliders provides and typically corresponds to the user pressing an arrow key. + If the property is modified during an auto repeating key event, behavior + is undefined. + \sa pageStep */ @@ -598,10 +605,10 @@ void QAbstractSlider::triggerAction(SliderAction action) d->blocktracking = true; switch (action) { case SliderSingleStepAdd: - setSliderPosition(d->overflowSafeAdd(d->singleStep)); + setSliderPosition(d->overflowSafeAdd(d->effectiveSingleStep())); break; case SliderSingleStepSub: - setSliderPosition(d->overflowSafeAdd(-d->singleStep)); + setSliderPosition(d->overflowSafeAdd(-d->effectiveSingleStep())); break; case SliderPageStepAdd: setSliderPosition(d->overflowSafeAdd(d->pageStep)); @@ -702,7 +709,7 @@ void QAbstractSlider::wheelEvent(QWheelEvent * e) // Calculate how many lines to scroll. Depending on what delta is (and // offset), we might end up with a fraction (e.g. scroll 1.3 lines). We can // only scroll whole lines, so we keep the reminder until next event. - qreal stepsToScrollF = offset * QApplication::wheelScrollLines() * d->singleStep; + qreal stepsToScrollF = offset * QApplication::wheelScrollLines() * d->effectiveSingleStep(); // Check if wheel changed direction since last event: if (d->offset_accumulated != 0 && (offset / d->offset_accumulated) < 0) d->offset_accumulated = 0; @@ -773,6 +780,38 @@ void QAbstractSlider::keyPressEvent(QKeyEvent *ev) { Q_D(QAbstractSlider); SliderAction action = SliderNoAction; +#ifdef QT_KEYPAD_NAVIGATION + if (ev->isAutoRepeat()) { + if (d->firstRepeat.isNull()) + d->firstRepeat = QTime::currentTime(); + else if (1 == d->repeatMultiplier) { + // This is the interval in milli seconds which one key repetition + // takes. + const int repeatMSecs = d->firstRepeat.msecsTo(QTime::currentTime()); + + /** + * The time it takes to currently navigate the whole slider. + */ + const qreal currentTimeElapse = (qreal(maximum()) / singleStep()) * repeatMSecs; + + /** + * This is an arbitrarily determined constant in msecs that + * specifies how long time it should take to navigate from the + * start to the end(excluding starting key auto repeat). + */ + const int SliderRepeatElapse = 2500; + + d->repeatMultiplier = currentTimeElapse / SliderRepeatElapse; + } + + } + else if (!d->firstRepeat.isNull()) { + d->firstRepeat = QTime(); + d->repeatMultiplier = 1; + } + +#endif + switch (ev->key()) { #ifdef QT_KEYPAD_NAVIGATION case Qt::Key_Select: diff --git a/src/gui/widgets/qabstractslider_p.h b/src/gui/widgets/qabstractslider_p.h index 9324d44e1d..6591981695 100644 --- a/src/gui/widgets/qabstractslider_p.h +++ b/src/gui/widgets/qabstractslider_p.h @@ -68,7 +68,13 @@ public: void setSteps(int single, int page); - int minimum, maximum, singleStep, pageStep, value, position, pressValue; + int minimum, maximum, pageStep, value, position, pressValue; + + /** + * Call effectiveSingleStep() when changing the slider value. + */ + int singleStep; + float offset_accumulated; uint tracking : 1; uint blocktracking :1; @@ -83,8 +89,33 @@ public: #ifdef QT_KEYPAD_NAVIGATION int origValue; + + /** + */ + bool isAutoRepeating; + + /** + * When we're auto repeating, we multiply singleStep with this value to + * get our effective step. + */ + qreal repeatMultiplier; + + /** + * The time of when the first auto repeating key press event occurs. + */ + QTime firstRepeat; + #endif + inline int effectiveSingleStep() const + { + return singleStep +#ifdef QT_KEYPAD_NAVIGATION + * repeatMultiplier +#endif + ; + } + inline int bound(int val) const { return qMax(minimum, qMin(maximum, val)); } inline int overflowSafeAdd(int add) const { diff --git a/src/gui/widgets/qcommandlinkbutton.cpp b/src/gui/widgets/qcommandlinkbutton.cpp index 9adf2801a3..8f47f25d3d 100644 --- a/src/gui/widgets/qcommandlinkbutton.cpp +++ b/src/gui/widgets/qcommandlinkbutton.cpp @@ -326,7 +326,8 @@ int QCommandLinkButton::heightForWidth(int width) const Q_D(const QCommandLinkButton); int heightWithoutDescription = d->descriptionOffset() + d->bottomMargin(); // find the width available for the description area - return heightWithoutDescription + d->descriptionHeight(width); + return qMax(heightWithoutDescription + d->descriptionHeight(width), + iconSize().height() + d->topMargin() + d->bottomMargin()); } /*! \reimp */ diff --git a/src/gui/widgets/qdialogbuttonbox.cpp b/src/gui/widgets/qdialogbuttonbox.cpp index 2ee5751782..0e859f17bd 100644 --- a/src/gui/widgets/qdialogbuttonbox.cpp +++ b/src/gui/widgets/qdialogbuttonbox.cpp @@ -1215,6 +1215,30 @@ bool QDialogButtonBox::event(QEvent *event) }else if (event->type() == QEvent::LanguageChange) { d->retranslateStrings(); } +#ifdef QT_SOFTKEYS_ENABLED + else if (event->type() == QEvent::ParentChange) { + QWidget *dialog = 0; + QWidget *p = this; + while (p && !p->isWindow()) { + p = p->parentWidget(); + if ((dialog = qobject_cast<QDialog *>(p))) + break; + } + + // If the parent changes, then move the softkeys + for (QHash<QAbstractButton *, QAction *>::const_iterator it = d->softKeyActions.constBegin(); + it != d->softKeyActions.constEnd(); ++it) { + QAction *current = it.value(); + QList<QWidget *> widgets = current->associatedWidgets(); + foreach (QWidget *w, widgets) + w->removeAction(current); + if (dialog) + dialog->addAction(current); + else + addAction(current); + } + } +#endif return QWidget::event(event); } diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index 300a2ea9e8..87975c307e 100644 --- a/src/gui/widgets/qlinecontrol.cpp +++ b/src/gui/widgets/qlinecontrol.cpp @@ -138,7 +138,12 @@ void QLineControl::copy(QClipboard::Mode mode) const */ void QLineControl::paste() { - insert(QApplication::clipboard()->text(QClipboard::Clipboard)); + QString clip = QApplication::clipboard()->text(QClipboard::Clipboard); + if (!clip.isEmpty() || hasSelectedText()) { + separate(); //make it a separate undo/redo command + insert(clip); + separate(); + } } #endif // !QT_NO_CLIPBOARD @@ -1666,6 +1671,7 @@ void QLineControl::processKeyEvent(QKeyEvent* event) } #endif // QT_NO_SHORTCUT else { + bool handled = false; #ifdef Q_WS_MAC if (event->key() == Qt::Key_Up || event->key() == Qt::Key_Down) { Qt::KeyboardModifiers myModifiers = (event->modifiers() & ~Qt::KeypadModifier); @@ -1683,6 +1689,7 @@ void QLineControl::processKeyEvent(QKeyEvent* event) event->key() == Qt::Key_Up ? home(0) : end(0); } } + handled = true; } #endif if (event->modifiers() & Qt::ControlModifier) { @@ -1715,7 +1722,8 @@ void QLineControl::processKeyEvent(QKeyEvent* event) break; #endif default: - unknown = true; + if (!handled) + unknown = true; } } else { // ### check for *no* modifier switch (event->key()) { @@ -1748,7 +1756,8 @@ void QLineControl::processKeyEvent(QKeyEvent* event) #endif default: - unknown = true; + if (!handled) + unknown = true; } } } diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp index 9f3fe4f98e..380022439d 100644 --- a/src/gui/widgets/qlineedit.cpp +++ b/src/gui/widgets/qlineedit.cpp @@ -2004,38 +2004,48 @@ QMenu *QLineEdit::createStandardContextMenu() Q_D(QLineEdit); QMenu *popup = new QMenu(this); popup->setObjectName(QLatin1String("qt_edit_menu")); + QAction *action = 0; - QAction *action = popup->addAction(QLineEdit::tr("&Undo") + ACCEL_KEY(QKeySequence::Undo)); - action->setEnabled(d->control->isUndoAvailable()); - connect(action, SIGNAL(triggered()), SLOT(undo())); + if (!isReadOnly()) { + action = popup->addAction(QLineEdit::tr("&Undo") + ACCEL_KEY(QKeySequence::Undo)); + action->setEnabled(d->control->isUndoAvailable()); + connect(action, SIGNAL(triggered()), SLOT(undo())); - action = popup->addAction(QLineEdit::tr("&Redo") + ACCEL_KEY(QKeySequence::Redo)); - action->setEnabled(d->control->isRedoAvailable()); - connect(action, SIGNAL(triggered()), SLOT(redo())); + action = popup->addAction(QLineEdit::tr("&Redo") + ACCEL_KEY(QKeySequence::Redo)); + action->setEnabled(d->control->isRedoAvailable()); + connect(action, SIGNAL(triggered()), SLOT(redo())); - popup->addSeparator(); + popup->addSeparator(); + } #ifndef QT_NO_CLIPBOARD - action = popup->addAction(QLineEdit::tr("Cu&t") + ACCEL_KEY(QKeySequence::Cut)); - action->setEnabled(!d->control->isReadOnly() && d->control->hasSelectedText() - && d->control->echoMode() == QLineEdit::Normal); - connect(action, SIGNAL(triggered()), SLOT(cut())); + if (!isReadOnly()) { + action = popup->addAction(QLineEdit::tr("Cu&t") + ACCEL_KEY(QKeySequence::Cut)); + action->setEnabled(!d->control->isReadOnly() && d->control->hasSelectedText() + && d->control->echoMode() == QLineEdit::Normal); + connect(action, SIGNAL(triggered()), SLOT(cut())); + } action = popup->addAction(QLineEdit::tr("&Copy") + ACCEL_KEY(QKeySequence::Copy)); action->setEnabled(d->control->hasSelectedText() && d->control->echoMode() == QLineEdit::Normal); connect(action, SIGNAL(triggered()), SLOT(copy())); - action = popup->addAction(QLineEdit::tr("&Paste") + ACCEL_KEY(QKeySequence::Paste)); - action->setEnabled(!d->control->isReadOnly() && !QApplication::clipboard()->text().isEmpty()); - connect(action, SIGNAL(triggered()), SLOT(paste())); + if (!isReadOnly()) { + action = popup->addAction(QLineEdit::tr("&Paste") + ACCEL_KEY(QKeySequence::Paste)); + action->setEnabled(!d->control->isReadOnly() && !QApplication::clipboard()->text().isEmpty()); + connect(action, SIGNAL(triggered()), SLOT(paste())); + } #endif - action = popup->addAction(QLineEdit::tr("Delete")); - action->setEnabled(!d->control->isReadOnly() && !d->control->text().isEmpty() && d->control->hasSelectedText()); - connect(action, SIGNAL(triggered()), d->control, SLOT(_q_deleteSelected())); + if (!isReadOnly()) { + action = popup->addAction(QLineEdit::tr("Delete")); + action->setEnabled(!d->control->isReadOnly() && !d->control->text().isEmpty() && d->control->hasSelectedText()); + connect(action, SIGNAL(triggered()), d->control, SLOT(_q_deleteSelected())); + } - popup->addSeparator(); + if (!popup->isEmpty()) + popup->addSeparator(); action = popup->addAction(QLineEdit::tr("Select All") + ACCEL_KEY(QKeySequence::SelectAll)); action->setEnabled(!d->control->text().isEmpty() && !d->control->allSelected()); diff --git a/src/gui/widgets/qlineedit_p.cpp b/src/gui/widgets/qlineedit_p.cpp index 148da1b33b..d03c0035a2 100644 --- a/src/gui/widgets/qlineedit_p.cpp +++ b/src/gui/widgets/qlineedit_p.cpp @@ -131,12 +131,12 @@ void QLineEditPrivate::init(const QString& txt) Q_Q(QLineEdit); control = new QLineControl(txt); control->setFont(q->font()); - QObject::connect(control, SIGNAL(textChanged(const QString &)), - q, SIGNAL(textChanged(const QString &))); - QObject::connect(control, SIGNAL(textEdited(const QString &)), - q, SLOT(_q_textEdited(const QString &))); - QObject::connect(control, SIGNAL(cursorPositionChanged(int, int)), - q, SLOT(_q_cursorPositionChanged(int, int))); + QObject::connect(control, SIGNAL(textChanged(QString)), + q, SIGNAL(textChanged(QString))); + QObject::connect(control, SIGNAL(textEdited(QString)), + q, SLOT(_q_textEdited(QString))); + QObject::connect(control, SIGNAL(cursorPositionChanged(int,int)), + q, SLOT(_q_cursorPositionChanged(int,int))); QObject::connect(control, SIGNAL(selectionChanged()), q, SIGNAL(selectionChanged())); QObject::connect(control, SIGNAL(accepted()), @@ -147,17 +147,17 @@ void QLineEditPrivate::init(const QString& txt) QObject::connect(control, SIGNAL(editFocusChange(bool)), q, SLOT(_q_editFocusChange(bool))); #endif - QObject::connect(control, SIGNAL(cursorPositionChanged(int, int)), + QObject::connect(control, SIGNAL(cursorPositionChanged(int,int)), q, SLOT(updateMicroFocus())); // for now, going completely overboard with updates. QObject::connect(control, SIGNAL(selectionChanged()), q, SLOT(update())); - QObject::connect(control, SIGNAL(displayTextChanged(const QString &)), + QObject::connect(control, SIGNAL(displayTextChanged(QString)), q, SLOT(update())); - QObject::connect(control, SIGNAL(updateNeeded(const QRect &)), + QObject::connect(control, SIGNAL(updateNeeded(QRect)), q, SLOT(update())); QStyleOptionFrameV2 opt; diff --git a/src/gui/widgets/qmdiarea.cpp b/src/gui/widgets/qmdiarea.cpp index 60c5d7b86c..f3dbe34527 100644 --- a/src/gui/widgets/qmdiarea.cpp +++ b/src/gui/widgets/qmdiarea.cpp @@ -841,8 +841,8 @@ void QMdiAreaPrivate::appendChild(QMdiSubWindow *child) child->installEventFilter(q); QObject::connect(child, SIGNAL(aboutToActivate()), q, SLOT(_q_deactivateAllWindows())); - QObject::connect(child, SIGNAL(windowStateChanged(Qt::WindowStates, Qt::WindowStates)), - q, SLOT(_q_processWindowStateChanged(Qt::WindowStates, Qt::WindowStates))); + QObject::connect(child, SIGNAL(windowStateChanged(Qt::WindowStates,Qt::WindowStates)), + q, SLOT(_q_processWindowStateChanged(Qt::WindowStates,Qt::WindowStates))); } /*! @@ -1947,8 +1947,10 @@ QMdiSubWindow *QMdiArea::addSubWindow(QWidget *widget, Qt::WindowFlags windowFla /*! Removes \a widget from the MDI area. The \a widget must be either a QMdiSubWindow or a widget that is the internal widget of - a subwindow. Note that the subwindow is not deleted by QMdiArea - and that its parent is set to 0. + a subwindow. Note \a widget is never actually deleted by QMdiArea. + If a QMdiSubWindow is passed in its parent is set to 0 and it is + removed, but if an internal widget is passed in the child widget + is set to 0 but the QMdiSubWindow is not removed. \sa addSubWindow() */ diff --git a/src/gui/widgets/qmdisubwindow.cpp b/src/gui/widgets/qmdisubwindow.cpp index b5e28da90d..350f857925 100644 --- a/src/gui/widgets/qmdisubwindow.cpp +++ b/src/gui/widgets/qmdisubwindow.cpp @@ -2268,8 +2268,8 @@ QMdiSubWindow::QMdiSubWindow(QWidget *parent, Qt::WindowFlags flags) else d->menuIcon = windowIcon(); #endif - connect(qApp, SIGNAL(focusChanged(QWidget *, QWidget *)), - this, SLOT(_q_processFocusChanged(QWidget *, QWidget *))); + connect(qApp, SIGNAL(focusChanged(QWidget*,QWidget*)), + this, SLOT(_q_processFocusChanged(QWidget*,QWidget*))); } /*! diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp index fc88d06600..761a0609e0 100644 --- a/src/gui/widgets/qmenu.cpp +++ b/src/gui/widgets/qmenu.cpp @@ -654,6 +654,24 @@ void QMenuPrivate::_q_overrideMenuActionDestroyed() menuAction=defaultMenuAction; } + +void QMenuPrivate::updateLayoutDirection() +{ + Q_Q(QMenu); + //we need to mimic the cause of the popup's layout direction + //to allow setting it on a mainwindow for example + //we call setLayoutDirection_helper to not overwrite a user-defined value + if (!q->testAttribute(Qt::WA_SetLayoutDirection)) { + if (QWidget *w = causedPopup.widget) + setLayoutDirection_helper(w->layoutDirection()); + else if (QWidget *w = q->parentWidget()) + setLayoutDirection_helper(w->layoutDirection()); + else + setLayoutDirection_helper(QApplication::layoutDirection()); + } +} + + /*! Returns the action associated with this menu. */ @@ -1797,6 +1815,7 @@ void QMenu::popup(const QPoint &p, QAction *atAction) d->tearoffHighlighted = 0; d->motions = 0; d->doChildEffects = true; + d->updateLayoutDirection(); #ifndef QT_NO_MENUBAR // if this menu is part of a chain attached to a QMenuBar, set the @@ -2347,6 +2366,9 @@ QMenu::event(QEvent *e) { Q_D(QMenu); switch (e->type()) { + case QEvent::Polish: + d->updateLayoutDirection(); + break; case QEvent::ShortcutOverride: { QKeyEvent *kev = static_cast<QKeyEvent*>(e); if (kev->key() == Qt::Key_Up || kev->key() == Qt::Key_Down diff --git a/src/gui/widgets/qmenu_mac.mm b/src/gui/widgets/qmenu_mac.mm index 9510cc666d..30bbd31835 100644 --- a/src/gui/widgets/qmenu_mac.mm +++ b/src/gui/widgets/qmenu_mac.mm @@ -763,7 +763,9 @@ QMacMenuAction::~QMacMenuAction() { #ifdef QT_MAC_USE_COCOA [menu release]; - if (action) { + // Update the menu item if this action still owns it. For some items + // (like 'Quit') ownership will be transferred between all menu bars... + if (action && action.data() == reinterpret_cast<QAction *>([menuItem tag])) { QAction::MenuRole role = action->menuRole(); // Check if the item is owned by Qt, and should be hidden to keep it from causing // problems. Do it for everything but the quit menu item since that should always @@ -774,8 +776,8 @@ QMacMenuAction::~QMacMenuAction() && menuItem != [getMenuLoader() quitMenuItem]) { [menuItem setHidden:YES]; } + [menuItem setTag:nil]; } - [menuItem setTag:nil]; [menuItem release]; #endif } diff --git a/src/gui/widgets/qmenu_p.h b/src/gui/widgets/qmenu_p.h index c021063309..5757885922 100644 --- a/src/gui/widgets/qmenu_p.h +++ b/src/gui/widgets/qmenu_p.h @@ -292,6 +292,9 @@ public: bool hasMouseMoved(const QPoint &globalPos); + void updateLayoutDirection(); + + //menu fading/scrolling effects bool doChildEffects; diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp index b1ff662cb0..599f15bde9 100644 --- a/src/gui/widgets/qmenubar.cpp +++ b/src/gui/widgets/qmenubar.cpp @@ -736,6 +736,9 @@ void QMenuBarPrivate::init() if(wce_menubar) q->hide(); } + else { + QApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, true); + } #endif #ifdef Q_WS_S60 symbianCreateMenuBar(q->parentWidget()); @@ -1486,7 +1489,8 @@ bool QMenuBar::event(QEvent *e) break; case QEvent::ShortcutOverride: { QKeyEvent *kev = static_cast<QKeyEvent*>(e); - if (kev->key() == Qt::Key_Escape) { + //we only filter out escape if there is a current action + if (kev->key() == Qt::Key_Escape && d->currentAction) { e->accept(); return true; } @@ -1934,7 +1938,7 @@ void QMenuBar::setDefaultAction(QAction *act) if (qt_wince_is_mobile()) if (d->defaultAction) { disconnect(d->defaultAction, SIGNAL(changed()), this, SLOT(_q_updateDefaultAction())); - disconnect(d->defaultAction, SIGNAL(destroyed ()), this, SLOT(_q_updateDefaultAction())); + disconnect(d->defaultAction, SIGNAL(destroyed()), this, SLOT(_q_updateDefaultAction())); } #endif d->defaultAction = act; diff --git a/src/gui/widgets/qsizegrip.cpp b/src/gui/widgets/qsizegrip.cpp index cf193dc118..6575dbba51 100644 --- a/src/gui/widgets/qsizegrip.cpp +++ b/src/gui/widgets/qsizegrip.cpp @@ -99,6 +99,7 @@ public: int dyMax; Qt::Corner m_corner; bool gotMousePress; + QWidget *tlw; #ifdef Q_WS_MAC void updateMacSizer(bool hide) const; #endif @@ -113,6 +114,19 @@ public: return m_corner == Qt::BottomLeftCorner || m_corner == Qt::TopLeftCorner; } + void updateTopLevelWidget() + { + Q_Q(QSizeGrip); + QWidget *w = qt_sizegrip_topLevelWidget(q); + if (tlw == w) + return; + if (tlw) + tlw->removeEventFilter(q); + tlw = w; + if (tlw) + tlw->installEventFilter(q); + } + // This slot is invoked by QLayout when the size grip is added to // a layout or reparented after the tlw is shown. This re-implementation is basically // the same as QWidgetPrivate::_q_showIfNotHidden except that it checks @@ -121,7 +135,7 @@ public: { Q_Q(QSizeGrip); bool showSizeGrip = !(q->isHidden() && q->testAttribute(Qt::WA_WState_ExplicitShowHide)); - QWidget *tlw = qt_sizegrip_topLevelWidget(q); + updateTopLevelWidget(); if (tlw && showSizeGrip) { Qt::WindowStates sizeGripNotVisibleState = Qt::WindowFullScreen; #ifndef Q_WS_MAC @@ -232,6 +246,7 @@ void QSizeGripPrivate::init() Q_Q(QSizeGrip); dxMax = 0; dyMax = 0; + tlw = 0; m_corner = q->isLeftToRight() ? Qt::BottomRightCorner : Qt::BottomLeftCorner; gotMousePress = false; @@ -240,8 +255,7 @@ void QSizeGripPrivate::init() ? Qt::SizeFDiagCursor : Qt::SizeBDiagCursor); #endif q->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed)); - QWidget *tlw = qt_sizegrip_topLevelWidget(q); - tlw->installEventFilter(q); + updateTopLevelWidget(); } @@ -524,19 +538,18 @@ void QSizeGrip::setVisible(bool visible) /*! \reimp */ bool QSizeGrip::eventFilter(QObject *o, QEvent *e) { + Q_D(QSizeGrip); if ((isHidden() && testAttribute(Qt::WA_WState_ExplicitShowHide)) - || e->type() != QEvent::WindowStateChange) { + || e->type() != QEvent::WindowStateChange + || o != d->tlw) { return QWidget::eventFilter(o, e); } - QWidget *tlw = qt_sizegrip_topLevelWidget(this); - if (o != tlw) - return QWidget::eventFilter(o, e); Qt::WindowStates sizeGripNotVisibleState = Qt::WindowFullScreen; #ifndef Q_WS_MAC sizeGripNotVisibleState |= Qt::WindowMaximized; #endif // Don't show the size grip if the tlw is maximized or in full screen mode. - setVisible(!(tlw->windowState() & sizeGripNotVisibleState)); + setVisible(!(d->tlw->windowState() & sizeGripNotVisibleState)); setAttribute(Qt::WA_WState_ExplicitShowHide, false); return QWidget::eventFilter(o, e); } diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp index 3935c55626..8ef6017924 100644 --- a/src/gui/widgets/qtabbar.cpp +++ b/src/gui/widgets/qtabbar.cpp @@ -1948,7 +1948,8 @@ void QTabBar::changeEvent(QEvent *event) Q_D(QTabBar); if (event->type() == QEvent::StyleChange) { d->elideMode = Qt::TextElideMode(style()->styleHint(QStyle::SH_TabBar_ElideMode, 0, this)); - d->useScrollButtons = !style()->styleHint(QStyle::SH_TabBar_PreferNoArrows, 0, this); + if (!d->useScrollButtonsSetByUser) + d->useScrollButtons = !style()->styleHint(QStyle::SH_TabBar_PreferNoArrows, 0, this); d->refresh(); } else if (event->type() == QEvent::FontChange) { d->refresh(); @@ -2003,6 +2004,7 @@ bool QTabBar::usesScrollButtons() const void QTabBar::setUsesScrollButtons(bool useButtons) { Q_D(QTabBar); + d->useScrollButtonsSetByUser = true; if (d->useScrollButtons == useButtons) return; d->useScrollButtons = useButtons; diff --git a/src/gui/widgets/qtabbar_p.h b/src/gui/widgets/qtabbar_p.h index 9f3285ba1b..2e8fb6d7ab 100644 --- a/src/gui/widgets/qtabbar_p.h +++ b/src/gui/widgets/qtabbar_p.h @@ -75,7 +75,7 @@ class QTabBarPrivate : public QWidgetPrivate public: QTabBarPrivate() :currentIndex(-1), pressedIndex(-1), shape(QTabBar::RoundedNorth), layoutDirty(false), - drawBase(true), scrollOffset(0), expanding(true), closeButtonOnTabs(false), + drawBase(true), scrollOffset(0), useScrollButtonsSetByUser(false) , expanding(true), closeButtonOnTabs(false), selectionBehaviorOnRemove(QTabBar::SelectRightTab), paintWithOffsets(true), movable(false), dragInProgress(false), documentMode(false), movingTab(0) #ifdef Q_WS_MAC @@ -187,6 +187,7 @@ public: QSize iconSize; Qt::TextElideMode elideMode; bool useScrollButtons; + bool useScrollButtonsSetByUser; bool expanding; bool closeButtonOnTabs; diff --git a/src/gui/widgets/qtabwidget.cpp b/src/gui/widgets/qtabwidget.cpp index d22bd54e87..49651a3a64 100644 --- a/src/gui/widgets/qtabwidget.cpp +++ b/src/gui/widgets/qtabwidget.cpp @@ -699,8 +699,8 @@ void QTabWidget::setTabBar(QTabBar* tb) setFocusProxy(d->tabs); connect(d->tabs, SIGNAL(currentChanged(int)), this, SLOT(_q_showTab(int))); - connect(d->tabs, SIGNAL(tabMoved(int, int)), - this, SLOT(_q_tabMoved(int, int))); + connect(d->tabs, SIGNAL(tabMoved(int,int)), + this, SLOT(_q_tabMoved(int,int))); if (d->tabs->tabsClosable()) connect(d->tabs, SIGNAL(tabCloseRequested(int)), this, SIGNAL(tabCloseRequested(int))); diff --git a/src/gui/widgets/qtoolbararealayout_p.h b/src/gui/widgets/qtoolbararealayout_p.h index f0ab80c350..134e95aa38 100644 --- a/src/gui/widgets/qtoolbararealayout_p.h +++ b/src/gui/widgets/qtoolbararealayout_p.h @@ -118,7 +118,7 @@ public: void extendSize(Qt::Orientation o, int extent) { - int newSize = qMax(pick(o, minimumSize()), (preferredSize > 0 ? preferredSize : size) + extent); + int newSize = qMax(pick(o, minimumSize()), (preferredSize > 0 ? preferredSize : pick(o, sizeHint())) + extent); int sizeh = pick(o, sizeHint()); if (newSize == sizeh) { preferredSize = -1; diff --git a/src/network/access/qhttp.cpp b/src/network/access/qhttp.cpp index f006fbadce..7365435fbf 100644 --- a/src/network/access/qhttp.cpp +++ b/src/network/access/qhttp.cpp @@ -3115,14 +3115,14 @@ void QHttpPrivate::setSock(QTcpSocket *sock) QObject::connect(socket, SIGNAL(bytesWritten(qint64)), q, SLOT(_q_slotBytesWritten(qint64))); #ifndef QT_NO_NETWORKPROXY - QObject::connect(socket, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *)), - q, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *))); + QObject::connect(socket, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), + q, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); #endif #ifndef QT_NO_OPENSSL if (qobject_cast<QSslSocket *>(socket)) { - QObject::connect(socket, SIGNAL(sslErrors(const QList<QSslError> &)), - q, SIGNAL(sslErrors(const QList<QSslError> &))); + QObject::connect(socket, SIGNAL(sslErrors(QList<QSslError>)), + q, SIGNAL(sslErrors(QList<QSslError>))); QObject::connect(socket, SIGNAL(encryptedBytesWritten(qint64)), q, SLOT(_q_slotEncryptedBytesWritten(qint64))); } diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index 6962ab3b19..fa89fcc382 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -90,8 +90,8 @@ void QHttpNetworkConnectionChannel::init() this, SLOT(_q_error(QAbstractSocket::SocketError)), Qt::DirectConnection); #ifndef QT_NO_NETWORKPROXY - QObject::connect(socket, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)), - this, SLOT(_q_proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)), + QObject::connect(socket, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), + this, SLOT(_q_proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), Qt::DirectConnection); #endif @@ -102,8 +102,8 @@ void QHttpNetworkConnectionChannel::init() QObject::connect(sslSocket, SIGNAL(encrypted()), this, SLOT(_q_encrypted()), Qt::DirectConnection); - QObject::connect(sslSocket, SIGNAL(sslErrors(const QList<QSslError>&)), - this, SLOT(_q_sslErrors(const QList<QSslError>&)), + QObject::connect(sslSocket, SIGNAL(sslErrors(QList<QSslError>)), + this, SLOT(_q_sslErrors(QList<QSslError>)), Qt::DirectConnection); QObject::connect(sslSocket, SIGNAL(encryptedBytesWritten(qint64)), this, SLOT(_q_encryptedBytesWritten(qint64)), @@ -774,6 +774,8 @@ void QHttpNetworkConnectionChannel::_q_connected() { // improve performance since we get the request sent by the kernel ASAP socket->setSocketOption(QAbstractSocket::LowDelayOption, 1); + // not sure yet if it helps, but it makes sense + socket->setSocketOption(QAbstractSocket::KeepAliveOption, 1); pipeliningSupported = QHttpNetworkConnectionChannel::PipeliningSupportUnknown; diff --git a/src/network/access/qnetworkcookiejar.cpp b/src/network/access/qnetworkcookiejar.cpp index 19f7217fd7..f8261154e5 100644 --- a/src/network/access/qnetworkcookiejar.cpp +++ b/src/network/access/qnetworkcookiejar.cpp @@ -192,9 +192,10 @@ bool QNetworkCookieJar::setCookiesFromUrl(const QList<QNetworkCookie> &cookieLis // validate the cookie & set the defaults if unset if (cookie.path().isEmpty()) cookie.setPath(defaultPath); - else if (!isParentPath(pathAndFileName, cookie.path())) - continue; // not accepted - + // don't do path checking. See http://bugreports.qt.nokia.com/browse/QTBUG-5815 +// else if (!isParentPath(pathAndFileName, cookie.path())) { +// continue; // not accepted +// } if (cookie.domain().isEmpty()) { cookie.setDomain(defaultDomain); } else { diff --git a/src/network/kernel/qnetworkproxy_win.cpp b/src/network/kernel/qnetworkproxy_win.cpp index 6f92424068..0e2dd2bc0f 100644 --- a/src/network/kernel/qnetworkproxy_win.cpp +++ b/src/network/kernel/qnetworkproxy_win.cpp @@ -291,7 +291,10 @@ void QWindowsSystemProxy::init() GlobalFree(ieProxyConfig.lpszAutoConfigUrl); } if (ieProxyConfig.lpszProxy) { - proxyServerList << QString::fromWCharArray(ieProxyConfig.lpszProxy); + // http://msdn.microsoft.com/en-us/library/aa384250%28VS.85%29.aspx speaks only about a "proxy URL", + // not multiple URLs. However we tested this and it can return multiple URLs. So we use splitSpaceSemicolon + // on it. + proxyServerList = splitSpaceSemicolon(QString::fromWCharArray(ieProxyConfig.lpszProxy)); GlobalFree(ieProxyConfig.lpszProxy); } if (ieProxyConfig.lpszProxyBypass) { diff --git a/src/network/socket/qnativesocketengine.cpp b/src/network/socket/qnativesocketengine.cpp index ecf5ad9d82..5d17022d63 100644 --- a/src/network/socket/qnativesocketengine.cpp +++ b/src/network/socket/qnativesocketengine.cpp @@ -876,7 +876,7 @@ bool QNativeSocketEngine::waitForRead(int msecs, bool *timedOut) */ bool QNativeSocketEngine::waitForWrite(int msecs, bool *timedOut) { - Q_D(const QNativeSocketEngine); + Q_D(QNativeSocketEngine); Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::waitForWrite(), false); Q_CHECK_NOT_STATE(QNativeSocketEngine::waitForWrite(), QAbstractSocket::UnconnectedState, false); @@ -893,6 +893,24 @@ bool QNativeSocketEngine::waitForWrite(int msecs, bool *timedOut) setState(QAbstractSocket::ConnectedState); d_func()->fetchConnectionParameters(); return true; + } else { + int value = 0; + int valueSize = sizeof(value); + if (::getsockopt(d->socketDescriptor, SOL_SOCKET, SO_ERROR, (char *) &value, &valueSize) == 0) { + if (value == WSAECONNREFUSED) { + d->setError(QAbstractSocket::ConnectionRefusedError, QNativeSocketEnginePrivate::ConnectionRefusedErrorString); + d->socketState = QAbstractSocket::UnconnectedState; + return false; + } else if (value == WSAETIMEDOUT) { + d->setError(QAbstractSocket::NetworkError, QNativeSocketEnginePrivate::ConnectionTimeOutErrorString); + d->socketState = QAbstractSocket::UnconnectedState; + return false; + } else if (value == WSAEHOSTUNREACH) { + d->setError(QAbstractSocket::NetworkError, QNativeSocketEnginePrivate::HostUnreachableErrorString); + d->socketState = QAbstractSocket::UnconnectedState; + return false; + } + } } #endif @@ -913,7 +931,7 @@ bool QNativeSocketEngine::waitForReadOrWrite(bool *readyToRead, bool *readyToWri bool checkRead, bool checkWrite, int msecs, bool *timedOut) { - Q_D(const QNativeSocketEngine); + Q_D(QNativeSocketEngine); Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::waitForWrite(), false); Q_CHECK_NOT_STATE(QNativeSocketEngine::waitForReadOrWrite(), QAbstractSocket::UnconnectedState, false); @@ -927,6 +945,24 @@ bool QNativeSocketEngine::waitForReadOrWrite(bool *readyToRead, bool *readyToWri setState(QAbstractSocket::ConnectedState); d_func()->fetchConnectionParameters(); return true; + } else { + int value = 0; + int valueSize = sizeof(value); + if (::getsockopt(d->socketDescriptor, SOL_SOCKET, SO_ERROR, (char *) &value, &valueSize) == 0) { + if (value == WSAECONNREFUSED) { + d->setError(QAbstractSocket::ConnectionRefusedError, QNativeSocketEnginePrivate::ConnectionRefusedErrorString); + d->socketState = QAbstractSocket::UnconnectedState; + return false; + } else if (value == WSAETIMEDOUT) { + d->setError(QAbstractSocket::NetworkError, QNativeSocketEnginePrivate::ConnectionTimeOutErrorString); + d->socketState = QAbstractSocket::UnconnectedState; + return false; + } else if (value == WSAEHOSTUNREACH) { + d->setError(QAbstractSocket::NetworkError, QNativeSocketEnginePrivate::HostUnreachableErrorString); + d->socketState = QAbstractSocket::UnconnectedState; + return false; + } + } } #endif if (ret == 0) { diff --git a/src/network/socket/qnativesocketengine_win.cpp b/src/network/socket/qnativesocketengine_win.cpp index 63fe78e7aa..91f930a0bb 100644 --- a/src/network/socket/qnativesocketengine_win.cpp +++ b/src/network/socket/qnativesocketengine_win.cpp @@ -1107,10 +1107,22 @@ int QNativeSocketEnginePrivate::nativeSelect(int timeout, bool selectForRead) co tv.tv_sec = timeout / 1000; tv.tv_usec = (timeout % 1000) * 1000; - if (selectForRead) + if (selectForRead) { ret = select(0, &fds, 0, 0, timeout < 0 ? 0 : &tv); - else - ret = select(0, 0, &fds, 0, timeout < 0 ? 0 : &tv); + } else { + // select for write + + // Windows needs this to report errors when connecting a socket ... + fd_set fdexception; + FD_ZERO(&fdexception); + FD_SET(socketDescriptor, &fdexception); + + ret = select(0, 0, &fds, &fdexception, timeout < 0 ? 0 : &tv); + + // ... but if it is actually set, pretend it did not happen + if (ret > 0 && FD_ISSET(socketDescriptor, &fdexception)) + ret--; + } if (readEnabled) readNotifier->setEnabled(true); @@ -1125,9 +1137,10 @@ int QNativeSocketEnginePrivate::nativeSelect(int timeout, bool readEnabled = checkRead && readNotifier && readNotifier->isEnabled(); if (readEnabled) readNotifier->setEnabled(false); - + fd_set fdread; fd_set fdwrite; + fd_set fdexception; int ret = 0; @@ -1137,9 +1150,13 @@ int QNativeSocketEnginePrivate::nativeSelect(int timeout, fdread.fd_array[0] = socketDescriptor; } memset(&fdwrite, 0, sizeof(fd_set)); + FD_ZERO(&fdexception); if (checkWrite) { fdwrite.fd_count = 1; fdwrite.fd_array[0] = socketDescriptor; + + // Windows needs this to report errors when connecting a socket + FD_SET(socketDescriptor, &fdexception); } struct timeval tv; @@ -1147,10 +1164,15 @@ int QNativeSocketEnginePrivate::nativeSelect(int timeout, tv.tv_usec = (timeout % 1000) * 1000; #if !defined(Q_OS_WINCE) - ret = select(socketDescriptor + 1, &fdread, &fdwrite, 0, timeout < 0 ? 0 : &tv); + ret = select(socketDescriptor + 1, &fdread, &fdwrite, &fdexception, timeout < 0 ? 0 : &tv); #else - ret = select(1, &fdread, &fdwrite, 0, timeout < 0 ? 0 : &tv); + ret = select(1, &fdread, &fdwrite, &fdexception, timeout < 0 ? 0 : &tv); #endif + + //... but if it is actually set, pretend it did not happen + if (ret > 0 && FD_ISSET(socketDescriptor, &fdexception)) + ret--; + if (readEnabled) readNotifier->setEnabled(true); diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 8c5bf0ee01..823f919ddc 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -158,8 +158,8 @@ QGLTextureGlyphCache::QGLTextureGlyphCache(QGLContext *context, QFontEngineGlyph , m_height(0) { glGenFramebuffers(1, &m_fbo); - connect(QGLSignalProxy::instance(), SIGNAL(aboutToDestroyContext(const QGLContext *)), - SLOT(contextDestroyed(const QGLContext *))); + connect(QGLSignalProxy::instance(), SIGNAL(aboutToDestroyContext(const QGLContext*)), + SLOT(contextDestroyed(const QGLContext*))); } QGLTextureGlyphCache::~QGLTextureGlyphCache() diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp index aa6b6c9ac2..8ab17a0f86 100644 --- a/src/opengl/qpaintengine_opengl.cpp +++ b/src/opengl/qpaintengine_opengl.cpp @@ -248,8 +248,8 @@ public: bound(false) { connect(QGLSignalProxy::instance(), - SIGNAL(aboutToDestroyContext(const QGLContext *)), - SLOT(cleanupGLContextRefs(const QGLContext *))); + SIGNAL(aboutToDestroyContext(const QGLContext*)), + SLOT(cleanupGLContextRefs(const QGLContext*))); } inline void setDevice(QPaintDevice *pdev); @@ -525,8 +525,8 @@ public: QGLProgramCache() { // we have to know when a context is deleted so we can free // any program handles it holds - connect(QGLSignalProxy::instance(), SIGNAL(aboutToDestroyContext(const QGLContext *)), - SLOT(cleanupPrograms(const QGLContext *))); + connect(QGLSignalProxy::instance(), SIGNAL(aboutToDestroyContext(const QGLContext*)), + SLOT(cleanupPrograms(const QGLContext*))); } ~QGLProgramCache() { @@ -639,8 +639,8 @@ public: : p(priv) { connect(QGLSignalProxy::instance(), - SIGNAL(aboutToDestroyContext(const QGLContext *)), - SLOT(cleanupGLContextRefs(const QGLContext *))); + SIGNAL(aboutToDestroyContext(const QGLContext*)), + SLOT(cleanupGLContextRefs(const QGLContext*))); } public Q_SLOTS: @@ -1010,8 +1010,8 @@ public: QGLGradientCache() : QObject(), buffer_ctx(0) { connect(QGLSignalProxy::instance(), - SIGNAL(aboutToDestroyContext(const QGLContext *)), - SLOT(cleanupGLContextRefs(const QGLContext *))); + SIGNAL(aboutToDestroyContext(const QGLContext*)), + SLOT(cleanupGLContextRefs(const QGLContext*))); } inline GLuint getBuffer(const QGradient &gradient, qreal opacity, QGLContext *ctx) { @@ -4712,8 +4712,8 @@ void QGLGlyphCache::cacheGlyphs(QGLContext *context, const QTextItemInt &ti, QWidget *widget = static_cast<QWidget *>(context->device()); connect(widget, SIGNAL(destroyed(QObject*)), SLOT(widgetDestroyed(QObject*))); connect(QGLSignalProxy::instance(), - SIGNAL(aboutToDestroyContext(const QGLContext *)), - SLOT(cleanupContext(const QGLContext *))); + SIGNAL(aboutToDestroyContext(const QGLContext*)), + SLOT(cleanupContext(const QGLContext*))); } } else { font_cache = dev_it.value(); diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index f1f597657b..e353f5d4c3 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -374,7 +374,7 @@ void QGLWindowSurface::hijackWindow(QWidget *widget) union { QGLContext **ctxPtr; void **voidPtr; }; - connect(widget, SIGNAL(destroyed(QObject *)), this, SLOT(deleted(QObject *))); + connect(widget, SIGNAL(destroyed(QObject*)), this, SLOT(deleted(QObject*))); voidPtr = &widgetPrivate->extraData()->glContext; d_ptr->contexts << ctxPtr; diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp index 75b7fa5edf..fda4b10400 100644 --- a/src/openvg/qpaintengine_vg.cpp +++ b/src/openvg/qpaintengine_vg.cpp @@ -3407,6 +3407,34 @@ void QVGPaintEngine::restoreState(QPaintEngine::DirtyFlags dirty) #endif } +void QVGPaintEngine::fillRegion + (const QRegion& region, const QColor& color, const QSize& surfaceSize) +{ + Q_D(QVGPaintEngine); + if (d->clearColor != color || d->clearOpacity != 1.0f) { + VGfloat values[4]; + values[0] = color.redF(); + values[1] = color.greenF(); + values[2] = color.blueF(); + values[3] = color.alphaF(); + vgSetfv(VG_CLEAR_COLOR, 4, values); + d->clearColor = color; + d->clearOpacity = 1.0f; + } + if (region.rectCount() == 1) { + QRect r = region.boundingRect(); + vgClear(r.x(), surfaceSize.height() - r.y() - r.height(), + r.width(), r.height()); + } else { + const QVector<QRect> rects = region.rects(); + for (int i = 0; i < rects.size(); ++i) { + QRect r = rects.at(i); + vgClear(r.x(), surfaceSize.height() - r.y() - r.height(), + r.width(), r.height()); + } + } +} + #if !defined(QVG_NO_SINGLE_CONTEXT) && !defined(QT_NO_EGL) QVGCompositionHelper::QVGCompositionHelper() diff --git a/src/openvg/qpaintengine_vg_p.h b/src/openvg/qpaintengine_vg_p.h index 1202b55d43..86a522ac4b 100644 --- a/src/openvg/qpaintengine_vg_p.h +++ b/src/openvg/qpaintengine_vg_p.h @@ -151,6 +151,8 @@ public: QVGPaintEnginePrivate *vgPrivate() { Q_D(QVGPaintEngine); return d; } + void fillRegion(const QRegion& region, const QColor& color, const QSize& surfaceSize); + protected: QVGPaintEngine(QVGPaintEnginePrivate &data); diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp index 3254aa34f6..19c90ed4dc 100644 --- a/src/openvg/qpixmapdata_vg.cpp +++ b/src/openvg/qpixmapdata_vg.cpp @@ -92,7 +92,6 @@ QVGPixmapData::~QVGPixmapData() vgDestroyImage(vgImage); if (vgImageOpacity != VG_INVALID_HANDLE) vgDestroyImage(vgImageOpacity); - } else { #endif } #if !defined(QT_NO_EGL) @@ -202,6 +201,14 @@ QPaintEngine* QVGPixmapData::paintEngine() const return source.paintEngine(); } +// This function works around QImage::bits() making a deep copy if the +// QImage is not const. We force it to be const and then get the bits. +// XXX: Should add a QImage::constBits() in the future to replace this. +static inline const uchar *qt_vg_imageBits(const QImage& image) +{ + return image.bits(); +} + VGImage QVGPixmapData::toVGImage() { if (!isValid()) @@ -213,7 +220,7 @@ VGImage QVGPixmapData::toVGImage() context = qt_vg_create_context(0); #endif - if (recreate) { + if (recreate && prevSize != QSize(w, h)) { if (vgImage != VG_INVALID_HANDLE) { vgDestroyImage(vgImage); vgImage = VG_INVALID_HANDLE; @@ -222,6 +229,8 @@ VGImage QVGPixmapData::toVGImage() vgDestroyImage(vgImageOpacity); vgImageOpacity = VG_INVALID_HANDLE; } + } else if (recreate) { + cachedOpacity = -1.0f; // Force opacity image to be refreshed later. } if (vgImage == VG_INVALID_HANDLE) { @@ -232,11 +241,12 @@ VGImage QVGPixmapData::toVGImage() if (!source.isNull() && recreate) { vgImageSubData (vgImage, - source.bits(), source.bytesPerLine(), + qt_vg_imageBits(source), source.bytesPerLine(), VG_sARGB_8888_PRE, 0, 0, w, h); } recreate = false; + prevSize = QSize(w, h); return vgImage; } @@ -244,43 +254,14 @@ VGImage QVGPixmapData::toVGImage() VGImage QVGPixmapData::toVGImage(qreal opacity) { #if !defined(QT_SHIVAVG) - if (!isValid()) + // Force the primary VG image to be recreated if necessary. + if (toVGImage() == VG_INVALID_HANDLE) return VG_INVALID_HANDLE; -#if !defined(QT_NO_EGL) - // Increase the reference count on the shared context. - if (!context) - context = qt_vg_create_context(0); -#endif - - if (recreate) { - if (vgImage != VG_INVALID_HANDLE) { - vgDestroyImage(vgImage); - vgImage = VG_INVALID_HANDLE; - } - if (vgImageOpacity != VG_INVALID_HANDLE) { - vgDestroyImage(vgImageOpacity); - vgImageOpacity = VG_INVALID_HANDLE; - } - } - - if (vgImage == VG_INVALID_HANDLE) { - vgImage = vgCreateImage - (VG_sARGB_8888_PRE, w, h, VG_IMAGE_QUALITY_FASTER); - } - - if (!source.isNull() && recreate) { - vgImageSubData - (vgImage, - source.bits(), source.bytesPerLine(), - VG_sARGB_8888_PRE, 0, 0, w, h); - } - - recreate = false; - if (opacity == 1.0f) return vgImage; + // Create an alternative image for the selected opacity. if (vgImageOpacity == VG_INVALID_HANDLE || cachedOpacity != opacity) { if (vgImageOpacity == VG_INVALID_HANDLE) { vgImageOpacity = vgCreateImage @@ -405,6 +386,7 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type) vgDestroyImage(vgImageOpacity); vgImageOpacity = VG_INVALID_HANDLE; } + prevSize = QSize(); TInt err = 0; @@ -465,6 +447,7 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type) is_null = (w <= 0 || h <= 0); source = QImage(); recreate = false; + prevSize = QSize(w, h); setSerialNumber(++qt_vg_pixmap_serial); // release stuff eglDestroyImageKHR(context->display(), eglImage); diff --git a/src/openvg/qpixmapdata_vg_p.h b/src/openvg/qpixmapdata_vg_p.h index f6fac88bac..fe19f3566d 100644 --- a/src/openvg/qpixmapdata_vg_p.h +++ b/src/openvg/qpixmapdata_vg_p.h @@ -109,6 +109,7 @@ protected: #endif protected: + QSize prevSize; VGImage vgImage; VGImage vgImageOpacity; qreal cachedOpacity; diff --git a/src/openvg/qwindowsurface_vg.cpp b/src/openvg/qwindowsurface_vg.cpp index f8486a6dd8..a1301e3557 100644 --- a/src/openvg/qwindowsurface_vg.cpp +++ b/src/openvg/qwindowsurface_vg.cpp @@ -48,6 +48,7 @@ #if !defined(QT_NO_EGL) #include <QtGui/private/qegl_p.h> +#include <QtGui/private/qwidget_p.h> QT_BEGIN_NAMESPACE @@ -71,7 +72,6 @@ QVGWindowSurface::~QVGWindowSurface() QPaintDevice *QVGWindowSurface::paintDevice() { - d_ptr->beginPaint(window()); return this; } @@ -94,8 +94,16 @@ bool QVGWindowSurface::scroll(const QRegion &area, int dx, int dy) void QVGWindowSurface::beginPaint(const QRegion ®ion) { - // Nothing to do here. - Q_UNUSED(region); + d_ptr->beginPaint(window()); + + // If the window is not opaque, then fill the region we are about + // to paint with the transparent color. + if (!qt_widget_private(window())->isOpaque && + window()->testAttribute(Qt::WA_TranslucentBackground)) { + QVGPaintEngine *engine = static_cast<QVGPaintEngine *> + (d_ptr->paintEngine()); + engine->fillRegion(region, Qt::transparent, d_ptr->surfaceSize()); + } } void QVGWindowSurface::endPaint(const QRegion ®ion) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp index eb771ba6a4..4cb0184ead 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp @@ -131,8 +131,8 @@ QDirectFBScreenPrivate::QDirectFBScreenPrivate(QDirectFBScreen *qptr) QWSSignalHandler::instance()->addObject(this); #endif #ifdef QT_DIRECTFB_WM - connect(QWSServer::instance(), SIGNAL(windowEvent(QWSWindow*, QWSServer::WindowEvent)), - this, SLOT(onWindowEvent(QWSWindow*, QWSServer::WindowEvent))); + connect(QWSServer::instance(), SIGNAL(windowEvent(QWSWindow*,QWSServer::WindowEvent)), + this, SLOT(onWindowEvent(QWSWindow*,QWSServer::WindowEvent))); #endif } diff --git a/src/plugins/phonon/mmf/mmf.pro b/src/plugins/phonon/mmf/mmf.pro index c070605ad4..854f893c58 100644 --- a/src/plugins/phonon/mmf/mmf.pro +++ b/src/plugins/phonon/mmf/mmf.pro @@ -39,7 +39,7 @@ HEADERS += \ $$PHONON_MMF_DIR/mmf_medianode.h \ $$PHONON_MMF_DIR/mmf_videoplayer.h \ $$PHONON_MMF_DIR/objectdump.h \ - $$PHONON_MMF_DIR/objectdump_global.h \ + $$PHONON_MMF_DIR/objectdump_symbian.h \ $$PHONON_MMF_DIR/objecttree.h \ $$PHONON_MMF_DIR/utils.h \ $$PHONON_MMF_DIR/videooutput.h \ @@ -61,14 +61,12 @@ SOURCES += \ $$PHONON_MMF_DIR/mmf_medianode.cpp \ $$PHONON_MMF_DIR/mmf_videoplayer.cpp \ $$PHONON_MMF_DIR/objectdump.cpp \ + $$PHONON_MMF_DIR/objectdump_symbian.cpp \ $$PHONON_MMF_DIR/objecttree.cpp \ $$PHONON_MMF_DIR/utils.cpp \ $$PHONON_MMF_DIR/videooutput.cpp \ $$PHONON_MMF_DIR/videowidget.cpp -HEADERS += $$PHONON_MMF_DIR/objectdump_symbian.h -SOURCES += $$PHONON_MMF_DIR/objectdump_symbian.cpp - LIBS += -lcone LIBS += -lws32 diff --git a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro index 158633d5b7..9687908ab9 100644 --- a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro +++ b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro @@ -2,6 +2,8 @@ TEMPLATE = subdirs # We just want to export the sqlite3 binaries for Symbian for platforms that do not have them. -!exists($${EPOCROOT}epoc32/release/armv5/lib/sqlite3.dso) { - BLD_INF_RULES.prj_exports += ":zip SQLite3_v9.2.zip" +symbian { + !exists($${EPOCROOT}epoc32/release/armv5/lib/sqlite3.dso) { + BLD_INF_RULES.prj_exports += ":zip SQLite3_v9.2.zip" + } } diff --git a/src/qt3support/dialogs/q3filedialog.cpp b/src/qt3support/dialogs/q3filedialog.cpp index c14ff5c7b7..22bec63d26 100644 --- a/src/qt3support/dialogs/q3filedialog.cpp +++ b/src/qt3support/dialogs/q3filedialog.cpp @@ -116,8 +116,6 @@ QT_BEGIN_NAMESPACE -#ifndef QT_MAC_USE_COCOA - /* XPM */ static const char * const start_xpm[]={ "16 15 8 1", @@ -6053,8 +6051,7 @@ Q3FilePreview::Q3FilePreview() function to provide file previewing. */ -#endif // QT_MAC_USE_COCOA - + QT_END_NAMESPACE #include "moc_q3filedialog.cpp" diff --git a/src/qt3support/dialogs/q3filedialog.h b/src/qt3support/dialogs/q3filedialog.h index 8644b4c046..f6a7950b48 100644 --- a/src/qt3support/dialogs/q3filedialog.h +++ b/src/qt3support/dialogs/q3filedialog.h @@ -69,8 +69,6 @@ class QUrlInfo; #ifndef QT_NO_FILEDIALOG -#ifndef QT_MAC_USE_COCOA - class Q_COMPAT_EXPORT Q3FileIconProvider : public QObject { Q_OBJECT @@ -339,8 +337,6 @@ private: #endif }; -#endif // QT_MAC_USE_COCOA - #endif // QT_NO_FILEDIALOG QT_END_NAMESPACE diff --git a/src/qt3support/dialogs/q3filedialog_mac.cpp b/src/qt3support/dialogs/q3filedialog_mac.cpp index 585fa8f1ed..6c5675b950 100644 --- a/src/qt3support/dialogs/q3filedialog_mac.cpp +++ b/src/qt3support/dialogs/q3filedialog_mac.cpp @@ -56,11 +56,32 @@ #include "qstringlist.h" #include "qtextcodec.h" #include "qdesktopwidget.h" +#include "qfiledialog.h" #include <stdlib.h> QT_BEGIN_NAMESPACE -#ifndef QT_MAC_USE_COCOA +#ifdef QT_MAC_USE_COCOA + +QStringList Q3FileDialog::macGetOpenFileNames(const QString &filter, QString *pwd, + QWidget *parent, const char* /*name*/, + const QString& caption, QString *selectedFilter, + bool /*multi*/, bool /*directory*/) +{ + return QFileDialog::getOpenFileNames(filter, *pwd, parent, 0, + caption); +} + + +QString Q3FileDialog::macGetSaveFileName(const QString &start, const QString &filter, + QString *, QWidget *parent, const char* /*name*/, + const QString& caption, QString *selectedFilter) +{ + return QFileDialog::getSaveFileName(start, filter, parent, 0, + caption, selectedFilter); +} + +#else /***************************************************************************** Externals diff --git a/src/qt3support/other/q3process_unix.cpp b/src/qt3support/other/q3process_unix.cpp index 955b65f642..32a68e025a 100644 --- a/src/qt3support/other/q3process_unix.cpp +++ b/src/qt3support/other/q3process_unix.cpp @@ -249,7 +249,7 @@ int qnx6SocketPairReplacement (int socketFD[2]) { if (errno != EINPROGRESS) { BAILOUT }; // Accept connection - socketFD[0] = accept(tmpSocket, (struct sockaddr *)NULL, (size_t *)NULL); + socketFD[0] = accept(tmpSocket, (struct sockaddr *)NULL, (QT_SOCKLEN_T *)NULL); if(socketFD[0] == -1) { BAILOUT }; // We're done diff --git a/src/s60installs/bwins/QtCoreu.def b/src/s60installs/bwins/QtCoreu.def index 1218b753f6..49c43617de 100644 --- a/src/s60installs/bwins/QtCoreu.def +++ b/src/s60installs/bwins/QtCoreu.def @@ -4387,4 +4387,15 @@ EXPORTS ?QBasicAtomicPointer_isFetchAndAddNative@@YA_NXZ @ 4386 NONAME ; bool QBasicAtomicPointer_isFetchAndAddNative(void) ?QBasicAtomicPointer_isFetchAndStoreNative@@YA_NXZ @ 4387 NONAME ; bool QBasicAtomicPointer_isFetchAndStoreNative(void) ?QBasicAtomicPointer_isTestAndSetNative@@YA_NXZ @ 4388 NONAME ; bool QBasicAtomicPointer_isTestAndSetNative(void) + ??0SignalEvent@QStateMachine@@QAE@PAVQObject@@HABV?$QList@VQVariant@@@@@Z @ 4389 NONAME ; QStateMachine::SignalEvent::SignalEvent(class QObject *, int, class QList<class QVariant> const &) + ??0WrappedEvent@QStateMachine@@QAE@PAVQObject@@PAVQEvent@@@Z @ 4390 NONAME ; QStateMachine::WrappedEvent::WrappedEvent(class QObject *, class QEvent *) + ??1SignalEvent@QStateMachine@@UAE@XZ @ 4391 NONAME ; QStateMachine::SignalEvent::~SignalEvent(void) + ??1WrappedEvent@QStateMachine@@UAE@XZ @ 4392 NONAME ; QStateMachine::WrappedEvent::~WrappedEvent(void) + ??_ESignalEvent@QStateMachine@@UAE@I@Z @ 4393 NONAME ; QStateMachine::SignalEvent::~SignalEvent(unsigned int) + ??_EWrappedEvent@QStateMachine@@UAE@I@Z @ 4394 NONAME ; QStateMachine::WrappedEvent::~WrappedEvent(unsigned int) + ?arguments@SignalEvent@QStateMachine@@QBE?AV?$QList@VQVariant@@@@XZ @ 4395 NONAME ; class QList<class QVariant> QStateMachine::SignalEvent::arguments(void) const + ?event@WrappedEvent@QStateMachine@@QBEPAVQEvent@@XZ @ 4396 NONAME ; class QEvent * QStateMachine::WrappedEvent::event(void) const + ?object@WrappedEvent@QStateMachine@@QBEPAVQObject@@XZ @ 4397 NONAME ; class QObject * QStateMachine::WrappedEvent::object(void) const + ?sender@SignalEvent@QStateMachine@@QBEPAVQObject@@XZ @ 4398 NONAME ; class QObject * QStateMachine::SignalEvent::sender(void) const + ?signalIndex@SignalEvent@QStateMachine@@QBEHXZ @ 4399 NONAME ; int QStateMachine::SignalEvent::signalIndex(void) const diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def index 8a43f21fb6..166b6fec87 100644 --- a/src/s60installs/bwins/QtGuiu.def +++ b/src/s60installs/bwins/QtGuiu.def @@ -12514,4 +12514,7 @@ EXPORTS ?app_compile_version@QApplicationPrivate@@2HA @ 12513 NONAME ; int QApplicationPrivate::app_compile_version ?spacerItemFactoryMethod@QLayoutPrivate@@2P6APAVQSpacerItem@@PBVQLayout@@HHW4Policy@QSizePolicy@@1@ZA @ 12514 NONAME ; class QSpacerItem * (*QLayoutPrivate::spacerItemFactoryMethod)(class QLayout const *, int, int, enum QSizePolicy::Policy, enum QSizePolicy::Policy) ?allWidgets@QWidgetPrivate@@2PAV?$QSet@PAVQWidget@@@@A @ 12515 NONAME ; class QSet<class QWidget *> * QWidgetPrivate::allWidgets + ?effectiveFocusWidget@QWidgetPrivate@@QAEPAVQWidget@@XZ @ 12516 NONAME ; class QWidget * QWidgetPrivate::effectiveFocusWidget(void) + ?ignoreUnusedNavigationEvents@QTextControl@@QBE_NXZ @ 12517 NONAME ; bool QTextControl::ignoreUnusedNavigationEvents(void) const + ?setIgnoreUnusedNavigationEvents@QTextControl@@QAEX_N@Z @ 12518 NONAME ; void QTextControl::setIgnoreUnusedNavigationEvents(bool) diff --git a/src/s60installs/bwins/QtWebKitu.def b/src/s60installs/bwins/QtWebKitu.def index c14abe2c98..e5631f848d 100644 --- a/src/s60installs/bwins/QtWebKitu.def +++ b/src/s60installs/bwins/QtWebKitu.def @@ -361,8 +361,8 @@ EXPORTS ?previousSibling@QWebElement@@QBE?AV1@XZ @ 360 NONAME ; class QWebElement QWebElement::previousSibling(void) const ?print@QWebView@@QBEXPAVQPrinter@@@Z @ 361 NONAME ; void QWebView::print(class QPrinter *) const ?printRequested@QWebPage@@IAEXPAVQWebFrame@@@Z @ 362 NONAME ; void QWebPage::printRequested(class QWebFrame *) - ?printingMaximumShrinkFactor@QWebSettings@@QBEMXZ @ 363 NONAME ; float QWebSettings::printingMaximumShrinkFactor(void) const - ?printingMinimumShrinkFactor@QWebSettings@@QBEMXZ @ 364 NONAME ; float QWebSettings::printingMinimumShrinkFactor(void) const + ?printingMaximumShrinkFactor@QWebSettings@@QBEMXZ @ 363 NONAME ABSENT ; float QWebSettings::printingMaximumShrinkFactor(void) const + ?printingMinimumShrinkFactor@QWebSettings@@QBEMXZ @ 364 NONAME ABSENT ; float QWebSettings::printingMinimumShrinkFactor(void) const ?provisionalLoad@QWebFrame@@IAEXXZ @ 365 NONAME ; void QWebFrame::provisionalLoad(void) ?qWebKitMajorVersion@@YAHXZ @ 366 NONAME ; int qWebKitMajorVersion(void) ?qWebKitMinorVersion@@YAHXZ @ 367 NONAME ; int qWebKitMinorVersion(void) @@ -488,8 +488,8 @@ EXPORTS ?setPluginFactory@QWebPage@@QAEXPAVQWebPluginFactory@@@Z @ 487 NONAME ; void QWebPage::setPluginFactory(class QWebPluginFactory *) ?setPreferredContentsSize@QWebPage@@QBEXABVQSize@@@Z @ 488 NONAME ; void QWebPage::setPreferredContentsSize(class QSize const &) const ?setPreferredPluginForMimeType@QWebPluginDatabase@@QAEXABVQString@@ABVQWebPluginInfo@@@Z @ 489 NONAME ; void QWebPluginDatabase::setPreferredPluginForMimeType(class QString const &, class QWebPluginInfo const &) - ?setPrintingMaximumShrinkFactor@QWebSettings@@QAEXM@Z @ 490 NONAME ; void QWebSettings::setPrintingMaximumShrinkFactor(float) - ?setPrintingMinimumShrinkFactor@QWebSettings@@QAEXM@Z @ 491 NONAME ; void QWebSettings::setPrintingMinimumShrinkFactor(float) + ?setPrintingMaximumShrinkFactor@QWebSettings@@QAEXM@Z @ 490 NONAME ABSENT ; void QWebSettings::setPrintingMaximumShrinkFactor(float) + ?setPrintingMinimumShrinkFactor@QWebSettings@@QAEXM@Z @ 491 NONAME ABSENT ; void QWebSettings::setPrintingMinimumShrinkFactor(float) ?setRenderHint@QWebView@@QAEXW4RenderHint@QPainter@@_N@Z @ 492 NONAME ; void QWebView::setRenderHint(enum QPainter::RenderHint, bool) ?setRenderHints@QWebView@@QAEXV?$QFlags@W4RenderHint@QPainter@@@@@Z @ 493 NONAME ; void QWebView::setRenderHints(class QFlags<enum QPainter::RenderHint>) ?setScrollBarPolicy@QWebFrame@@QAEXW4Orientation@Qt@@W4ScrollBarPolicy@3@@Z @ 494 NONAME ; void QWebFrame::setScrollBarPolicy(enum Qt::Orientation, enum Qt::ScrollBarPolicy) @@ -619,4 +619,5 @@ EXPORTS ?staticMetaObject@QGraphicsWebView@@2UQMetaObject@@B @ 618 NONAME ; struct QMetaObject const QGraphicsWebView::staticMetaObject ?staticMetaObject@QWebPage@@2UQMetaObject@@B @ 619 NONAME ; struct QMetaObject const QWebPage::staticMetaObject ?staticMetaObject@QWebView@@2UQMetaObject@@B @ 620 NONAME ; struct QMetaObject const QWebView::staticMetaObject + ?attributeNames@QWebElement@@QBE?AVQStringList@@ABVQString@@@Z @ 621 NONAME ; class QStringList QWebElement::attributeNames(class QString const &) const diff --git a/src/s60installs/eabi/QtCoreu.def b/src/s60installs/eabi/QtCoreu.def index 99be68e4c8..6a4cdbdf71 100644 --- a/src/s60installs/eabi/QtCoreu.def +++ b/src/s60installs/eabi/QtCoreu.def @@ -3619,4 +3619,18 @@ EXPORTS _ZN15QBasicAtomicInt19isFetchAndAddNativeEv @ 3618 NONAME _ZN15QBasicAtomicInt21isFetchAndStoreNativeEv @ 3619 NONAME _ZN15QBasicAtomicInt25isReferenceCountingNativeEv @ 3620 NONAME + _ZN13QStateMachine11SignalEventC1EP7QObjectiRK5QListI8QVariantE @ 3621 NONAME + _ZN13QStateMachine11SignalEventC2EP7QObjectiRK5QListI8QVariantE @ 3622 NONAME + _ZN13QStateMachine11SignalEventD0Ev @ 3623 NONAME + _ZN13QStateMachine11SignalEventD1Ev @ 3624 NONAME + _ZN13QStateMachine11SignalEventD2Ev @ 3625 NONAME + _ZN13QStateMachine12WrappedEventC1EP7QObjectP6QEvent @ 3626 NONAME + _ZN13QStateMachine12WrappedEventC2EP7QObjectP6QEvent @ 3627 NONAME + _ZN13QStateMachine12WrappedEventD0Ev @ 3628 NONAME + _ZN13QStateMachine12WrappedEventD1Ev @ 3629 NONAME + _ZN13QStateMachine12WrappedEventD2Ev @ 3630 NONAME + _ZTIN13QStateMachine11SignalEventE @ 3631 NONAME + _ZTIN13QStateMachine12WrappedEventE @ 3632 NONAME + _ZTVN13QStateMachine11SignalEventE @ 3633 NONAME + _ZTVN13QStateMachine12WrappedEventE @ 3634 NONAME diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def index 43e291c264..6c45a6ea49 100644 --- a/src/s60installs/eabi/QtGuiu.def +++ b/src/s60installs/eabi/QtGuiu.def @@ -11735,4 +11735,6 @@ EXPORTS _Zls6QDebugP15QGraphicsObject @ 11734 NONAME _Zls6QDebugRK12QStyleOption @ 11735 NONAME _Zls6QDebugRKN12QStyleOption10OptionTypeE @ 11736 NONAME + _ZN12QTextControl31setIgnoreUnusedNavigationEventsEb @ 11737 NONAME + _ZNK12QTextControl28ignoreUnusedNavigationEventsEv @ 11738 NONAME diff --git a/src/s60installs/eabi/QtWebKitu.def b/src/s60installs/eabi/QtWebKitu.def index 88343c16b1..4aad884f1d 100644 --- a/src/s60installs/eabi/QtWebKitu.def +++ b/src/s60installs/eabi/QtWebKitu.def @@ -654,8 +654,8 @@ EXPORTS _Z34qt_drt_resetOriginAccessWhiteListsv @ 653 NONAME _ZN11QWebElement17removeAllChildrenEv @ 654 NONAME _ZN11QWebElement6renderEP8QPainter @ 655 NONAME - _ZN12QWebSettings30setPrintingMaximumShrinkFactorEf @ 656 NONAME - _ZN12QWebSettings30setPrintingMinimumShrinkFactorEf @ 657 NONAME + _ZN12QWebSettings30setPrintingMaximumShrinkFactorEf @ 656 NONAME ABSENT + _ZN12QWebSettings30setPrintingMinimumShrinkFactorEf @ 657 NONAME ABSENT _ZN16QGraphicsWebView10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 658 NONAME _ZN16QGraphicsWebView11linkClickedERK4QUrl @ 659 NONAME _ZN16QGraphicsWebView12loadFinishedEb @ 660 NONAME @@ -674,8 +674,8 @@ EXPORTS _ZN21QWebElementCollectionD2Ev @ 673 NONAME _ZN21QWebElementCollectionaSERKS_ @ 674 NONAME _ZN9QWebFrame6renderEP8QPainterNS_11RenderLayerERK7QRegion @ 675 NONAME - _ZNK12QWebSettings27printingMaximumShrinkFactorEv @ 676 NONAME - _ZNK12QWebSettings27printingMinimumShrinkFactorEv @ 677 NONAME + _ZNK12QWebSettings27printingMaximumShrinkFactorEv @ 676 NONAME ABSENT + _ZNK12QWebSettings27printingMinimumShrinkFactorEv @ 677 NONAME ABSENT _ZNK16QGraphicsWebView10isModifiedEv @ 678 NONAME _ZNK16QGraphicsWebView10pageActionEN8QWebPage9WebActionE @ 679 NONAME _ZNK16QGraphicsWebView16inputMethodQueryEN2Qt16InputMethodQueryE @ 680 NONAME @@ -689,4 +689,5 @@ EXPORTS _ZThn16_NK16QGraphicsWebView8sizeHintEN2Qt8SizeHintERK6QSizeF @ 688 NONAME _ZThn8_N16QGraphicsWebView10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 689 NONAME _ZThn8_NK16QGraphicsWebView16inputMethodQueryEN2Qt16InputMethodQueryE @ 690 NONAME + _ZNK11QWebElement14attributeNamesERK7QString @ 691 NONAME diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index d519102c02..dc0e0d0b8d 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -776,7 +776,11 @@ QScriptEnginePrivate::QScriptEnginePrivate() qMetaTypeId<QObjectList>(); #endif - JSC::initializeThreading(); // ### hmmm + if (!QCoreApplication::instance()) { + qFatal("QScriptEngine: Must construct a Q(Core)Application before a QScriptEngine"); + return; + } + JSC::initializeThreading(); globalData = JSC::JSGlobalData::create().releaseRef(); globalData->clientData = new QScript::GlobalClientData(this); @@ -1302,7 +1306,7 @@ QScript::QObjectData *QScriptEnginePrivate::qobjectData(QObject *object) QScript::QObjectData *data = new QScript::QObjectData(this); m_qobjectData.insert(object, data); QObject::connect(object, SIGNAL(destroyed(QObject*)), - q_func(), SLOT(_q_objectDestroyed(QObject *))); + q_func(), SLOT(_q_objectDestroyed(QObject*))); return data; } diff --git a/src/script/api/qscriptengineagent.cpp b/src/script/api/qscriptengineagent.cpp index e7998b7d88..a2af514a73 100644 --- a/src/script/api/qscriptengineagent.cpp +++ b/src/script/api/qscriptengineagent.cpp @@ -154,7 +154,10 @@ void QScriptEngineAgentPrivate::exceptionCatch(const JSC::DebuggerCallFrame& fra void QScriptEngineAgentPrivate::atStatement(const JSC::DebuggerCallFrame& frame, intptr_t sourceID, int lineno, int column) { QScript::UStringSourceProviderWithFeedback *source = engine->loadedScripts.value(sourceID); - Q_ASSERT(source != 0); + if (!source) { + // QTBUG-6108: We don't have the source for this script, so ignore. + return; + } column = source->columnNumberFromOffset(column); JSC::CallFrame *oldFrame = engine->currentFrame; int oldAgentLineNumber = engine->agentLineNumber; @@ -183,7 +186,10 @@ void QScriptEngineAgentPrivate::didReachBreakpoint(const JSC::DebuggerCallFrame& { if (q_ptr->supportsExtension(QScriptEngineAgent::DebuggerInvocationRequest)) { QScript::UStringSourceProviderWithFeedback *source = engine->loadedScripts.value(sourceID); - Q_ASSERT(source != 0); + if (!source) { + // QTBUG-6108: We don't have the source for this script, so ignore. + return; + } column = source->columnNumberFromOffset(column); JSC::CallFrame *oldFrame = engine->currentFrame; int oldAgentLineNumber = engine->agentLineNumber; diff --git a/src/scripttools/debugging/qscriptdebuggercodefinderwidget.cpp b/src/scripttools/debugging/qscriptdebuggercodefinderwidget.cpp index 8ed0aaa2a8..e25bb046f9 100644 --- a/src/scripttools/debugging/qscriptdebuggercodefinderwidget.cpp +++ b/src/scripttools/debugging/qscriptdebuggercodefinderwidget.cpp @@ -143,7 +143,7 @@ QScriptDebuggerCodeFinderWidget::QScriptDebuggerCodeFinderWidget(QWidget *parent d->editFind = new QLineEdit(this); d->editFind->setMinimumSize(QSize(150, 0)); - connect(d->editFind, SIGNAL(textChanged(const QString&)), + connect(d->editFind, SIGNAL(textChanged(QString)), this, SLOT(_q_updateButtons())); connect(d->editFind, SIGNAL(returnPressed()), this, SLOT(_q_next())); diff --git a/src/scripttools/debugging/qscriptedit.cpp b/src/scripttools/debugging/qscriptedit.cpp index 7f0a5e0cea..67d82a308a 100644 --- a/src/scripttools/debugging/qscriptedit.cpp +++ b/src/scripttools/debugging/qscriptedit.cpp @@ -110,8 +110,8 @@ QScriptEdit::QScriptEdit(QWidget *parent) QObject::connect(this, SIGNAL(blockCountChanged(int)), this, SLOT(updateExtraAreaWidth())); - QObject::connect(this, SIGNAL(updateRequest(const QRect &, int)), - this, SLOT(updateExtraArea(const QRect &, int))); + QObject::connect(this, SIGNAL(updateRequest(QRect,int)), + this, SLOT(updateExtraArea(QRect,int))); QObject::connect(this, SIGNAL(cursorPositionChanged()), this, SLOT(highlightCurrentLine())); diff --git a/src/sql/drivers/mysql/qsql_mysql.cpp b/src/sql/drivers/mysql/qsql_mysql.cpp index f368d1d739..b74babcd36 100644 --- a/src/sql/drivers/mysql/qsql_mysql.cpp +++ b/src/sql/drivers/mysql/qsql_mysql.cpp @@ -509,15 +509,24 @@ bool QMYSQLResult::fetchNext() return false; if (d->preparedQuery) { #if MYSQL_VERSION_ID >= 40108 - if (mysql_stmt_fetch(d->stmt)) + int nRC = mysql_stmt_fetch(d->stmt); + if (nRC) { +#ifdef MYSQL_DATA_TRUNCATED + if (nRC == 1 || nRC == MYSQL_DATA_TRUNCATED) +#else + if (nRC == 1) +#endif // MYSQL_DATA_TRUNCATED + setLastError(qMakeStmtError(QCoreApplication::translate("QMYSQLResult", + "Unable to fetch data"), QSqlError::StatementError, d->stmt)); return false; + } #else return false; #endif } else { - d->row = mysql_fetch_row(d->result); - if (!d->row) - return false; + d->row = mysql_fetch_row(d->result); + if (!d->row) + return false; } setAt(at() + 1); return true; @@ -1365,7 +1374,6 @@ QStringList QMYSQLDriver::tables(QSql::TableType type) const QSqlIndex QMYSQLDriver::primaryIndex(const QString& tablename) const { QSqlIndex idx; - bool prepQ; if (!isOpen()) return idx; diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro index 722981cbce..0dbb90f2c7 100644 --- a/src/tools/bootstrap/bootstrap.pro +++ b/src/tools/bootstrap/bootstrap.pro @@ -30,8 +30,7 @@ win32:DEFINES += QT_NODLL INCLUDEPATH += $$QT_BUILD_TREE/include \ $$QT_BUILD_TREE/include/QtCore \ - $$QT_BUILD_TREE/include/QtXml \ - $$QT_BUILD_TREE/src/corelib/global # qlibraryinfo.cpp includes qconfig.cpp + $$QT_BUILD_TREE/include/QtXml DEPENDPATH += $$INCLUDEPATH \ ../../corelib/global \ @@ -49,7 +48,6 @@ SOURCES += \ ../../corelib/codecs/qtsciicodec.cpp \ ../../corelib/codecs/qutfcodec.cpp \ ../../corelib/global/qglobal.cpp \ - ../../corelib/global/qlibraryinfo.cpp \ ../../corelib/global/qmalloc.cpp \ ../../corelib/global/qnumeric.cpp \ ../../corelib/io/qabstractfileengine.cpp \ @@ -65,7 +63,6 @@ SOURCES += \ ../../corelib/io/qtemporaryfile.cpp \ ../../corelib/io/qtextstream.cpp \ ../../corelib/io/qurl.cpp \ - ../../corelib/io/qsettings.cpp \ ../../corelib/kernel/qmetatype.cpp \ ../../corelib/kernel/qvariant.cpp \ ../../corelib/tools/qbitarray.cpp \ @@ -90,12 +87,11 @@ unix:SOURCES += ../../corelib/io/qfsfileengine_unix.cpp \ ../../corelib/io/qfsfileengine_iterator_unix.cpp win32:SOURCES += ../../corelib/io/qfsfileengine_win.cpp \ - ../../corelib/io/qfsfileengine_iterator_win.cpp \ - ../../corelib/io/qsettings_win.cpp + ../../corelib/io/qfsfileengine_iterator_win.cpp macx: { QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4 #enables weak linking for 10.4 (exported) - SOURCES += ../../corelib/kernel/qcore_mac.cpp ../../corelib/io/qsettings_mac.cpp + SOURCES += ../../corelib/kernel/qcore_mac.cpp LIBS += -framework CoreServices } diff --git a/src/tools/uic/cpp/cppwriteinitialization.cpp b/src/tools/uic/cpp/cppwriteinitialization.cpp index b2e8f4f06a..88dfa98057 100644 --- a/src/tools/uic/cpp/cppwriteinitialization.cpp +++ b/src/tools/uic/cpp/cppwriteinitialization.cpp @@ -2709,11 +2709,11 @@ void WriteInitialization::acceptConnection(DomConnection *connection) m_output << m_indent << "QObject::connect(" << sender << ", " - << "SIGNAL(" << connection->elementSignal() << ')' + << "SIGNAL("<<connection->elementSignal()<<')' << ", " << receiver << ", " - << "SLOT(" << connection->elementSlot() << ')' + << "SLOT("<<connection->elementSlot()<<')' << ");\n"; } diff --git a/src/xmlpatterns/api/qxmlschema.cpp b/src/xmlpatterns/api/qxmlschema.cpp index 287cf11532..ee92195b18 100644 --- a/src/xmlpatterns/api/qxmlschema.cpp +++ b/src/xmlpatterns/api/qxmlschema.cpp @@ -65,6 +65,11 @@ QT_BEGIN_NAMESPACE \snippet doc/src/snippets/qxmlschema/main.cpp 0 + \section1 XML Schema Version + + This class is used to represent schemas that conform to the \l{XML Schema} 1.0 + specification. + \sa QXmlSchemaValidator, {xmlpatterns/schema}{XML Schema Validation Example} */ diff --git a/src/xmlpatterns/api/qxmlschemavalidator.cpp b/src/xmlpatterns/api/qxmlschemavalidator.cpp index 11e0417650..682d34f43e 100644 --- a/src/xmlpatterns/api/qxmlschemavalidator.cpp +++ b/src/xmlpatterns/api/qxmlschemavalidator.cpp @@ -71,6 +71,11 @@ QT_BEGIN_NAMESPACE \snippet doc/src/snippets/qxmlschemavalidator/main.cpp 3 + \section1 XML Schema Version + + This class implements schema validation according to the \l{XML Schema} 1.0 + specification. + \sa QXmlSchema, {xmlpatterns/schema}{XML Schema Validation Example} */ diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index da1f7ca937..d5d72a7352 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -59,9 +59,15 @@ Q3SUBDIRS += \ q3toolbar \ q3urloperator \ q3valuelist \ - q3valuevector + q3valuevector \ + q3combobox \ + q3frame \ + q3uridrag \ + q3widgetstack SUBDIRS += \ +# exceptionsafety_objects \ shouldn't enable it + languagechange \ collections \ exceptionsafety \ mediaobject \ @@ -403,8 +409,55 @@ SUBDIRS += \ symbols \ qrand \ utf8 \ - gestures - + gestures \ + qabstractnetworkcache \ + qabstractproxymodel \ + qbytearraymatcher \ + qcalendarwidget \ + qcolumnview \ + qcommandlinkbutton \ + qdbuscontext \ + qdbusserver \ + qdbusservicewatcher \ + qdiriterator \ + qeasingcurve \ + qfileiconprovider \ + qformlayout \ + q_func_info \ + qfuture \ + qfuturewatcher \ + qguard \ + qhttpsocketengine \ + qinputcontext \ + qlocalsocket \ + qmacstyle \ + qmargins \ + qnetworkaddressentry \ + qnetworkcachemetadata \ + qnetworkdiskcache \ + qobjectperformance \ + qpainterpathstroker \ + qplugin \ + qpluginloader \ + qscrollbar \ + qsharedmemory \ + qsidebar \ + qsizegrip \ + qsoftkeymanager \ + qsqldriver \ + qsystemsemaphore \ + qtconcurrentfilter \ + qtconcurrentiteratekernel \ + qtconcurrentmap \ + qtconcurrentrun \ + qtconcurrentthreadengine \ + qthreadpool \ + qtokenautomaton \ + qtouchevent \ + qwidget_window \ + rcc \ + windowsmobile + !wince*:SUBDIRS += $$Q3SUBDIRS contains(QT_CONFIG, OdfWriter):SUBDIRS += qzip qtextodfwriter diff --git a/tests/auto/guiapplauncher/guiapplauncher.pro b/tests/auto/guiapplauncher/guiapplauncher.pro index 27c3553a2c..2f81061545 100644 --- a/tests/auto/guiapplauncher/guiapplauncher.pro +++ b/tests/auto/guiapplauncher/guiapplauncher.pro @@ -14,7 +14,5 @@ SOURCES += tst_guiapplauncher.cpp \ windowmanager.cpp HEADERS += windowmanager.h -win32 { - # process enumeration,etc. - LIBS+=user32.lib -} +# process enumeration,etc. +win32:LIBS+=-luser32 diff --git a/tests/auto/linguist/lupdate/testdata/good/codecforsrc/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecforsrc/main.cpp index 158451afc2..d99723e785 100644 --- a/tests/auto/linguist/lupdate/testdata/good/codecforsrc/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/codecforsrc/main.cpp @@ -47,12 +47,21 @@ int main(int argc, char **argv) { QApplication a(argc, argv); + QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8")); + QWidget w; QLabel label1(QObject::tr("abc", "ascii"), &w); QLabel label2(QObject::tr("æøå", "utf-8"), &w); + QLabel label2a(QObject::tr("\303\246\303\270\303\245", "utf-8 oct"), &w); + QLabel label3(QObject::trUtf8("Für Élise", "trUtf8"), &w); + QLabel label3a(QObject::trUtf8("F\303\274r \303\211lise", "trUtf8 oct"), &w); -// I would expect the following to work !? -// QLabel label3(QObject::trUtf8("F\374r \310lise", "trUtf8"), &w); + QBoxLayout *ly = new QVBoxLayout(&w); + ly->addWidget(&label1); + ly->addWidget(&label2); + ly->addWidget(&label2a); + ly->addWidget(&label3); + ly->addWidget(&label3a); w.show(); return a.exec(); diff --git a/tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.ts.result index bc0d9bbc24..711bf025af 100644 --- a/tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.ts.result @@ -5,16 +5,34 @@ <context> <name>QObject</name> <message> - <location filename="main.cpp" line="51"/> + <location filename="main.cpp" line="53"/> <source>abc</source> <comment>ascii</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="52"/> + <location filename="main.cpp" line="54"/> <source>æøå</source> <comment>utf-8</comment> <translation type="unfinished"></translation> </message> + <message> + <location filename="main.cpp" line="55"/> + <source>æøå</source> + <comment>utf-8 oct</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="main.cpp" line="56"/> + <source>Für Élise</source> + <comment>trUtf8</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="main.cpp" line="57"/> + <source>Für Élise</source> + <comment>trUtf8 oct</comment> + <translation type="unfinished"></translation> + </message> </context> </TS> diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecfortr/project.ts.result index 91da7449be..6ee369a788 100644 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr/project.ts.result @@ -6,7 +6,7 @@ <name>QObject</name> <message> <location filename="main.cpp" line="61"/> - <source>Ã</source> + <source>Б</source> <translation type="unfinished"></translation> </message> </context> diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr1/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecfortr1/main.cpp index abb8b89011..98b491c497 100644 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr1/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr1/main.cpp @@ -49,9 +49,11 @@ public: void doFoo() { tr("random ascii only"); - tr("this contains an umlaut ü ü"); + tr("this contains an umlaut ü ü literally"); + tr("this contains an umlaut \xfc ü escaped"); trUtf8("random ascii only in utf8"); - trUtf8("umlaut \xfc ü in utf8"); + trUtf8("umlaut ü ü in literal utf8"); + trUtf8("umlaut \303\274 ü in escaped utf8"); } }; diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr1/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecfortr1/project.ts.result index 26eb245174..d548e2465d 100644 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr1/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr1/project.ts.result @@ -11,17 +11,27 @@ </message> <message> <location filename="main.cpp" line="52"/> - <source>this contains an umlaut ü &uuml;</source> + <source>this contains an umlaut ü &uuml; literally</source> <translation type="unfinished"></translation> </message> <message> <location filename="main.cpp" line="53"/> + <source>this contains an umlaut ü &uuml; escaped</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="main.cpp" line="54"/> <source>random ascii only in utf8</source> <translation type="unfinished"></translation> </message> <message utf8="true"> - <location filename="main.cpp" line="54"/> - <source>umlaut ü &uuml; in utf8</source> + <location filename="main.cpp" line="55"/> + <source>umlaut ü &uuml; in literal utf8</source> + <translation type="unfinished"></translation> + </message> + <message utf8="true"> + <location filename="main.cpp" line="56"/> + <source>umlaut ü &uuml; in escaped utf8</source> <translation type="unfinished"></translation> </message> </context> diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr2/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecfortr2/main.cpp index abb8b89011..cd93539ec2 100644 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr2/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr2/main.cpp @@ -49,9 +49,10 @@ public: void doFoo() { tr("random ascii only"); - tr("this contains an umlaut ü ü"); + tr("this contains an umlaut ü ü literally"); + tr("this contains an umlaut \303\274 ü escaped, really in utf-8"); trUtf8("random ascii only in utf8"); - trUtf8("umlaut \xfc ü in utf8"); + trUtf8("umlaut \303\274 ü in escaped utf8"); } }; diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr2/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecfortr2/project.ts.result index e27c157e3d..6728a256bd 100644 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr2/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr2/project.ts.result @@ -11,17 +11,22 @@ </message> <message> <location filename="main.cpp" line="52"/> - <source>this contains an umlaut ü &uuml;</source> + <source>this contains an umlaut ü &uuml; literally</source> <translation type="unfinished"></translation> </message> <message> <location filename="main.cpp" line="53"/> - <source>random ascii only in utf8</source> + <source>this contains an umlaut ü &uuml; escaped, really in utf-8</source> <translation type="unfinished"></translation> </message> <message> <location filename="main.cpp" line="54"/> - <source>umlaut ü &uuml; in utf8</source> + <source>random ascii only in utf8</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="main.cpp" line="55"/> + <source>umlaut ü &uuml; in escaped utf8</source> <translation type="unfinished"></translation> </message> </context> diff --git a/tests/auto/networkselftest/tst_networkselftest.cpp b/tests/auto/networkselftest/tst_networkselftest.cpp index f13bcad89a..b9be5cb33f 100644 --- a/tests/auto/networkselftest/tst_networkselftest.cpp +++ b/tests/auto/networkselftest/tst_networkselftest.cpp @@ -156,7 +156,7 @@ static QString prettyByteArray(const QByteArray &array) return result; } -static bool doSocketRead(QTcpSocket *socket, int minBytesAvailable, int timeout = 2000) +static bool doSocketRead(QTcpSocket *socket, int minBytesAvailable, int timeout = 4000) { QTime timer; timer.start(); @@ -171,7 +171,7 @@ static bool doSocketRead(QTcpSocket *socket, int minBytesAvailable, int timeout } } -static bool doSocketFlush(QTcpSocket *socket, int timeout = 2000) +static bool doSocketFlush(QTcpSocket *socket, int timeout = 4000) { #ifndef QT_NO_OPENSSL QSslSocket *sslSocket = qobject_cast<QSslSocket *>(socket); diff --git a/tests/auto/qalgorithms/tst_qalgorithms.cpp b/tests/auto/qalgorithms/tst_qalgorithms.cpp index 176a451814..1e24efeba9 100644 --- a/tests/auto/qalgorithms/tst_qalgorithms.cpp +++ b/tests/auto/qalgorithms/tst_qalgorithms.cpp @@ -620,8 +620,8 @@ void tst_QAlgorithms::test_qBinaryFind() //-42 means not found if (resultValue == -42) { - QVERIFY(qBinaryFind(data.constBegin(), data.constEnd(), resultValue) == data.end()); - QVERIFY(qBinaryFind(data, resultValue) == data.end()); + QVERIFY(qBinaryFind(data.constBegin(), data.constEnd(), resultValue) == data.constEnd()); + QVERIFY(qBinaryFind(data, resultValue) == data.constEnd()); QVERIFY(qBinaryFind(data.begin(), data.end(), resultValue) == data.end()); QVERIFY(qBinaryFind(data.begin(), data.end(), resultValue, qLess<int>()) == data.end()); return; diff --git a/tests/auto/qcombobox/tst_qcombobox.cpp b/tests/auto/qcombobox/tst_qcombobox.cpp index e903ab508e..af7196106c 100644 --- a/tests/auto/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/qcombobox/tst_qcombobox.cpp @@ -2290,11 +2290,8 @@ void tst_QComboBox::setItemDelegate() QComboBox comboBox; QStyledItemDelegate *itemDelegate = new QStyledItemDelegate; comboBox.setItemDelegate(itemDelegate); -#ifdef Q_CC_MWERKS + // the cast is a workaround for the XLC and Metrowerks compilers QCOMPARE(static_cast<QStyledItemDelegate *>(comboBox.itemDelegate()), itemDelegate); -#else - QCOMPARE(comboBox.itemDelegate(), itemDelegate); -#endif } void tst_QComboBox::task253944_itemDelegateIsReset() @@ -2303,19 +2300,13 @@ void tst_QComboBox::task253944_itemDelegateIsReset() QStyledItemDelegate *itemDelegate = new QStyledItemDelegate; comboBox.setItemDelegate(itemDelegate); + // the casts are workarounds for the XLC and Metrowerks compilers + comboBox.setEditable(true); -#ifdef Q_CC_MWERKS QCOMPARE(static_cast<QStyledItemDelegate *>(comboBox.itemDelegate()), itemDelegate); -#else - QCOMPARE(comboBox.itemDelegate(), itemDelegate); -#endif comboBox.setStyleSheet("QComboBox { border: 1px solid gray; }"); -#ifdef Q_CC_MWERKS QCOMPARE(static_cast<QStyledItemDelegate *>(comboBox.itemDelegate()), itemDelegate); -#else - QCOMPARE(comboBox.itemDelegate(), itemDelegate); -#endif } diff --git a/tests/auto/qcommandlinkbutton/tst_qcommandlinkbutton.cpp b/tests/auto/qcommandlinkbutton/tst_qcommandlinkbutton.cpp index 33226bf866..f8331965db 100644 --- a/tests/auto/qcommandlinkbutton/tst_qcommandlinkbutton.cpp +++ b/tests/auto/qcommandlinkbutton/tst_qcommandlinkbutton.cpp @@ -51,6 +51,7 @@ #include <qtimer.h> #include <QDialog> #include <QGridLayout> +#include <QPainter> Q_DECLARE_METATYPE(QCommandLinkButton*) @@ -83,7 +84,8 @@ private slots: void clicked(); void toggled(); void defaultAndAutoDefault(); - void setAutoRepeat(); + void setAutoRepeat(); + void heightForWithWithIcon(); protected slots: void resetCounters(); @@ -106,17 +108,17 @@ private: void tst_QCommandLinkButton::getSetCheck() { QCommandLinkButton obj1; - + QString text("mytext"); QVERIFY(obj1.description().isEmpty()); obj1.setDescription(text); QVERIFY(obj1.description() == text); - + QVERIFY(obj1.text().isEmpty()); obj1.setText(text); QVERIFY(obj1.text() == text); - - + + QMenu *var1 = new QMenu; obj1.setMenu(var1); QCOMPARE(var1, obj1.menu()); @@ -393,8 +395,8 @@ void tst_QCommandLinkButton::setAccel() QTest::qWait(100); } - QVERIFY(testWidget->isActiveWindow()); - + QVERIFY(testWidget->isActiveWindow()); + QTest::keyClick( testWidget, 'A', Qt::AltModifier ); QTest::qWait( 500 ); QVERIFY( click_count == 1 ); @@ -556,5 +558,33 @@ void tst_QCommandLinkButton::defaultAndAutoDefault() } } +void tst_QCommandLinkButton::heightForWithWithIcon() +{ + QWidget mainWin; + + QPixmap pixmap(64, 64); + { + pixmap.fill(Qt::white); + QPainter painter(&pixmap); + painter.setBrush(Qt::black); + painter.drawEllipse(0, 0, 63, 63); + } + + QCommandLinkButton *largeIconButton = new QCommandLinkButton(QString("Large Icon"), + QString("Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Mauris nibh lectus, adipiscing eu."), + &mainWin); + largeIconButton->setIconSize(QSize(64, 64)); + largeIconButton->setIcon(pixmap); + + QVBoxLayout *layout = new QVBoxLayout(); + layout->addWidget(largeIconButton); + layout->addStretch(); + mainWin.setLayout(layout); + mainWin.showMaximized(); + QTest::qWaitForWindowShown(&mainWin); + QVERIFY(largeIconButton->height() > 68); //enough room for the icon + +} + QTEST_MAIN(tst_QCommandLinkButton) #include "tst_qcommandlinkbutton.moc" diff --git a/tests/auto/qdbusconnection/tst_qdbusconnection.cpp b/tests/auto/qdbusconnection/tst_qdbusconnection.cpp index bb034a38de..c1976c05cb 100644 --- a/tests/auto/qdbusconnection/tst_qdbusconnection.cpp +++ b/tests/auto/qdbusconnection/tst_qdbusconnection.cpp @@ -96,6 +96,8 @@ private slots: void registerQObjectChildren(); void callSelf(); + void callSelfByAnotherName_data(); + void callSelfByAnotherName(); void multipleInterfacesInQObject(); void slotsWithLessParameters(); @@ -493,6 +495,70 @@ void tst_QDBusConnection::callSelf() QCOMPARE(reply.arguments().value(0).toInt(), 45); } +void tst_QDBusConnection::callSelfByAnotherName_data() +{ + QTest::addColumn<int>("registerMethod"); + QTest::newRow("connection") << 0; + QTest::newRow("connection-interface") << 1; + QTest::newRow("direct") << 2; +} + +void tst_QDBusConnection::callSelfByAnotherName() +{ + static int counter = 0; + QString sname = serviceName() + QString::number(counter++); + + QDBusConnection con = QDBusConnection::sessionBus(); + QVERIFY(con.isConnected()); + + TestObject testObject; + QVERIFY(con.registerObject("/test", &testObject, + QDBusConnection::ExportAllContents)); + con.connect("org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus", "NameOwnerChanged", + QStringList() << sname << "", + QString(), &QTestEventLoop::instance(), SLOT(exitLoop())); + + // register the name + QFETCH(int, registerMethod); + switch (registerMethod) { + case 0: + QVERIFY(con.registerService(sname)); + break; + + case 1: + QVERIFY(con.interface()->registerService(sname).value() == QDBusConnectionInterface::ServiceRegistered); + break; + + case 2: { + // flag is DBUS_NAME_FLAG_DO_NOT_QUEUE = 0x04 + // reply is DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER = 1 + QDBusReply<uint> reply = con.interface()->call("RequestName", sname, 4u); + QVERIFY(reply.value() == 1); + } + } + + struct Deregisterer { + QDBusConnection con; + QString sname; + Deregisterer(const QDBusConnection &con, const QString &sname) : con(con), sname(sname) {} + ~Deregisterer() { con.interface()->unregisterService(sname); } + } deregisterer(con, sname); + + // give the connection a chance to find out that we're good to go + QTestEventLoop::instance().enterLoop(2); + con.disconnect("org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus", "NameOwnerChanged", + QStringList() << sname << "", + QString(), &QTestEventLoop::instance(), SLOT(exitLoop())); + QVERIFY(!QTestEventLoop::instance().timeout()); + + // make the call + QDBusMessage msg = QDBusMessage::createMethodCall(sname, "/test", + QString(), "test0"); + QDBusMessage reply = con.call(msg, QDBus::Block, 1000); + + QVERIFY(reply.type() == QDBusMessage::ReplyMessage); +} + void tst_QDBusConnection::multipleInterfacesInQObject() { QDBusConnection con = QDBusConnection::sessionBus(); diff --git a/tests/auto/qdbusservicewatcher/tst_qdbusservicewatcher.cpp b/tests/auto/qdbusservicewatcher/tst_qdbusservicewatcher.cpp index 10b43b1e32..ac0f806eda 100644 --- a/tests/auto/qdbusservicewatcher/tst_qdbusservicewatcher.cpp +++ b/tests/auto/qdbusservicewatcher/tst_qdbusservicewatcher.cpp @@ -47,12 +47,13 @@ class tst_QDBusServiceWatcher: public QObject { Q_OBJECT QString serviceName; + int testCounter; public: tst_QDBusServiceWatcher(); private slots: void initTestCase(); - void cleanup(); + void init(); void watchForCreation(); void watchForDisappearance(); @@ -61,7 +62,7 @@ private slots: }; tst_QDBusServiceWatcher::tst_QDBusServiceWatcher() - : serviceName("com.example.TestName") + : testCounter(0) { } @@ -71,10 +72,10 @@ void tst_QDBusServiceWatcher::initTestCase() QVERIFY(con.isConnected()); } -void tst_QDBusServiceWatcher::cleanup() +void tst_QDBusServiceWatcher::init() { - // ensure that the name isn't registered - QDBusConnection::sessionBus().unregisterService(serviceName); + // change the service name from test to test + serviceName = "com.example.TestService" + QString::number(testCounter++); } void tst_QDBusServiceWatcher::watchForCreation() @@ -135,6 +136,7 @@ void tst_QDBusServiceWatcher::watchForDisappearance() QVERIFY(con.isConnected()); QDBusServiceWatcher watcher(serviceName, con, QDBusServiceWatcher::WatchForUnregistration); + watcher.setObjectName("watcher for disappearance"); QSignalSpy spyR(&watcher, SIGNAL(serviceRegistered(QString))); QSignalSpy spyU(&watcher, SIGNAL(serviceUnregistered(QString))); diff --git a/tests/auto/qdialogbuttonbox/tst_qdialogbuttonbox.cpp b/tests/auto/qdialogbuttonbox/tst_qdialogbuttonbox.cpp index 936ebf7920..2c49fc8641 100644 --- a/tests/auto/qdialogbuttonbox/tst_qdialogbuttonbox.cpp +++ b/tests/auto/qdialogbuttonbox/tst_qdialogbuttonbox.cpp @@ -111,6 +111,9 @@ private slots: void testDefaultButton_data(); void testDefaultButton(); void testS60SoftKeys(); +#ifdef QT_SOFTKEYS_ENABLED + void testSoftKeyReparenting(); +#endif void task191642_default(); private: @@ -715,6 +718,17 @@ void tst_QDialogButtonBox::testDefaultButton_data() QTest::newRow("third accept explicit after add") << 0 << 2 << 2; } +static int softKeyCount(QWidget *widget) +{ + int softkeyCount = 0; + QList<QAction *> actions = widget->actions(); + foreach (QAction *action, actions) { + if (action->softKeyRole() != QAction::NoSoftKey) + softkeyCount++; + } + return softkeyCount; +} + void tst_QDialogButtonBox::testS60SoftKeys() { #ifdef Q_WS_S60 @@ -722,33 +736,47 @@ void tst_QDialogButtonBox::testS60SoftKeys() QDialogButtonBox buttonBox(&dialog); buttonBox.setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); dialog.show(); - - int softkeyCount = 0; - QList<QAction *> actions = dialog.actions(); - foreach (QAction *action, actions) { - if (action->softKeyRole() != QAction::NoSoftKey) - softkeyCount++; - } - QCOMPARE( softkeyCount, 2); + + QCOMPARE( softKeyCount(&dialog), 2); QDialog dialog2(0); QDialogButtonBox buttonBox2(&dialog2); buttonBox2.setStandardButtons(QDialogButtonBox::Cancel); dialog2.show(); - int softkeyCount2 = 0; - QList<QAction *> actions2 = dialog2.actions(); - foreach (QAction *action, actions2) { - if (action->softKeyRole() != QAction::NoSoftKey) - softkeyCount2++; - } - QCOMPARE( softkeyCount2, 1); - + QCOMPARE( softKeyCount(&dialog2), 1); + #else QSKIP("S60-specific test", SkipAll ); #endif } +#ifdef QT_SOFTKEYS_ENABLED +void tst_QDialogButtonBox::testSoftKeyReparenting() +{ + QDialog dialog; + QDialogButtonBox *buttonBox = new QDialogButtonBox; + buttonBox->addButton(QDialogButtonBox::Ok); + buttonBox->addButton(QDialogButtonBox::Cancel); + + QCOMPARE(softKeyCount(&dialog), 0); + QCOMPARE(softKeyCount(buttonBox), 2); + + // Were the softkeys re-parented correctly? + dialog.setLayout(new QVBoxLayout); + dialog.layout()->addWidget(buttonBox); + QCOMPARE(softKeyCount(&dialog), 2); + QCOMPARE(softKeyCount(buttonBox), 0); + + // Softkeys are only added to QDialog, not QWidget + QWidget *nested = new QWidget; + nested->setLayout(new QVBoxLayout); + nested->layout()->addWidget(buttonBox); + QCOMPARE(softKeyCount(nested), 0); + QCOMPARE(softKeyCount(buttonBox), 2); +} +#endif + void tst_QDialogButtonBox::testDefaultButton() { QFETCH(int, whenToSetDefault); diff --git a/tests/auto/qfontmetrics/tst_qfontmetrics.cpp b/tests/auto/qfontmetrics/tst_qfontmetrics.cpp index e80f8e00fe..efb1b56932 100644 --- a/tests/auto/qfontmetrics/tst_qfontmetrics.cpp +++ b/tests/auto/qfontmetrics/tst_qfontmetrics.cpp @@ -72,6 +72,7 @@ private slots: void veryNarrowElidedText(); void averageCharWidth(); void elidedMultiLength(); + void elidedMultiLengthF(); void bearingIncludedInBoundingRect(); }; @@ -218,13 +219,13 @@ void tst_QFontMetrics::averageCharWidth() QVERIFY(fmf.averageCharWidth() != 0); } -void tst_QFontMetrics::elidedMultiLength() +template<class FontMetrics> void elidedMultiLength_helper() { QString text1 = "Long Text 1\x9cShorter\x9csmall"; QString text1_long = "Long Text 1"; QString text1_short = "Shorter"; QString text1_small = "small"; - QFontMetrics fm = QFontMetrics(QFont()); + FontMetrics fm = FontMetrics(QFont()); int width_long = fm.size(0, text1_long).width(); QCOMPARE(fm.elidedText(text1,Qt::ElideRight, 8000), text1_long); QCOMPARE(fm.elidedText(text1,Qt::ElideRight, width_long + 1), text1_long); @@ -238,7 +239,16 @@ void tst_QFontMetrics::elidedMultiLength() QString text1_el = QString::fromLatin1("s") + ellipsisChar; int width_small = fm.width(text1_el); QCOMPARE(fm.elidedText(text1,Qt::ElideRight, width_small + 1), text1_el); +} +void tst_QFontMetrics::elidedMultiLength() +{ + elidedMultiLength_helper<QFontMetrics>(); +} + +void tst_QFontMetrics::elidedMultiLengthF() +{ + elidedMultiLength_helper<QFontMetricsF>(); } void tst_QFontMetrics::bearingIncludedInBoundingRect() diff --git a/tests/auto/qftp/tst_qftp.cpp b/tests/auto/qftp/tst_qftp.cpp index 1e7f4244d6..27c2e13daa 100644 --- a/tests/auto/qftp/tst_qftp.cpp +++ b/tests/auto/qftp/tst_qftp.cpp @@ -618,7 +618,7 @@ void tst_QFtp::get() } addCommand( QFtp::Close, ftp->close() ); - QTestEventLoop::instance().enterLoop( 30 ); + QTestEventLoop::instance().enterLoop( 50 ); delete ftp; if ( QTestEventLoop::instance().timeout() ) QFAIL( "Network operation timed out" ); @@ -1020,7 +1020,7 @@ void tst_QFtp::renameInit( const QString &host, const QString &user, const QStri addCommand( QFtp::Put, ftp->put( QByteArray(), createFile ) ); addCommand( QFtp::Close, ftp->close() ); - QTestEventLoop::instance().enterLoop( 30 ); + QTestEventLoop::instance().enterLoop( 50 ); delete ftp; if ( QTestEventLoop::instance().timeout() ) QFAIL( "Network operation timed out" ); @@ -1295,14 +1295,18 @@ void tst_QFtp::abort_data() // Qt/CE and Symbian test environment has to less memory for this test #if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) QByteArray bigData( 10*1024*1024, 0 ); +#else + QByteArray bigData( 1*1024*1024, 0 ); +#endif bigData.fill( 'B' ); - QTest::newRow( "put_fluke01" ) << QtNetworkSettings::serverName() << (uint)21 << QString("qtest/upload/abort_put") << bigData; -#endif } void tst_QFtp::abort() { + // In case you wonder where the abort() actually happens, look into + // tst_QFtp::dataTransferProgress + // QFETCH( QString, host ); QFETCH( uint, port ); QFETCH( QString, file ); @@ -1324,7 +1328,7 @@ void tst_QFtp::abort() addCommand( QFtp::Close, ftp->close() ); for(int time = 0; time <= uploadData.length() / 30000; time += 30) { - QTestEventLoop::instance().enterLoop( 30 ); + QTestEventLoop::instance().enterLoop( 50 ); if(ftp->currentCommand() == QFtp::None) break; } @@ -1404,7 +1408,7 @@ void tst_QFtp::bytesAvailable() if ( type != 0 ) addCommand( QFtp::Close, ftp->close() ); - QTestEventLoop::instance().enterLoop( 30 ); + QTestEventLoop::instance().enterLoop( 40 ); if ( QTestEventLoop::instance().timeout() ) QFAIL( "Network operation timed out" ); @@ -1493,7 +1497,7 @@ void tst_QFtp::proxy() addCommand( QFtp::Cd, ftp->cd( dir ) ); addCommand( QFtp::List, ftp->list() ); - QTestEventLoop::instance().enterLoop( 30 ); + QTestEventLoop::instance().enterLoop( 50 ); delete ftp; if ( QTestEventLoop::instance().timeout() ) { @@ -1921,7 +1925,7 @@ bool tst_QFtp::fileExists( const QString &host, quint16 port, const QString &use delete ftp; if ( QTestEventLoop::instance().timeout() ) { // ### make this test work - qWarning("Network operation timed out"); + qWarning("tst_QFtp::fileExists: Network operation timed out"); return FALSE; } inFileDirExistsFunction = FALSE; @@ -1972,6 +1976,7 @@ bool tst_QFtp::dirExists( const QString &host, quint16 port, const QString &user if ( QTestEventLoop::instance().timeout() ) { // ### make this test work // QFAIL( "Network operation timed out" ); + qWarning("tst_QFtp::dirExists: Network operation timed out"); return FALSE; } inFileDirExistsFunction = FALSE; diff --git a/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp b/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp index 2ad024fe5e..e2f87b888f 100644 --- a/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp +++ b/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp @@ -86,6 +86,8 @@ private slots: void parallelSimplificationOfCenter(); void simplificationVsRedundance(); void spacingPersistency(); + void snakeParallelWithLayout(); + void parallelToHalfLayout(); }; class RectWidget : public QGraphicsWidget @@ -1892,5 +1894,87 @@ void tst_QGraphicsAnchorLayout::spacingPersistency() QCOMPARE(anchor->spacing(), 30.0); } +/* + Test whether a correct preferred size is set when a "snake" sequence is in parallel with the + layout or half of the layout. The tricky thing here is that all items on the snake should + keep their preferred sizes. +*/ +void tst_QGraphicsAnchorLayout::snakeParallelWithLayout() +{ + QSizeF min(10, 20); + QSizeF pref(50, 20); + QSizeF max(100, 20); + + QGraphicsWidget *a = createItem(max, max, max, "A"); + QGraphicsWidget *b = createItem(min, pref, max, "B"); + QGraphicsWidget *c = createItem(max, max, max, "C"); + + QGraphicsWidget parent; + QGraphicsAnchorLayout *l = new QGraphicsAnchorLayout(&parent); + l->setContentsMargins(0, 0, 0, 0); + l->setSpacing(0); + + // First we'll do the case in parallel with the entire layout... + l->addAnchor(l, Qt::AnchorLeft, a, Qt::AnchorLeft); + l->addAnchor(a, Qt::AnchorRight, b, Qt::AnchorRight); + l->addAnchor(b, Qt::AnchorLeft, c, Qt::AnchorLeft); + l->addAnchor(c, Qt::AnchorRight, l, Qt::AnchorRight); + + l->addAnchor(l, Qt::AnchorTop, a, Qt::AnchorTop); + l->addAnchor(a, Qt::AnchorBottom, b, Qt::AnchorTop); + l->addAnchor(b, Qt::AnchorBottom, c, Qt::AnchorTop); + l->addAnchor(c, Qt::AnchorBottom, l, Qt::AnchorBottom); + + parent.resize(l->effectiveSizeHint(Qt::PreferredSize)); + + // Note that A and C are fixed in the maximum size + QCOMPARE(l->geometry(), QRectF(QPointF(0, 0), QSizeF(150, 60))); + QCOMPARE(a->geometry(), QRectF(QPointF(0, 0), max)); + QCOMPARE(b->geometry(), QRectF(QPointF(50, 20), pref)); + QCOMPARE(c->geometry(), QRectF(QPointF(50, 40), max)); + + // Then, we change the "snake" to be in parallel with half of the layout + delete l->anchor(c, Qt::AnchorRight, l, Qt::AnchorRight); + l->addAnchor(c, Qt::AnchorRight, l, Qt::AnchorHorizontalCenter); + + parent.resize(l->effectiveSizeHint(Qt::PreferredSize)); + + QCOMPARE(l->geometry(), QRectF(QPointF(0, 0), QSizeF(300, 60))); + QCOMPARE(a->geometry(), QRectF(QPointF(0, 0), max)); + QCOMPARE(b->geometry(), QRectF(QPointF(50, 20), pref)); + QCOMPARE(c->geometry(), QRectF(QPointF(50, 40), max)); +} + +/* + Avoid regression where the sizeHint constraints would not be + created for a parallel anchor that included the first layout half +*/ +void tst_QGraphicsAnchorLayout::parallelToHalfLayout() +{ + QGraphicsWidget *a = createItem(); + + QGraphicsWidget w; + QGraphicsAnchorLayout *l = new QGraphicsAnchorLayout(&w); + l->setContentsMargins(10, 10, 10, 10); + + l->addAnchors(l, a, Qt::Vertical); + + QGraphicsAnchor *anchor; + anchor = l->addAnchor(l, Qt::AnchorLeft, a, Qt::AnchorLeft); + anchor->setSpacing(5); + anchor = l->addAnchor(l, Qt::AnchorHorizontalCenter, a, Qt::AnchorRight); + anchor->setSpacing(-5); + + const QSizeF minimumSizeHint = w.effectiveSizeHint(Qt::MinimumSize); + const QSizeF preferredSizeHint = w.effectiveSizeHint(Qt::PreferredSize); + const QSizeF maximumSizeHint = w.effectiveSizeHint(Qt::MaximumSize); + + const QSizeF overhead = QSizeF(10 + 5 + 5, 10) * 2; + + QCOMPARE(minimumSizeHint, QSizeF(200, 100) + overhead); + QCOMPARE(preferredSizeHint, QSizeF(300, 100) + overhead); + QCOMPARE(maximumSizeHint, QSizeF(400, 100) + overhead); +} + QTEST_MAIN(tst_QGraphicsAnchorLayout) #include "tst_qgraphicsanchorlayout.moc" diff --git a/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp b/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp index bca59c3578..baa1ba13e8 100644 --- a/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp +++ b/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp @@ -167,7 +167,7 @@ public: { setContentsMargins( 0,0,0,0 ); if (name.isEmpty()) - setData(0, QString::fromAscii("w%1").arg(int(this))); + setData(0, QString::fromAscii("w%1").arg(quintptr(this))); else setData(0, name); } diff --git a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp index 36ee22c96a..42d52686c4 100644 --- a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp +++ b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp @@ -181,6 +181,7 @@ private slots: void updateAndDelete(); void inputMethod(); void clickFocus(); + void windowFrameMargins(); }; // Subclass that exposes the protected functions. @@ -3506,6 +3507,29 @@ void tst_QGraphicsProxyWidget::clickFocus() QVERIFY(!proxy->widget()->hasFocus()); } +void tst_QGraphicsProxyWidget::windowFrameMargins() +{ + // Make sure the top margin is non-zero when passing Qt::Window. + QGraphicsProxyWidget *proxy = new QGraphicsProxyWidget(0, Qt::Window); + + qreal left, top, right, bottom; + proxy->getWindowFrameMargins(&left, &top, &right, &bottom); + QVERIFY(top > 0); + + proxy->setWidget(new QPushButton("testtest")); + proxy->getWindowFrameMargins(&left, &top, &right, &bottom); + QVERIFY(top > 0); + + QGraphicsScene scene; + scene.addItem(proxy); + proxy->getWindowFrameMargins(&left, &top, &right, &bottom); + QVERIFY(top > 0); + + proxy->unsetWindowFrameMargins(); + proxy->getWindowFrameMargins(&left, &top, &right, &bottom); + QVERIFY(top > 0); +} + QTEST_MAIN(tst_QGraphicsProxyWidget) #include "tst_qgraphicsproxywidget.moc" diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp index a49c2c1379..20d9eb8624 100644 --- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp +++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp @@ -276,6 +276,7 @@ private slots: void task176178_itemIndexMethodBreaksSceneRect(); void task160653_selectionChanged(); void task250680_childClip(); + void taskQTBUG_5904_crashWithDeviceCoordinateCache(); }; void tst_QGraphicsScene::initTestCase() @@ -4180,5 +4181,20 @@ void tst_QGraphicsScene::isActive() } +void tst_QGraphicsScene::taskQTBUG_5904_crashWithDeviceCoordinateCache() +{ + QGraphicsScene scene; + QGraphicsRectItem *rectItem = scene.addRect(QRectF(0, 0, 100, 200), QPen(Qt::black), QBrush(Qt::green)); + + rectItem->setCacheMode(QGraphicsItem::DeviceCoordinateCache); + + QPixmap pixmap(100,200); + QPainter painter(&pixmap); + painter.setRenderHint(QPainter::Antialiasing); + scene.render(&painter); + painter.end(); + // No crash, then it passed! +} + QTEST_MAIN(tst_QGraphicsScene) #include "tst_qgraphicsscene.moc" diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp index 1ff06c2f6f..797e1fbf7b 100644 --- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp @@ -235,6 +235,7 @@ private slots: void task259503_scrollingArtifacts(); void QTBUG_4151_clipAndIgnore_data(); void QTBUG_4151_clipAndIgnore(); + void QTBUG_5859_exposedRect(); }; void tst_QGraphicsView::initTestCase() @@ -3867,5 +3868,43 @@ void tst_QGraphicsView::QTBUG_4151_clipAndIgnore() QCOMPARE(view.items(view.rect()).size(), numItems); } +void tst_QGraphicsView::QTBUG_5859_exposedRect() +{ + class CustomScene : public QGraphicsScene + { + public: + CustomScene(const QRectF &rect) : QGraphicsScene(rect) { } + void drawBackground(QPainter *painter, const QRectF &rect) + { lastBackgroundExposedRect = rect; } + QRectF lastBackgroundExposedRect; + }; + + class CustomRectItem : public QGraphicsRectItem + { + public: + CustomRectItem(const QRectF &rect) : QGraphicsRectItem(rect) + { setFlag(QGraphicsItem::ItemUsesExtendedStyleOption); } + void paint(QPainter * painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) + { lastExposedRect = option->exposedRect; } + QRectF lastExposedRect; + }; + + CustomScene scene(QRectF(0,0,50,50)); + + CustomRectItem item(scene.sceneRect()); + + scene.addItem(&item); + + QGraphicsView view(&scene); + view.scale(4.15, 4.15); + view.show(); + QTest::qWaitForWindowShown(&view); + + view.viewport()->repaint(10,10,20,20); + QApplication::processEvents(); + + QCOMPARE(item.lastExposedRect, scene.lastBackgroundExposedRect); +} + QTEST_MAIN(tst_QGraphicsView) #include "tst_qgraphicsview.moc" diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp index 829e55c4b3..3b98c2fcb8 100644 --- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp +++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp @@ -161,6 +161,7 @@ private slots: void respectHFW(); void addChildInpolishEvent(); void polishEvent(); + void polishEvent2(); // Task fixes void task236127_bspTreeIndexFails(); @@ -2796,6 +2797,29 @@ void tst_QGraphicsWidget::polishEvent() QCOMPARE(widget->events.at(0), QEvent::Polish); } +void tst_QGraphicsWidget::polishEvent2() +{ + class MyGraphicsWidget : public QGraphicsWidget + { public: + void polishEvent() + { events << QEvent::Polish; } + QList<QEvent::Type> events; + }; + + QGraphicsScene scene; + + MyGraphicsWidget *widget = new MyGraphicsWidget; + widget->hide(); + scene.addItem(widget); + + widget->events.clear(); + + QApplication::processEvents(); + + // Make sure the item got polish event. + QVERIFY(widget->events.contains(QEvent::Polish)); +} + QTEST_MAIN(tst_QGraphicsWidget) #include "tst_qgraphicswidget.moc" diff --git a/tests/auto/qheaderview/tst_qheaderview.cpp b/tests/auto/qheaderview/tst_qheaderview.cpp index c13e829832..a8e7461cf0 100644 --- a/tests/auto/qheaderview/tst_qheaderview.cpp +++ b/tests/auto/qheaderview/tst_qheaderview.cpp @@ -43,6 +43,7 @@ #include <QtTest/QtTest> #include <QStandardItemModel> #include <QStringListModel> +#include <QSortFilterProxyModel> #include <qabstractitemmodel.h> #include <qapplication.h> @@ -188,6 +189,7 @@ private slots: void task236450_hidden_data(); void task236450_hidden(); void task248050_hideRow(); + void QTBUG6058_reset(); protected: QHeaderView *view; @@ -1947,5 +1949,49 @@ void tst_QHeaderView::task248050_hideRow() } +//returns 0 if everything is fine. +static int checkHeaderViewOrder(QHeaderView *view, const QVector<int> &expected) +{ + if (view->count() != expected.count()) + return 1; + + for (int i = 0; i < expected.count(); i++) { + if (view->logicalIndex(i) != expected.at(i)) + return i + 10; + if (view->visualIndex(expected.at(i)) != i) + return i + 100; + } + return 0; +} + + +void tst_QHeaderView::QTBUG6058_reset() +{ + QStringListModel model1( QStringList() << "0" << "1" << "2" << "3" << "4" << "5" ); + QStringListModel model2( QStringList() << "a" << "b" << "c" ); + QSortFilterProxyModel proxy; + + QHeaderView view(Qt::Vertical); + view.setModel(&proxy); + view.show(); + QTest::qWait(20); + + proxy.setSourceModel(&model1); + QApplication::processEvents(); + view.swapSections(0,2); + view.swapSections(1,4); + QApplication::processEvents(); + QCOMPARE(checkHeaderViewOrder(&view, QVector<int>() << 2 << 4 << 0 << 3 << 1 << 5) , 0); + + proxy.setSourceModel(&model2); + QApplication::processEvents(); + QCOMPARE(checkHeaderViewOrder(&view, QVector<int>() << 2 << 0 << 1 ) , 0); + + proxy.setSourceModel(&model1); + QApplication::processEvents(); + QCOMPARE(checkHeaderViewOrder(&view, QVector<int>() << 2 << 0 << 1 << 3 << 4 << 5 ) , 0); +} + + QTEST_MAIN(tst_QHeaderView) #include "tst_qheaderview.moc" diff --git a/tests/auto/qhttp/tst_qhttp.cpp b/tests/auto/qhttp/tst_qhttp.cpp index 0ea0d15fdc..b4b6ceb4bf 100644 --- a/tests/auto/qhttp/tst_qhttp.cpp +++ b/tests/auto/qhttp/tst_qhttp.cpp @@ -363,7 +363,7 @@ void tst_QHttp::get() } addRequest( QHttpRequestHeader(), getId ); - QTestEventLoop::instance().enterLoop( 30 ); + QTestEventLoop::instance().enterLoop( 50 ); if ( QTestEventLoop::instance().timeout() ) QFAIL( "Network operation timed out" ); diff --git a/tests/auto/qiodevice/tst_qiodevice.cpp b/tests/auto/qiodevice/tst_qiodevice.cpp index 056ad6a78a..84fd8ad258 100644 --- a/tests/auto/qiodevice/tst_qiodevice.cpp +++ b/tests/auto/qiodevice/tst_qiodevice.cpp @@ -77,6 +77,9 @@ private slots: void readLine_data(); void readLine(); + + void readLine2_data(); + void readLine2(); }; // Testing get/set functions @@ -453,5 +456,114 @@ void tst_QIODevice::readLine() QCOMPARE(line.size(), linelen); } +void tst_QIODevice::readLine2_data() +{ + QTest::addColumn<QByteArray>("line"); + + QTest::newRow("1024 - 4") << QByteArray(1024 - 4, 'x'); + QTest::newRow("1024 - 3") << QByteArray(1024 - 3, 'x'); + QTest::newRow("1024 - 2") << QByteArray(1024 - 2, 'x'); + QTest::newRow("1024 - 1") << QByteArray(1024 - 1, 'x'); + QTest::newRow("1024" ) << QByteArray(1024 , 'x'); + QTest::newRow("1024 + 1") << QByteArray(1024 + 1, 'x'); + QTest::newRow("1024 + 2") << QByteArray(1024 + 2, 'x'); + + QTest::newRow("4096 - 4") << QByteArray(4096 - 4, 'x'); + QTest::newRow("4096 - 3") << QByteArray(4096 - 3, 'x'); + QTest::newRow("4096 - 2") << QByteArray(4096 - 2, 'x'); + QTest::newRow("4096 - 1") << QByteArray(4096 - 1, 'x'); + QTest::newRow("4096" ) << QByteArray(4096 , 'x'); + QTest::newRow("4096 + 1") << QByteArray(4096 + 1, 'x'); + QTest::newRow("4096 + 2") << QByteArray(4096 + 2, 'x'); + + QTest::newRow("8192 - 4") << QByteArray(8192 - 4, 'x'); + QTest::newRow("8192 - 3") << QByteArray(8192 - 3, 'x'); + QTest::newRow("8192 - 2") << QByteArray(8192 - 2, 'x'); + QTest::newRow("8192 - 1") << QByteArray(8192 - 1, 'x'); + QTest::newRow("8192" ) << QByteArray(8192 , 'x'); + QTest::newRow("8192 + 1") << QByteArray(8192 + 1, 'x'); + QTest::newRow("8192 + 2") << QByteArray(8192 + 2, 'x'); + + QTest::newRow("16384 - 4") << QByteArray(16384 - 4, 'x'); + QTest::newRow("16384 - 3") << QByteArray(16384 - 3, 'x'); + QTest::newRow("16384 - 2") << QByteArray(16384 - 2, 'x'); + QTest::newRow("16384 - 1") << QByteArray(16384 - 1, 'x'); + QTest::newRow("16384" ) << QByteArray(16384 , 'x'); + QTest::newRow("16384 + 1") << QByteArray(16384 + 1, 'x'); + QTest::newRow("16384 + 2") << QByteArray(16384 + 2, 'x'); + + QTest::newRow("20000") << QByteArray(20000, 'x'); + + QTest::newRow("32768 - 4") << QByteArray(32768 - 4, 'x'); + QTest::newRow("32768 - 3") << QByteArray(32768 - 3, 'x'); + QTest::newRow("32768 - 2") << QByteArray(32768 - 2, 'x'); + QTest::newRow("32768 - 1") << QByteArray(32768 - 1, 'x'); + QTest::newRow("32768" ) << QByteArray(32768 , 'x'); + QTest::newRow("32768 + 1") << QByteArray(32768 + 1, 'x'); + QTest::newRow("32768 + 2") << QByteArray(32768 + 2, 'x'); + + QTest::newRow("40000") << QByteArray(40000, 'x'); +} + +void tst_QIODevice::readLine2() +{ + QFETCH(QByteArray, line); + + int length = line.size(); + + QByteArray data("First line.\r\n"); + data.append(line); + data.append("\r\n"); + data.append(line); + data.append("\r\n"); + data.append("\r\n0123456789"); + + { + QBuffer buffer(&data); + buffer.open(QIODevice::ReadOnly); + + buffer.seek(0); + QByteArray temp; + temp.resize(64536); + QCOMPARE(buffer.readLine(temp.data(), temp.size()), qint64(13)); + QCOMPARE(buffer.readLine(temp.data(), temp.size()), qint64(length + 2)); + QCOMPARE(buffer.readLine(temp.data(), temp.size()), qint64(length + 2)); + QCOMPARE(buffer.readLine(temp.data(), temp.size()), qint64(2)); + QCOMPARE(buffer.readLine(temp.data(), temp.size()), qint64(10)); + QCOMPARE(buffer.readLine(temp.data(), temp.size()), qint64(-1)); + + buffer.seek(0); + QCOMPARE(buffer.readLine().size(), 13); + QCOMPARE(buffer.readLine().size(), length + 2); + QCOMPARE(buffer.readLine().size(), length + 2); + QCOMPARE(buffer.readLine().size(), 2); + QCOMPARE(buffer.readLine().size(), 10); + QVERIFY(buffer.readLine().isNull()); + } + + { + QBuffer buffer(&data); + buffer.open(QIODevice::ReadOnly | QIODevice::Text); + + buffer.seek(0); + QByteArray temp; + temp.resize(64536); + QCOMPARE(buffer.readLine(temp.data(), temp.size()), qint64(12)); + QCOMPARE(buffer.readLine(temp.data(), temp.size()), qint64(length + 1)); + QCOMPARE(buffer.readLine(temp.data(), temp.size()), qint64(length + 1)); + QCOMPARE(buffer.readLine(temp.data(), temp.size()), qint64(1)); + QCOMPARE(buffer.readLine(temp.data(), temp.size()), qint64(10)); + QCOMPARE(buffer.readLine(temp.data(), temp.size()), qint64(-1)); + + buffer.seek(0); + QCOMPARE(buffer.readLine().size(), 12); + QCOMPARE(buffer.readLine().size(), length + 1); + QCOMPARE(buffer.readLine().size(), length + 1); + QCOMPARE(buffer.readLine().size(), 1); + QCOMPARE(buffer.readLine().size(), 10); + QVERIFY(buffer.readLine().isNull()); + } +} + QTEST_MAIN(tst_QIODevice) #include "tst_qiodevice.moc" diff --git a/tests/auto/qlineedit/tst_qlineedit.cpp b/tests/auto/qlineedit/tst_qlineedit.cpp index b4dfbbad47..dd5bb29d4e 100644 --- a/tests/auto/qlineedit/tst_qlineedit.cpp +++ b/tests/auto/qlineedit/tst_qlineedit.cpp @@ -51,6 +51,10 @@ #include "qcompleter.h" #include "qstandarditemmodel.h" +#ifndef QT_NO_CLIPBOARD +#include "qclipboard.h" +#endif + #ifdef Q_WS_MAC #include <Carbon/Carbon.h> // For the random function. #include <cstdlib> // For the random function. @@ -157,6 +161,10 @@ private slots: void undo_keypressevents_data(); void undo_keypressevents(); +#ifndef QT_NO_CLIPBOARD + void QTBUG5786_undoPaste(); +#endif + void clear(); void text_data(); @@ -1406,6 +1414,36 @@ void tst_QLineEdit::undo_keypressevents() QVERIFY(testWidget->text().isEmpty()); } +#ifndef QT_NO_CLIPBOARD +void tst_QLineEdit::QTBUG5786_undoPaste() +{ + QString initial("initial"); + QString string("test"); + QString additional("add"); + QApplication::clipboard()->setText(string); + QLineEdit edit(initial); + QCOMPARE(edit.text(), initial); + edit.paste(); + QCOMPARE(edit.text(), initial + string); + edit.paste(); + QCOMPARE(edit.text(), initial + string + string); + edit.insert(additional); + QCOMPARE(edit.text(), initial + string + string + additional); + edit.undo(); + QCOMPARE(edit.text(), initial + string + string); + edit.undo(); + QCOMPARE(edit.text(), initial + string); + edit.undo(); + QCOMPARE(edit.text(), initial); + edit.selectAll(); + QApplication::clipboard()->setText(QString()); + edit.paste(); + QVERIFY(edit.text().isEmpty()); + +} +#endif + + void tst_QLineEdit::clear() { // checking that clear of empty/nullstring doesn't add to undo history diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp index 1c8fecf96b..602da61a58 100644 --- a/tests/auto/qlistview/tst_qlistview.cpp +++ b/tests/auto/qlistview/tst_qlistview.cpp @@ -122,6 +122,7 @@ private slots: void taskQTBUG_633_changeModelData(); void taskQTBUG_435_deselectOnViewportClick(); void taskQTBUG_2678_spacingAndWrappedText(); + void taskQTBUG_5877_skippingItemInPageDownUp(); }; // Testing get/set functions @@ -509,9 +510,7 @@ void tst_QListView::moveCursor2() QModelIndex idx = vu.moveCursor(QMoveCursorListView::MoveHome, Qt::NoModifier); QCOMPARE(idx, model.index(0,0)); idx = vu.moveCursor(QMoveCursorListView::MoveDown, Qt::NoModifier); - QModelIndex p = model.index(8,0); QCOMPARE(idx, model.index(8,0)); - } void tst_QListView::moveCursor3() @@ -605,7 +604,6 @@ void tst_QListView::indexAt() QVERIFY(view2.m_index.isValid()); QVERIFY(view2.m_index.row() != 0); - } void tst_QListView::clicked() @@ -703,7 +701,6 @@ void tst_QListView::modelColumn() view.setModel(&model); - // // Set and get with a valid model // @@ -743,7 +740,6 @@ void tst_QListView::modelColumn() } } - void tst_QListView::hideFirstRow() { QStringList items; @@ -814,7 +810,6 @@ void tst_QListView::batchedMode() ba.setBit(idx.row(), true); } QCOMPARE(ba.size(), 3); - } void tst_QListView::setCurrentIndex() @@ -1146,7 +1141,6 @@ void tst_QListView::selection() for (int i = 0; i < selected.count(); ++i) { QVERIFY(expectedItems.contains(selected.at(i).row())); } - } void tst_QListView::scrollTo() @@ -1251,7 +1245,6 @@ void tst_QListView::scrollTo() QTest::keyClick(lv.viewport(), Qt::Key_Up, Qt::NoModifier); QCOMPARE(lv.visualRect(index).y(), 0); - } @@ -1772,7 +1765,6 @@ void tst_QListView::clickOnViewportClearsSelection() QTest::mouseRelease(view.viewport(), Qt::LeftButton, 0, point); //now the selection should be cleared QVERIFY(!view.selectionModel()->hasSelection()); - } void tst_QListView::task262152_setModelColumnNavigate() @@ -1795,7 +1787,6 @@ void tst_QListView::task262152_setModelColumnNavigate() QTest::keyClick(&view, Qt::Key_Down); QTest::qWait(30); QTRY_COMPARE(view.currentIndex(), model.index(2,1)); - } void tst_QListView::taskQTBUG_2233_scrollHiddenItems_data() @@ -1891,5 +1882,38 @@ void tst_QListView::taskQTBUG_2678_spacingAndWrappedText() QCOMPARE(w.horizontalScrollBar()->minimum(), w.horizontalScrollBar()->maximum()); } +void tst_QListView::taskQTBUG_5877_skippingItemInPageDownUp() +{ + QList<int> currentItemIndexes; + QtTestModel model(0); + model.colCount = 1; + model.rCount = 100; + + currentItemIndexes << 0 << 6 << 16 << 25 << 34 << 42 << 57 << 68 << 77 + << 83 << 91 << 94; + QMoveCursorListView vu; + vu.setModel(&model); + vu.show(); + + QTest::qWaitForWindowShown(&vu); + + int itemHeight = vu.visualRect(model.index(0, 0)).height(); + int visibleRowCount = vu.viewport()->height() / itemHeight; + int scrolledRowCount = visibleRowCount - 1; + + for (int i = 0; i < currentItemIndexes.size(); ++i) { + vu.selectionModel()->setCurrentIndex(model.index(currentItemIndexes[i], 0), + QItemSelectionModel::SelectCurrent); + + QModelIndex idx = vu.moveCursor(QMoveCursorListView::MovePageDown, Qt::NoModifier); + int newCurrent = qMin(currentItemIndexes[i] + scrolledRowCount, 99); + QCOMPARE(idx, model.index(newCurrent, 0)); + + idx = vu.moveCursor(QMoveCursorListView::MovePageUp, Qt::NoModifier); + newCurrent = qMax(currentItemIndexes[i] - scrolledRowCount, 0); + QCOMPARE(idx, model.index(newCurrent, 0)); + } +} + QTEST_MAIN(tst_QListView) #include "tst_qlistview.moc" diff --git a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp index 5ead049215..8cabadb48b 100644 --- a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp +++ b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp @@ -695,7 +695,7 @@ public: || socket.error() == QLocalSocket::ConnectionRefusedError) && tries < 1000); if (tries == 0 && socket.state() != QLocalSocket::ConnectedState) { - QVERIFY(socket.waitForConnected(3000)); + QVERIFY(socket.waitForConnected(7000)); QVERIFY(socket.state() == QLocalSocket::ConnectedState); } @@ -725,7 +725,7 @@ public: int done = clients; while (done > 0) { bool timedOut = true; - QVERIFY(server.waitForNewConnection(3000, &timedOut)); + QVERIFY(server.waitForNewConnection(7000, &timedOut)); QVERIFY(!timedOut); QLocalSocket *serverSocket = server.nextPendingConnection(); QVERIFY(serverSocket); diff --git a/tests/auto/qmenu/tst_qmenu.cpp b/tests/auto/qmenu/tst_qmenu.cpp index f0f69a4348..7cdfe4696f 100644 --- a/tests/auto/qmenu/tst_qmenu.cpp +++ b/tests/auto/qmenu/tst_qmenu.cpp @@ -87,6 +87,7 @@ private slots: void widgetActionFocus(); void mouseActivation(); void tearOff(); + void layoutDirection(); #if defined(QT3_SUPPORT) void indexBasedInsertion_data(); @@ -596,6 +597,31 @@ void tst_QMenu::tearOff() QVERIFY(!torn->isVisible()); } +void tst_QMenu::layoutDirection() +{ + QMainWindow win; + win.setLayoutDirection(Qt::RightToLeft); + + QMenu menu(&win); + menu.show(); + QTest::qWaitForWindowShown(&menu); + QCOMPARE(menu.layoutDirection(), Qt::RightToLeft); + menu.close(); + + menu.setParent(0); + menu.show(); + QTest::qWaitForWindowShown(&menu); + QCOMPARE(menu.layoutDirection(), QApplication::layoutDirection()); + menu.close(); + + //now the menubar + QAction *action = win.menuBar()->addMenu(&menu); + win.menuBar()->setActiveAction(action); + QTest::qWaitForWindowShown(&menu); + QCOMPARE(menu.layoutDirection(), Qt::RightToLeft); +} + + #if defined(QT3_SUPPORT) void tst_QMenu::indexBasedInsertion_data() diff --git a/tests/auto/qmenubar/tst_qmenubar.cpp b/tests/auto/qmenubar/tst_qmenubar.cpp index 4291c3eeb9..320cd8d946 100644 --- a/tests/auto/qmenubar/tst_qmenubar.cpp +++ b/tests/auto/qmenubar/tst_qmenubar.cpp @@ -167,6 +167,7 @@ private slots: void task223138_triggered(); void task256322_highlight(); void menubarSizeHint(); + void taskQTBUG4965_escapeEaten(); #if defined(QT3_SUPPORT) void indexBasedInsertion_data(); @@ -1664,6 +1665,27 @@ void tst_QMenuBar::menubarSizeHint() QCOMPARE(resSize, mb.sizeHint()); } +void tst_QMenuBar::taskQTBUG4965_escapeEaten() +{ + QMenuBar menubar; + QMenu menu("menu1"); + QAction *first = menubar.addMenu(&menu); + menu.addAction("quit", &menubar, SLOT(close()), QKeySequence("ESC")); + menubar.show(); + menubar.setActiveWindow(); + QTest::qWaitForWindowShown(&menubar); + menubar.setActiveAction(first); + QTRY_VERIFY(menu.isVisible()); + QCOMPARE(menubar.activeAction(), first); + QTest::keyClick(0, Qt::Key_Escape); + QVERIFY(!menu.isVisible()); + QTRY_VERIFY(menubar.hasFocus()); + QCOMPARE(menubar.activeAction(), first); + QTest::keyClick(0, Qt::Key_Escape); + QVERIFY(!menubar.activeAction()); + QTest::keyClick(0, Qt::Key_Escape); //now the action should be triggered + QTRY_VERIFY(!menubar.isVisible()); +} #if defined(QT3_SUPPORT) void tst_QMenuBar::indexBasedInsertion_data() diff --git a/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp b/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp index ff7e78e544..b52c5157e6 100644 --- a/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp +++ b/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp @@ -168,13 +168,16 @@ void tst_QNetworkCookieJar::setCookiesFromUrl_data() cookie.setDomain("something.completely.different"); QTest::newRow("security-domain-1") << preset << cookie << "http://www.foo.tld" << result << false; - cookie.setDomain("www.foo.tld"); + // we want the cookie to be accepted although the path does not match, see QTBUG-5815 + cookie.setDomain(".foo.tld"); cookie.setPath("/something"); - QTest::newRow("security-path-1") << preset << cookie << "http://www.foo.tld" << result << false; + result += cookie; + QTest::newRow("security-path-1") << preset << cookie << "http://www.foo.tld" << result << true; // setting the defaults: finalCookie = cookie; finalCookie.setPath("/something/"); + finalCookie.setDomain("www.foo.tld"); cookie.setPath(""); cookie.setDomain(""); result.clear(); @@ -285,6 +288,22 @@ void tst_QNetworkCookieJar::cookiesForUrl_data() QTest::newRow("exp-match-4") << allCookies << "http://qt.nokia.com/web" << result; QTest::newRow("exp-match-4") << allCookies << "http://qt.nokia.com/web/" << result; QTest::newRow("exp-match-6") << allCookies << "http://qt.nokia.com/web/content" << result; + + // path matching + allCookies.clear(); + QNetworkCookie anotherCookie; + anotherCookie.setName("a"); + anotherCookie.setPath("/web"); + anotherCookie.setDomain(".nokia.com"); + allCookies += anotherCookie; + result.clear(); + QTest::newRow("path-unmatch-1") << allCookies << "http://nokia.com/" << result; + QTest::newRow("path-unmatch-2") << allCookies << "http://nokia.com/something/else" << result; + result += anotherCookie; + QTest::newRow("path-match-1") << allCookies << "http://nokia.com/web" << result; + QTest::newRow("path-match-2") << allCookies << "http://nokia.com/web/" << result; + QTest::newRow("path-match-3") << allCookies << "http://nokia.com/web/content" << result; + } void tst_QNetworkCookieJar::cookiesForUrl() diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index bd83c47370..5fe716a589 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -2212,7 +2212,7 @@ void tst_QNetworkReply::ioGetWithManyProxies() connect(&manager, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)), SLOT(sslErrors(QNetworkReply*,QList<QSslError>))); #endif - QTestEventLoop::instance().enterLoop(10); + QTestEventLoop::instance().enterLoop(15); QVERIFY(!QTestEventLoop::instance().timeout()); manager.disconnect(SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), @@ -2622,7 +2622,7 @@ void tst_QNetworkReply::ioPostToHttpFromSocket() QSignalSpy authenticationRequiredSpy(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*))); QSignalSpy proxyAuthenticationRequiredSpy(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); - QTestEventLoop::instance().enterLoop(6); + QTestEventLoop::instance().enterLoop(12); disconnect(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), this, SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); disconnect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp index d7f042edea..0effd011f5 100644 --- a/tests/auto/qpixmap/tst_qpixmap.cpp +++ b/tests/auto/qpixmap/tst_qpixmap.cpp @@ -47,6 +47,7 @@ #include <qmatrix.h> #include <qdesktopwidget.h> #include <qpaintengine.h> +#include <qsplashscreen.h> #include <private/qpixmapdata_p.h> @@ -169,6 +170,7 @@ private slots: void loadFromDataNullValues(); void preserveDepth(); + void splash_crash(); }; static bool lenientCompare(const QPixmap &actual, const QPixmap &expected) @@ -1421,6 +1423,17 @@ void tst_QPixmap::fromImage_crash() delete img; } +//This is testing QPixmapData::createCompatiblePixmapData - see QTBUG-5977 +void tst_QPixmap::splash_crash() +{ + QPixmap pix; + pix = QPixmap(":/images/designer.png"); + QSplashScreen splash(pix); + splash.show(); + QCoreApplication::processEvents(); + splash.close(); +} + void tst_QPixmap::fromData() { unsigned char bits[] = { 0xaa, 0x55 }; diff --git a/tests/auto/qscriptable/tst_qscriptable.cpp b/tests/auto/qscriptable/tst_qscriptable.cpp index 90f1db8c4a..c0945d800f 100644 --- a/tests/auto/qscriptable/tst_qscriptable.cpp +++ b/tests/auto/qscriptable/tst_qscriptable.cpp @@ -332,7 +332,7 @@ void tst_QScriptable::thisObject() { QVERIFY(!m_scriptable.oofThisObject().isValid()); m_engine.evaluate("o.oof = 123"); - QEXPECT_FAIL("", "Setter doesn't get called when it's in the prototype", Continue); + QEXPECT_FAIL("", "QTBUG-5749: Setter doesn't get called when it's in the prototype", Continue); QVERIFY(m_scriptable.oofThisObject().strictlyEquals(m_engine.evaluate("o"))); } { diff --git a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp index a0af214572..4ecd8873b5 100644 --- a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp +++ b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp @@ -1114,7 +1114,7 @@ void tst_QScriptContext::calledAsConstructor() QVERIFY(!fun3.property("calledAsConstructor").toBool()); eng.evaluate("new test();"); if (qt_script_isJITEnabled()) - QEXPECT_FAIL("", "calledAsConstructor is not correctly set for JS functions when JIT is enabled", Continue); + QEXPECT_FAIL("", "QTBUG-6132: calledAsConstructor is not correctly set for JS functions when JIT is enabled", Continue); QVERIFY(fun3.property("calledAsConstructor").toBool()); } diff --git a/tests/auto/qscriptcontextinfo/tst_qscriptcontextinfo.cpp b/tests/auto/qscriptcontextinfo/tst_qscriptcontextinfo.cpp index fe69c07287..09ef820866 100644 --- a/tests/auto/qscriptcontextinfo/tst_qscriptcontextinfo.cpp +++ b/tests/auto/qscriptcontextinfo/tst_qscriptcontextinfo.cpp @@ -249,13 +249,13 @@ void tst_QScriptContextInfo::qtFunction() QCOMPARE(info.functionEndLineNumber(), -1); QCOMPARE(info.functionStartLineNumber(), -1); if (x == 0) - QEXPECT_FAIL("", "QScriptContextInfo doesn't pick the correct meta-index for overloaded slots", Continue); + QEXPECT_FAIL("", "QTBUG-6133: QScriptContextInfo doesn't pick the correct meta-index for overloaded slots", Continue); QCOMPARE(info.functionParameterNames().size(), pnames.size()); if (x == 0) - QEXPECT_FAIL("", "QScriptContextInfo doesn't pick the correct meta-index for overloaded slots", Continue); + QEXPECT_FAIL("", "QTBUG-6133: QScriptContextInfo doesn't pick the correct meta-index for overloaded slots", Continue); QCOMPARE(info.functionParameterNames(), pnames); if (x == 0) - QEXPECT_FAIL("", "QScriptContextInfo doesn't pick the correct meta-index for overloaded slots", Continue); + QEXPECT_FAIL("", "QTBUG-6133: QScriptContextInfo doesn't pick the correct meta-index for overloaded slots", Continue); QCOMPARE(info.functionMetaIndex(), metaObject()->indexOfMethod(sig)); } diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp index 8eaad78470..3bc2443850 100644 --- a/tests/auto/qscriptengine/tst_qscriptengine.cpp +++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp @@ -1148,7 +1148,7 @@ void tst_QScriptEngine::globalObjectProperties() QScriptValue::PropertyFlags flags = QScriptValue::ReadOnly | QScriptValue::SkipInEnumeration; global.setProperty(name, val, flags); QVERIFY(global.property(name).equals(val)); - QEXPECT_FAIL("", "custom Global Object properties don't retain attributes", Continue); + QEXPECT_FAIL("", "QTBUG-6134: custom Global Object properties don't retain attributes", Continue); QCOMPARE(global.propertyFlags(name), flags); global.setProperty(name, QScriptValue()); QVERIFY(!global.property(name).isValid()); @@ -2033,7 +2033,7 @@ void tst_QScriptEngine::valueConversion() QScriptValue val = qScriptValueFromValue(&eng, in); QVERIFY(val.isRegExp()); QRegExp out = val.toRegExp(); - QEXPECT_FAIL("", "JSC-based back-end doesn't preserve QRegExp::patternSyntax (always uses RegExp2)", Continue); + QEXPECT_FAIL("", "QTBUG-6136: JSC-based back-end doesn't preserve QRegExp::patternSyntax (always uses RegExp2)", Continue); QCOMPARE(out.patternSyntax(), in.patternSyntax()); QCOMPARE(out.pattern(), in.pattern()); QCOMPARE(out.caseSensitivity(), in.caseSensitivity()); @@ -2050,7 +2050,7 @@ void tst_QScriptEngine::valueConversion() in.setMinimal(true); QScriptValue val = qScriptValueFromValue(&eng, in); QVERIFY(val.isRegExp()); - QEXPECT_FAIL("", "JSC-based back-end doesn't preserve QRegExp::minimal (always false)", Continue); + QEXPECT_FAIL("", "QTBUG-6136: JSC-based back-end doesn't preserve QRegExp::minimal (always false)", Continue); QCOMPARE(val.toRegExp().isMinimal(), in.isMinimal()); } } @@ -2505,7 +2505,7 @@ void tst_QScriptEngine::stacktrace() QVERIFY(eng.hasUncaughtException()); QVERIFY(result.isError()); - QEXPECT_FAIL("", "", Abort); + QEXPECT_FAIL("", "QTBUG-6139: uncaughtExceptionBacktrace() doesn't give the full backtrace", Abort); QCOMPARE(eng.uncaughtExceptionBacktrace(), backtrace); QVERIFY(eng.hasUncaughtException()); QVERIFY(result.strictlyEquals(eng.uncaughtException())); @@ -3045,7 +3045,7 @@ void tst_QScriptEngine::errorConstructors() eng.clearExceptions(); QVERIFY(ret.toString().startsWith(name)); if (x != 0) - QEXPECT_FAIL("", "JSC doesn't assign lineNumber when errors are not thrown", Continue); + QEXPECT_FAIL("", "QTBUG-6138: JSC doesn't assign lineNumber when errors are not thrown", Continue); QCOMPARE(ret.property("lineNumber").toInt32(), i+2); } } @@ -3063,14 +3063,19 @@ void tst_QScriptEngine::argumentsProperty() { { QScriptEngine eng; - QEXPECT_FAIL("", "", Continue); - QVERIFY(eng.evaluate("arguments").isUndefined()); + { + QScriptValue ret = eng.evaluate("arguments"); + QVERIFY(ret.isError()); + QCOMPARE(ret.toString(), QString::fromLatin1("ReferenceError: Can't find variable: arguments")); + } eng.evaluate("arguments = 10"); - QScriptValue ret = eng.evaluate("arguments"); - QVERIFY(ret.isNumber()); - QCOMPARE(ret.toInt32(), 10); - QEXPECT_FAIL("", "", Continue); - QVERIFY(!eng.evaluate("delete arguments").toBoolean()); + { + QScriptValue ret = eng.evaluate("arguments"); + QVERIFY(ret.isNumber()); + QCOMPARE(ret.toInt32(), 10); + } + QVERIFY(eng.evaluate("delete arguments").toBoolean()); + QVERIFY(!eng.globalObject().property("arguments").isValid()); } { QScriptEngine eng; @@ -3081,11 +3086,11 @@ void tst_QScriptEngine::argumentsProperty() } { QScriptEngine eng; + QVERIFY(!eng.globalObject().property("arguments").isValid()); QScriptValue ret = eng.evaluate("(function() { arguments = 456; return arguments; })()"); QVERIFY(ret.isNumber()); QCOMPARE(ret.toInt32(), 456); - QEXPECT_FAIL("", "", Continue); - QVERIFY(eng.evaluate("arguments").isUndefined()); + QVERIFY(!eng.globalObject().property("arguments").isValid()); } { diff --git a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp index a761aac6ab..835f0c6c7e 100644 --- a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp +++ b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp @@ -85,6 +85,7 @@ private slots: void functionEntryAndExit_native(); void functionEntryAndExit_native2(); void functionEntryAndExit_nativeThrowing(); + void functionEntryAndExit_builtin_data(); void functionEntryAndExit_builtin(); void functionEntryAndExit_objects(); void functionEntryAndExit_slots(); @@ -114,6 +115,7 @@ private slots: void evaluateProgram(); void evaluateProgram_SyntaxError(); void evaluateNullProgram(); + void QTBUG6108(); private: double m_testProperty; @@ -475,7 +477,7 @@ void tst_QScriptEngineAgent::scriptLoadAndUnload_eval() spy->clear(); eng.evaluate("eval('function foo() { print(123); }')"); - QEXPECT_FAIL("","Eval is threaded in different way that in old backend", Abort); + QEXPECT_FAIL("","QTBUG-6140 Eval is threaded in different way that in old backend", Abort); QCOMPARE(spy->count(), 3); QCOMPARE(spy->at(0).type, ScriptEngineEvent::ScriptLoad); @@ -810,18 +812,42 @@ void tst_QScriptEngineAgent::functionEntryAndExit_nativeThrowing() delete spy; } +void tst_QScriptEngineAgent::functionEntryAndExit_builtin_data() +{ + QTest::addColumn<QString>("script"); + QTest::addColumn<QString>("result"); + + QTest::newRow("string native") << "'ciao'.toString()" << "ciao"; + QTest::newRow("string object") << "String('ciao').toString()" << "ciao"; + QTest::newRow("number native") << "(123).toString()" << "123"; + QTest::newRow("number object") << "Number(123).toString()" << "123"; + QTest::newRow("array native") << "['s','a'].toString()" << "s, a"; + QTest::newRow("array object") << "Array('s', 'a').toString()" << "s,a"; + QTest::newRow("boolean native") << "false.toString()" << "false"; + QTest::newRow("boolean object") << "Boolean(true).toString()" << "true"; + QTest::newRow("regexp native") << "/a/.toString()" << "/a/"; + QTest::newRow("regexp object") << "RegExp('a').toString()" << "/a/"; +} + /** check behaiviour of built-in function */ void tst_QScriptEngineAgent::functionEntryAndExit_builtin() { + QFETCH(QString, script); + QFETCH(QString, result); QScriptEngine eng; ScriptEngineSpy *spy = new ScriptEngineSpy(&eng, ~(ScriptEngineSpy::IgnoreFunctionEntry | ScriptEngineSpy::IgnoreFunctionExit)); { spy->clear(); - eng.evaluate("'ciao'.toString()"); - - if (qt_script_isJITEnabled()) - QEXPECT_FAIL("", "Some events are missing when JIT is enabled", Abort); + eng.evaluate(script); + + if (qt_script_isJITEnabled()) { + QEXPECT_FAIL("string native", "QTBUG-6187 Some events are missing when JIT is enabled", Abort); + QEXPECT_FAIL("number native", "QTBUG-6187 Some events are missing when JIT is enabled", Abort); + QEXPECT_FAIL("array native", "QTBUG-6187 Some events are missing when JIT is enabled", Abort); + QEXPECT_FAIL("boolean native", "QTBUG-6187 Some events are missing when JIT is enabled", Abort); + QEXPECT_FAIL("regexp native", "QTBUG-6187 Some events are missing when JIT is enabled", Abort); + } QCOMPARE(spy->count(), 4); // evaluate() entry @@ -834,14 +860,13 @@ void tst_QScriptEngineAgent::functionEntryAndExit_builtin() // built-in native function exit QCOMPARE(spy->at(2).type, ScriptEngineEvent::FunctionExit); QCOMPARE(spy->at(2).scriptId, qint64(-1)); - QVERIFY(spy->at(2).value.isString()); - QCOMPARE(spy->at(2).value.toString(), QString("ciao")); + QCOMPARE(spy->at(2).value.toString(), QString(result)); // evaluate() exit QCOMPARE(spy->at(3).type, ScriptEngineEvent::FunctionExit); QCOMPARE(spy->at(3).scriptId, spy->at(0).scriptId); QVERIFY(spy->at(3).value.isString()); - QCOMPARE(spy->at(3).value.toString(), QString("ciao")); + QCOMPARE(spy->at(3).value.toString(), QString(result)); } delete spy; } @@ -1160,16 +1185,16 @@ void tst_QScriptEngineAgent::positionChange_1() { spy->clear(); eng.evaluate(";"); - QEXPECT_FAIL("","JSC do not evaluate ';' to statemant",Continue); + QEXPECT_FAIL("","QTBUG-6142 JSC do not evaluate ';' to statemant",Continue); QCOMPARE(spy->count(), 1); if (spy->count()) { - QEXPECT_FAIL("","JSC do not evaluate ';' to statemant",Continue); + QEXPECT_FAIL("","QTBUG-6142 JSC do not evaluate ';' to statemant",Continue); QCOMPARE(spy->at(0).type, ScriptEngineEvent::PositionChange); - QEXPECT_FAIL("","JSC do not evaluate ';' to statemant",Continue); + QEXPECT_FAIL("","QTBUG-6142 JSC do not evaluate ';' to statemant",Continue); QVERIFY(spy->at(0).scriptId != -1); - QEXPECT_FAIL("","JSC do not evaluate ';' to statemant",Continue); + QEXPECT_FAIL("","QTBUG-6142 JSC do not evaluate ';' to statemant",Continue); QCOMPARE(spy->at(0).lineNumber, 1); - QEXPECT_FAIL("","JSC do not evaluate ';' to statemant",Continue); + QEXPECT_FAIL("","QTBUG-6142 JSC do not evaluate ';' to statemant",Continue); QCOMPARE(spy->at(0).columnNumber, 1); } } @@ -1551,7 +1576,7 @@ void tst_QScriptEngineAgent::positionChange_2() } { - QEXPECT_FAIL("","I believe the test is wrong. Expressions shouldn't call positionChange " + QEXPECT_FAIL("","QTBUG-6142 I believe the test is wrong. Expressions shouldn't call positionChange " "because statement '1+2' will call it at least twice, why debugger have to " "stop here so many times?", Abort); spy->clear(); @@ -2088,8 +2113,6 @@ void tst_QScriptEngineAgent::syntaxError() i = 2; QCOMPARE(spy->at(i).type, ScriptEngineEvent::ContextPush); - QEXPECT_FAIL("","The test is broken, contextPush event do not provide scriptId", Continue); - QVERIFY(spy->at(i).scriptId == -1); i = 3; QCOMPARE(spy->at(i).type, ScriptEngineEvent::FunctionEntry); QVERIFY(spy->at(i).scriptId == -1); @@ -2098,14 +2121,12 @@ void tst_QScriptEngineAgent::syntaxError() QVERIFY(spy->at(i).scriptId == -1); i = 5; QCOMPARE(spy->at(i).type, ScriptEngineEvent::ContextPop); - QEXPECT_FAIL("","The test is broken, contextPop event do not provide scriptId", Continue); - QVERIFY(spy->at(i).scriptId == -1); i = 6; QCOMPARE(spy->at(i).type, ScriptEngineEvent::ExceptionThrow); QCOMPARE(spy->at(i).scriptId, spy->at(0).scriptId); QVERIFY(!spy->at(i).hasExceptionHandler); QVERIFY(spy->at(i).value.isError()); - QEXPECT_FAIL("","There are other messages in JSC",Continue); + QEXPECT_FAIL("","QTBUG-6137 There are other messages in JSC",Continue); QCOMPARE(spy->at(i).value.toString(), QString("SyntaxError: Expected `}'")); QCOMPARE(spy->at(i).scriptId, spy->at(0).scriptId); i = 7; @@ -2138,7 +2159,7 @@ void tst_QScriptEngineAgent::extension_invoctaion() QCOMPARE(spy->at(1).lineNumber, lineNumber); QCOMPARE(spy->at(1).columnNumber, 1); - QEXPECT_FAIL("","In JSC Eval('debugger') returns undefined",Abort); + QEXPECT_FAIL("","QTBUG-6135 In JSC Eval('debugger') returns undefined",Abort); QVERIFY(ret.isString()); QCOMPARE(ret.toString(), QString::fromLatin1("extension(DebuggerInvocationRequest)")); } @@ -2389,5 +2410,32 @@ void tst_QScriptEngineAgent::evaluateNullProgram() QCOMPARE(spy->count(), 0); } +void tst_QScriptEngineAgent::QTBUG6108() +{ + QScriptEngine eng; + ScriptEngineSpy *spy = new ScriptEngineSpy(&eng); + eng.evaluate("eval('a = 1')"); + QCOMPARE(spy->count(), 5); + + QCOMPARE(spy->at(0).type, ScriptEngineEvent::ScriptLoad); + QVERIFY(spy->at(0).scriptId != -1); + + QCOMPARE(spy->at(1).type, ScriptEngineEvent::FunctionEntry); + QVERIFY(spy->at(1).scriptId != -1); + QCOMPARE(spy->at(1).scriptId, spy->at(0).scriptId); + + QCOMPARE(spy->at(2).type, ScriptEngineEvent::PositionChange); + QVERIFY(spy->at(2).scriptId != -1); + QCOMPARE(spy->at(2).scriptId, spy->at(0).scriptId); + QCOMPARE(spy->at(2).lineNumber, 1); + + QCOMPARE(spy->at(3).type, ScriptEngineEvent::FunctionExit); + QVERIFY(spy->at(3).scriptId != -1); + QCOMPARE(spy->at(3).scriptId, spy->at(0).scriptId); + + QCOMPARE(spy->at(4).type, ScriptEngineEvent::ScriptUnload); + QCOMPARE(spy->at(4).scriptId, spy->at(0).scriptId); +} + QTEST_MAIN(tst_QScriptEngineAgent) #include "tst_qscriptengineagent.moc" diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp index db46b66f4a..169a6887a8 100644 --- a/tests/auto/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp @@ -347,7 +347,6 @@ void tst_QSslSocket::constructing() QCOMPARE(socket.sslConfiguration(), QSslConfiguration::defaultConfiguration()); QCOMPARE(socket.errorString(), QString("Unknown error")); char c = '\0'; - QTest::ignoreMessage(QtWarningMsg, "QIODevice::getChar: Closed device"); QVERIFY(!socket.getChar(&c)); QCOMPARE(c, '\0'); QVERIFY(!socket.isOpen()); diff --git a/tests/auto/qstatemachine/tst_qstatemachine.cpp b/tests/auto/qstatemachine/tst_qstatemachine.cpp index fd39515a98..a13bb0d62b 100644 --- a/tests/auto/qstatemachine/tst_qstatemachine.cpp +++ b/tests/auto/qstatemachine/tst_qstatemachine.cpp @@ -209,6 +209,7 @@ private slots: void task260403_clonedSignals(); void postEventFromOtherThread(); void eventFilterForApplication(); + void eventClassesExported(); }; tst_QStateMachine::tst_QStateMachine() @@ -4307,5 +4308,12 @@ void tst_QStateMachine::eventFilterForApplication() QVERIFY(machine.configuration().contains(s2)); } +void tst_QStateMachine::eventClassesExported() +{ + // make sure this links + QStateMachine::WrappedEvent *wrappedEvent = new QStateMachine::WrappedEvent(0, 0); + QStateMachine::SignalEvent *signalEvent = new QStateMachine::SignalEvent(0, 0, QList<QVariant>()); +} + QTEST_MAIN(tst_QStateMachine) #include "tst_qstatemachine.moc" diff --git a/tests/auto/qstatusbar/tst_qstatusbar.cpp b/tests/auto/qstatusbar/tst_qstatusbar.cpp index 9774559f09..92d9185725 100644 --- a/tests/auto/qstatusbar/tst_qstatusbar.cpp +++ b/tests/auto/qstatusbar/tst_qstatusbar.cpp @@ -77,6 +77,7 @@ private slots: void insertPermanentWidget(); void setSizeGripEnabled(); void task194017_hiddenWidget(); + void QTBUG4334_hiddenOnMaximizedWindow(); private: QStatusBar *testWidget; @@ -257,6 +258,19 @@ void tst_QStatusBar::task194017_hiddenWidget() QVERIFY(!label->isVisible()); } +void tst_QStatusBar::QTBUG4334_hiddenOnMaximizedWindow() +{ + QMainWindow main; + QStatusBar statusbar; + statusbar.setSizeGripEnabled(true); + main.setStatusBar(&statusbar); + main.showMaximized(); + QTest::qWaitForWindowShown(&main); + QVERIFY(!statusbar.findChild<QSizeGrip*>()->isVisible()); + main.showNormal(); + QTest::qWaitForWindowShown(&main); + QVERIFY(statusbar.findChild<QSizeGrip*>()->isVisible()); +} QTEST_MAIN(tst_QStatusBar) #include "tst_qstatusbar.moc" diff --git a/tests/auto/qsysinfo/.gitignore b/tests/auto/qsysinfo/.gitignore deleted file mode 100644 index e50cae2834..0000000000 --- a/tests/auto/qsysinfo/.gitignore +++ /dev/null @@ -1 +0,0 @@ -tst_qsysinfo diff --git a/tests/auto/qsysinfo/qsysinfo.pro b/tests/auto/qsysinfo/qsysinfo.pro deleted file mode 100644 index e822fec7e8..0000000000 --- a/tests/auto/qsysinfo/qsysinfo.pro +++ /dev/null @@ -1,5 +0,0 @@ -load(qttest_p4) -SOURCES += tst_qsysinfo.cpp -QT = core - - diff --git a/tests/auto/qtabbar/tst_qtabbar.cpp b/tests/auto/qtabbar/tst_qtabbar.cpp index 2db72b924e..e83312d02a 100644 --- a/tests/auto/qtabbar/tst_qtabbar.cpp +++ b/tests/auto/qtabbar/tst_qtabbar.cpp @@ -295,6 +295,10 @@ void tst_QTabBar::setUsesScrollButtons() if (usesArrows != -128) tabBar.setUsesScrollButtons(usesArrows); QTEST(tabBar.usesScrollButtons(), "expectedArrows"); + + // Make sure style sheet does not override user set mode + tabBar.setStyleSheet("QWidget { background-color: #ABA8A6;}"); + QTEST(tabBar.usesScrollButtons(), "expectedArrows"); } void tst_QTabBar::removeLastTab() @@ -532,7 +536,7 @@ void tst_QTabBar::task251184_removeTab() QCOMPARE(bar.count(), 1); QCOMPARE(bar.currentIndex(), 0); - QCOMPARE(bar.tabText(bar.currentIndex()), QString("bar2")); + QCOMPARE(bar.tabText(bar.currentIndex()), QString("bar2")); } diff --git a/tests/auto/qtableview/tst_qtableview.cpp b/tests/auto/qtableview/tst_qtableview.cpp index f571e8a87d..50d6c670f3 100644 --- a/tests/auto/qtableview/tst_qtableview.cpp +++ b/tests/auto/qtableview/tst_qtableview.cpp @@ -198,6 +198,7 @@ private slots: void task191545_dragSelectRows(); void taskQTBUG_5062_spansInconsistency(); void taskQTBUG_4516_clickOnRichTextLabel(); + void taskQTBUG_5237_wheelEventOnHeader(); void mouseWheel_data(); void mouseWheel(); @@ -3015,6 +3016,14 @@ void tst_QTableView::spans_data() << QPoint(2, 0) << 1 << 2; + + QTest::newRow("QTBUG-6004: No failing Q_ASSERT, then it passes.") + << 5 << 5 + << (SpanList() << QRect(0, 0, 2, 2) << QRect(0, 0, 1, 1)) + << false + << QPoint(0, 0) + << 1 + << 1; } void tst_QTableView::spans() @@ -3613,17 +3622,9 @@ void tst_QTableView::mouseWheel_data() QTest::newRow("scroll down per item") << int(QAbstractItemView::ScrollPerItem) << -120 << 10 + qApp->wheelScrollLines() << 10 + qApp->wheelScrollLines(); -#ifdef Q_WS_MAC - // On Mac, we always scroll one pixel per 120 delta (rather than multiplying with - // singleStep) since wheel events are accelerated by the OS. - QTest::newRow("scroll down per pixel") - << int(QAbstractItemView::ScrollPerPixel) << -120 - << 10 + qApp->wheelScrollLines() << 10 + qApp->wheelScrollLines(); -#else QTest::newRow("scroll down per pixel") << int(QAbstractItemView::ScrollPerPixel) << -120 << 10 + qApp->wheelScrollLines() * 89 << 10 + qApp->wheelScrollLines() * 28; -#endif } void tst_QTableView::mouseWheel() @@ -3913,7 +3914,7 @@ void tst_QTableView::changeHeaderData() QTest::qWaitForWindowShown(&view); QString text = "long long long text"; - const int textWidth = view.fontMetrics().width(text); + const int textWidth = view.verticalHeader()->fontMetrics().width(text); QVERIFY(view.verticalHeader()->width() < textWidth); model.setHeaderData(2, Qt::Vertical, text); @@ -3922,6 +3923,22 @@ void tst_QTableView::changeHeaderData() QVERIFY(view.verticalHeader()->width() > textWidth); } +void tst_QTableView::taskQTBUG_5237_wheelEventOnHeader() +{ + QTableView view; + QStandardItemModel model(500,5); + view.setModel(&model); + view.show(); + QTest::qWaitForWindowShown(&view); + + int sbValueBefore = view.verticalScrollBar()->value(); + QHeaderView *header = view.verticalHeader(); + QTest::mouseMove(header); + QWheelEvent wheelEvent(header->geometry().center(), -720, 0, 0); + QApplication::sendEvent(header->viewport(), &wheelEvent); + int sbValueAfter = view.verticalScrollBar()->value(); + QVERIFY(sbValueBefore != sbValueAfter); +} QTEST_MAIN(tst_QTableView) #include "tst_qtableview.moc" diff --git a/tests/auto/qtcpserver/tst_qtcpserver.cpp b/tests/auto/qtcpserver/tst_qtcpserver.cpp index 25400966c9..8b86111f92 100644 --- a/tests/auto/qtcpserver/tst_qtcpserver.cpp +++ b/tests/auto/qtcpserver/tst_qtcpserver.cpp @@ -523,7 +523,7 @@ void tst_QTcpServer::waitForConnectionTest() QTcpSocket findLocalIpSocket; findLocalIpSocket.connectToHost(QtNetworkSettings::serverName(), 143); - QVERIFY(findLocalIpSocket.waitForConnected(2000)); + QVERIFY(findLocalIpSocket.waitForConnected(5000)); QTcpServer server; bool timeout = false; diff --git a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp index 4ed9fcaf88..863b8f51c2 100644 --- a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp +++ b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp @@ -371,7 +371,6 @@ void tst_QTcpSocket::constructing() QCOMPARE(socket->socketType(), QTcpSocket::TcpSocket); char c; - QTest::ignoreMessage(QtWarningMsg, "QIODevice::getChar: Closed device"); QCOMPARE(socket->getChar(&c), false); QCOMPARE((int) socket->bytesAvailable(), 0); QCOMPARE(socket->canReadLine(), false); @@ -777,7 +776,7 @@ void tst_QTcpSocket::unget() for (int i = 0; i < 10; i += 2) { while (socket->bytesAvailable() < 2) - QVERIFY(socket->waitForReadyRead(5000)); + QVERIFY(socket->waitForReadyRead(10000)); int bA = socket->bytesAvailable(); QVERIFY(socket->read(buf, 2) == 2); buf[2] = '\0'; @@ -830,7 +829,6 @@ void tst_QTcpSocket::openCloseOpenClose() QVERIFY(socket->socketType() == QTcpSocket::TcpSocket); char c; - QTest::ignoreMessage(QtWarningMsg, "QIODevice::getChar: Closed device"); QCOMPARE(socket->getChar(&c), false); QCOMPARE((int) socket->bytesAvailable(), 0); QCOMPARE(socket->canReadLine(), false); @@ -1959,7 +1957,6 @@ void tst_QTcpSocket::zeroAndMinusOneReturns() QCOMPARE(socket->write("BLUBBER"), qint64(-1)); QCOMPARE(socket->read(c, 16), qint64(-1)); QCOMPARE(socket->readLine(c, 16), qint64(-1)); - QTest::ignoreMessage(QtWarningMsg, "QIODevice::getChar: Closed device"); QVERIFY(!socket->getChar(c)); QVERIFY(!socket->putChar('a')); @@ -2118,7 +2115,7 @@ void tst_QTcpSocket::moveToThread0() QTcpSocket *socket = newSocket();; socket->connectToHost(QtNetworkSettings::serverName(), 143); socket->moveToThread(0); - QVERIFY(socket->waitForConnected(2000)); + QVERIFY(socket->waitForConnected(5000)); socket->write("XXX LOGOUT\r\n"); QVERIFY(socket->waitForBytesWritten(5000)); QVERIFY(socket->waitForDisconnected()); @@ -2129,7 +2126,7 @@ void tst_QTcpSocket::moveToThread0() QTcpSocket *socket = newSocket(); socket->moveToThread(0); socket->connectToHost(QtNetworkSettings::serverName(), 143); - QVERIFY(socket->waitForConnected(2000)); + QVERIFY(socket->waitForConnected(5000)); socket->write("XXX LOGOUT\r\n"); QVERIFY(socket->waitForBytesWritten(5000)); QVERIFY(socket->waitForDisconnected()); @@ -2139,7 +2136,7 @@ void tst_QTcpSocket::moveToThread0() // Case 3: Moved after writing, while waiting for bytes to be written. QTcpSocket *socket = newSocket(); socket->connectToHost(QtNetworkSettings::serverName(), 143); - QVERIFY(socket->waitForConnected(2000)); + QVERIFY(socket->waitForConnected(5000)); socket->write("XXX LOGOUT\r\n"); socket->moveToThread(0); QVERIFY(socket->waitForBytesWritten(5000)); @@ -2150,7 +2147,7 @@ void tst_QTcpSocket::moveToThread0() // Case 4: Moved after writing, while waiting for response. QTcpSocket *socket = newSocket(); socket->connectToHost(QtNetworkSettings::serverName(), 143); - QVERIFY(socket->waitForConnected(2000)); + QVERIFY(socket->waitForConnected(5000)); socket->write("XXX LOGOUT\r\n"); QVERIFY(socket->waitForBytesWritten(5000)); socket->moveToThread(0); @@ -2306,7 +2303,7 @@ void tst_QTcpSocket::invalidProxy() QCOMPARE(socket->state(), QAbstractSocket::UnconnectedState); } else { QCOMPARE(socket->state(), QAbstractSocket::ConnectingState); - QVERIFY(!socket->waitForConnected(2000)); + QVERIFY(!socket->waitForConnected(5000)); } QVERIFY(!socket->errorString().isEmpty()); @@ -2425,7 +2422,7 @@ void tst_QTcpSocket::proxyFactory() QCOMPARE(socket->state(), QAbstractSocket::UnconnectedState); } else { QCOMPARE(socket->state(), QAbstractSocket::ConnectingState); - QVERIFY(socket->waitForConnected(2000)); + QVERIFY(socket->waitForConnected(5000)); QCOMPARE(proxyAuthCalled, 1); } QVERIFY(!socket->errorString().isEmpty()); diff --git a/tests/auto/qtextedit/tst_qtextedit.cpp b/tests/auto/qtextedit/tst_qtextedit.cpp index fee030c9ef..bebc4bd528 100644 --- a/tests/auto/qtextedit/tst_qtextedit.cpp +++ b/tests/auto/qtextedit/tst_qtextedit.cpp @@ -200,6 +200,7 @@ private slots: void pasteFromQt3RichText(); void noWrapBackgrounds(); void preserveCharFormatAfterUnchangingSetPosition(); + void twoSameInputMethodEvents(); private: void createSelection(); @@ -2183,5 +2184,23 @@ void tst_QTextEdit::preserveCharFormatAfterUnchangingSetPosition() QCOMPARE(edit.textColor(), color); } +// Regression test for QTBUG-4696 +void tst_QTextEdit::twoSameInputMethodEvents() +{ + ed->setText("testLine"); + ed->show(); + QList<QInputMethodEvent::Attribute> attributes; + attributes.append(QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, + ed->textCursor().position(), + 0, + QVariant())); + + QInputMethodEvent event("PreEditText", attributes); + QApplication::sendEvent(ed, &event); + QCOMPARE(ed->document()->firstBlock().layout()->lineCount(), 1); + QApplication::sendEvent(ed, &event); + QCOMPARE(ed->document()->firstBlock().layout()->lineCount(), 1); +} + QTEST_MAIN(tst_QTextEdit) #include "tst_qtextedit.moc" diff --git a/tests/auto/qtextlayout/tst_qtextlayout.cpp b/tests/auto/qtextlayout/tst_qtextlayout.cpp index 7c3f4f2481..1df26b8ec7 100644 --- a/tests/auto/qtextlayout/tst_qtextlayout.cpp +++ b/tests/auto/qtextlayout/tst_qtextlayout.cpp @@ -1115,14 +1115,14 @@ void tst_QTextLayout::testTabDPIScale() QTextOption option = layout.textOption(); QList<QTextOption::Tab> tabs; QTextOption::Tab tab; - tab.position = 200; + tab.position = 300; tabs.append(tab); - tab.position = 400; + tab.position = 600; tab.type = QTextOption::RightTab; tabs.append(tab); - tab.position = 600; + tab.position = 800; tab.type = QTextOption::CenterTab; tabs.append(tab); option.setTabs(tabs); diff --git a/tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp b/tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp index 78e0ce6a83..2f9cc04f6d 100644 --- a/tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp +++ b/tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp @@ -858,6 +858,33 @@ void tst_QTextScriptEngine::malayalam() QSKIP("couln't find AkrutiMal2", SkipAll); } } + { + if (QFontDatabase().families(QFontDatabase::Malayalam).contains("Rachana")) { + QFont f("Rachana"); + const ShapeTable shape_table [] = { + { { 0xd37, 0xd4d, 0xd1f, 0xd4d, 0xd30, 0xd40, 0x0 }, + { 0x385, 0xa3, 0x0 } }, + { { 0xd2f, 0xd4d, 0xd15, 0xd4d, 0xd15, 0xd41, 0x0 }, + { 0x2ff, 0x0 } }, + { { 0xd33, 0xd4d, 0xd33, 0x0 }, + { 0x3f8, 0x0 } }, + { { 0xd2f, 0xd4d, 0xd15, 0xd4d, 0xd15, 0xd41, 0x0 }, + { 0x2ff, 0x0 } }, + + { {0}, {0} } + }; + + + const ShapeTable *s = shape_table; + while (s->unicode[0]) { + QVERIFY( shaping(f, s) ); + ++s; + } + } else { + QSKIP("couln't find Rachana", SkipAll); + } + } + #else QSKIP("X11 specific test", SkipAll); #endif diff --git a/tests/auto/qtreewidget/tst_qtreewidget.cpp b/tests/auto/qtreewidget/tst_qtreewidget.cpp index 621072ce38..0c6df4f37f 100644 --- a/tests/auto/qtreewidget/tst_qtreewidget.cpp +++ b/tests/auto/qtreewidget/tst_qtreewidget.cpp @@ -168,6 +168,8 @@ private slots: void task239150_editorWidth(); void setTextUpdate(); void taskQTBUG2844_visualItemRect(); + void setChildIndicatorPolicy(); + public slots: void itemSelectionChanged(); @@ -3290,6 +3292,57 @@ void tst_QTreeWidget::taskQTBUG2844_visualItemRect() QCOMPARE(tree.visualItemRect(&item), rectCol0 | rectCol1); } +void tst_QTreeWidget::setChildIndicatorPolicy() +{ + QTreeWidget treeWidget; + treeWidget.setColumnCount(1); + + class MyItemDelegate : public QStyledItemDelegate + { + public: + MyItemDelegate() : numPaints(0), expectChildren(false) { } + void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const + { + numPaints++; + QCOMPARE(!(option.state & QStyle::State_Children), !expectChildren); + QStyledItemDelegate::paint(painter, option, index); + } + mutable int numPaints; + bool expectChildren; + } delegate; + + treeWidget.setItemDelegate(&delegate); + treeWidget.show(); + + QTreeWidgetItem *item = new QTreeWidgetItem(QStringList("Hello")); + treeWidget.insertTopLevelItem(0, item); + QTest::qWait(50); + QTRY_VERIFY(delegate.numPaints > 0); + + delegate.numPaints = 0; + delegate.expectChildren = true; + item->setChildIndicatorPolicy(QTreeWidgetItem::ShowIndicator); + QApplication::processEvents(); + QTRY_COMPARE(delegate.numPaints, 1); + + delegate.numPaints = 0; + delegate.expectChildren = false; + item->setChildIndicatorPolicy(QTreeWidgetItem::DontShowIndicatorWhenChildless); + QApplication::processEvents(); + QTRY_COMPARE(delegate.numPaints, 1); + + delegate.numPaints = 0; + delegate.expectChildren = true; + new QTreeWidgetItem(item); + QApplication::processEvents(); + QTRY_COMPARE(delegate.numPaints, 1); + + delegate.numPaints = 0; + delegate.expectChildren = false; + item->setChildIndicatorPolicy(QTreeWidgetItem::DontShowIndicator); + QApplication::processEvents(); + QTRY_COMPARE(delegate.numPaints, 1); +} diff --git a/tests/auto/qudpsocket/tst_qudpsocket.cpp b/tests/auto/qudpsocket/tst_qudpsocket.cpp index 9418be0450..160d74c548 100644 --- a/tests/auto/qudpsocket/tst_qudpsocket.cpp +++ b/tests/auto/qudpsocket/tst_qudpsocket.cpp @@ -295,8 +295,8 @@ void tst_QUdpSocket::loop() QCOMPARE(paul.writeDatagram(paulMessage.data(), paulMessage.length(), peterAddress, peter.localPort()), qint64(paulMessage.length())); - QVERIFY(peter.waitForReadyRead(5000)); - QVERIFY(paul.waitForReadyRead(5000)); + QVERIFY(peter.waitForReadyRead(9000)); + QVERIFY(paul.waitForReadyRead(9000)); char peterBuffer[16*1024]; char paulBuffer[16*1024]; if (success) { diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index 9692c6e4cf..1e3f5f8619 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -384,6 +384,8 @@ private slots: void activateWindow(); + void openModal_taskQTBUG_5804(); + #ifdef Q_OS_SYMBIAN void cbaVisibility(); #endif @@ -9583,6 +9585,29 @@ void tst_QWidget::activateWindow() QTRY_VERIFY(!mainwindow2->isActiveWindow()); } +void tst_QWidget::openModal_taskQTBUG_5804() +{ + class Widget : public QWidget + { + public: + Widget(QWidget *parent) : QWidget(parent) + { + } + ~Widget() + { + QMessageBox msgbox; + QTimer::singleShot(10, &msgbox, SLOT(accept())); + msgbox.exec(); //open a modal dialog + } + }; + + QWidget *win = new QWidget; + new Widget(win); + win->show(); + QTest::qWaitForWindowShown(win); + delete win; +} + #ifdef Q_OS_SYMBIAN void tst_QWidget::cbaVisibility() { diff --git a/tests/auto/qxmlstream/data/doctypeEmptyMarkupDecl.ref b/tests/auto/qxmlstream/data/doctypeEmptyMarkupDecl.ref new file mode 100644 index 0000000000..ea85e32c1d --- /dev/null +++ b/tests/auto/qxmlstream/data/doctypeEmptyMarkupDecl.ref @@ -0,0 +1,7 @@ +StartDocument( ) +Comment( text=" Empty markup declaration in a doctype. " ) +DTD( text=" +<!DOCTYPE doc []>" dtdName="doc" ) +StartElement( name="doc" qualifiedName="doc" ) +EndElement( name="doc" qualifiedName="doc" ) +EndDocument( ) diff --git a/tests/auto/qxmlstream/data/doctypeEmptyMarkupDecl.xml b/tests/auto/qxmlstream/data/doctypeEmptyMarkupDecl.xml new file mode 100644 index 0000000000..1c66c0c3bc --- /dev/null +++ b/tests/auto/qxmlstream/data/doctypeEmptyMarkupDecl.xml @@ -0,0 +1,3 @@ +<!-- Empty markup declaration in a doctype. --> +<!DOCTYPE doc []> +<doc></doc> diff --git a/tests/auto/rcc/rcc.pro b/tests/auto/rcc/rcc.pro index d6a208335c..1759b48a0e 100644 --- a/tests/auto/rcc/rcc.pro +++ b/tests/auto/rcc/rcc.pro @@ -4,3 +4,9 @@ TARGET = tst_rcc SOURCES += tst_rcc.cpp +wince* { + DEFINES += SRCDIR=\\\"\\\" +} else { + DEFINES += SRCDIR=\\\"$$PWD/\\\" +} + diff --git a/tests/auto/rcc/tst_rcc.cpp b/tests/auto/rcc/tst_rcc.cpp index c9e3d76987..2fe0dc44e0 100644 --- a/tests/auto/rcc/tst_rcc.cpp +++ b/tests/auto/rcc/tst_rcc.cpp @@ -102,7 +102,7 @@ void tst_rcc::rcc_data() QTest::addColumn<QString>("qrcfile"); QTest::addColumn<QString>("expected"); - QTest::newRow("images") << "data" << "images.qrc" << "images.expected"; + QTest::newRow("images") << SRCDIR "data" << "images.qrc" << "images.expected"; } void tst_rcc::rcc() diff --git a/tests/auto/windowsmobile/test/test.pro b/tests/auto/windowsmobile/test/test.pro index b7f65a98ee..61e275dec8 100644 --- a/tests/auto/windowsmobile/test/test.pro +++ b/tests/auto/windowsmobile/test/test.pro @@ -5,7 +5,7 @@ HEADERS += ddhelper.h SOURCES += tst_windowsmobile.cpp ddhelper.cpp RESOURCES += windowsmobile.qrc -TARGET = tst_windowsmobile +TARGET = ../tst_windowsmobile wincewm*: { addFiles.sources = $$OUT_PWD/../testQMenuBar/*.exe diff --git a/tests/auto/windowsmobile/testQMenuBar/testQMenuBar.pro b/tests/auto/windowsmobile/testQMenuBar/testQMenuBar.pro index 6dd288b46f..87986e4d96 100644 --- a/tests/auto/windowsmobile/testQMenuBar/testQMenuBar.pro +++ b/tests/auto/windowsmobile/testQMenuBar/testQMenuBar.pro @@ -1,2 +1,3 @@ SOURCES += main.cpp -DESTDIR = ./ +TARGET = ../testQMenuBar + diff --git a/tests/manual/keypadnavigation/keypadnavigation.ui b/tests/manual/keypadnavigation/keypadnavigation.ui index 039889b8c7..8b456d93e8 100644 --- a/tests/manual/keypadnavigation/keypadnavigation.ui +++ b/tests/manual/keypadnavigation/keypadnavigation.ui @@ -1060,75 +1060,100 @@ As a reward you can try out the QDial, below.</string> </widget> <widget class="QWidget" name="m_pageDialogs"> <layout class="QVBoxLayout" name="verticalLayout_13"> + <property name="margin"> + <number>0</number> + </property> <item> - <widget class="QPushButton" name="m_buttonGetOpenFileName"> - <property name="text"> - <string>getOpenFileName()</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="m_buttonGetSaveFileName"> - <property name="text"> - <string>getSaveFileName()</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="m_buttonGetExistingDirectory"> - <property name="text"> - <string>getExistingDirectory()</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="m_buttonGetColor"> - <property name="text"> - <string>getColor()</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="m_buttonGetFont"> - <property name="text"> - <string>getFont()</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="m_buttonQuestion"> - <property name="text"> - <string>question()</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="m_buttonAboutQt"> - <property name="text"> - <string>aboutQt()</string> + <widget class="QScrollArea" name="scrollArea_5"> + <property name="frameShape"> + <enum>QFrame::NoFrame</enum> </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="m_buttonGetItem"> - <property name="text"> - <string>getItem()</string> + <property name="widgetResizable"> + <bool>true</bool> </property> + <widget class="QWidget" name="scrollAreaWidgetContents_5"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>264</width> + <height>356</height> + </rect> + </property> + <layout class="QVBoxLayout" name="verticalLayout_14"> + <item> + <widget class="QPushButton" name="m_buttonGetOpenFileName"> + <property name="text"> + <string>getOpenFileName()</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="m_buttonGetSaveFileName"> + <property name="text"> + <string>getSaveFileName()</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="m_buttonGetExistingDirectory"> + <property name="text"> + <string>getExistingDirectory()</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="m_buttonGetColor"> + <property name="text"> + <string>getColor()</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="m_buttonGetFont"> + <property name="text"> + <string>getFont()</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="m_buttonQuestion"> + <property name="text"> + <string>question()</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="m_buttonAboutQt"> + <property name="text"> + <string>aboutQt()</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="m_buttonGetItem"> + <property name="text"> + <string>getItem()</string> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer_3"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>103</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> </widget> </item> - <item> - <spacer name="verticalSpacer_3"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>104</height> - </size> - </property> - </spacer> - </item> </layout> </widget> </widget> @@ -1155,7 +1180,7 @@ As a reward you can try out the QDial, below.</string> <addaction name="m_actionLayoutChaos"/> <addaction name="m_actionLayoutDialogs"/> </widget> - <widget class="QMenu" name="menuNavigation_mode"> + <widget class="QMenu" name="m_menuNavigation_mode"> <property name="title"> <string>Navigation mode</string> </property> @@ -1166,7 +1191,7 @@ As a reward you can try out the QDial, below.</string> <addaction name="m_actionModeCursorForceVisible"/> </widget> <addaction name="menuUi_layout"/> - <addaction name="menuNavigation_mode"/> + <addaction name="m_menuNavigation_mode"/> </widget> <action name="m_actionLayoutVerticalSimple"> <property name="text"> diff --git a/tests/manual/keypadnavigation/main.cpp b/tests/manual/keypadnavigation/main.cpp index d1cc8a75ad..84b3d78d89 100644 --- a/tests/manual/keypadnavigation/main.cpp +++ b/tests/manual/keypadnavigation/main.cpp @@ -70,6 +70,7 @@ public: } connect(&m_layoutSignalMapper, SIGNAL(mapped(QWidget*)), ui->m_stackWidget, SLOT(setCurrentWidget(QWidget*))); +#ifdef QT_KEYPAD_NAVIGATION const struct { QObject *action; Qt::NavigationMode mode; @@ -85,6 +86,9 @@ public: m_modeSignalMapper.setMapping(modeMappings[i].action, int(modeMappings[i].mode)); } connect(&m_modeSignalMapper, SIGNAL(mapped(int)), SLOT(setNavigationMode(int))); +#else // QT_KEYPAD_NAVIGATION + ui->m_menuNavigation_mode->deleteLater(); +#endif // QT_KEYPAD_NAVIGATION const struct { QObject *button; @@ -112,10 +116,12 @@ public: } protected slots: +#ifdef QT_KEYPAD_NAVIGATION void setNavigationMode(int mode) { QApplication::setNavigationMode(Qt::NavigationMode(mode)); } +#endif // QT_KEYPAD_NAVIGATION void openDialog(int dialog) { @@ -163,7 +169,9 @@ private: Ui_KeypadNavigation *ui; QSignalMapper m_layoutSignalMapper; +#ifdef QT_KEYPAD_NAVIGATION QSignalMapper m_modeSignalMapper; +#endif // QT_KEYPAD_NAVIGATION QSignalMapper m_dialogSignalMapper; }; diff --git a/tools/activeqt/testcon/mainwindow.cpp b/tools/activeqt/testcon/mainwindow.cpp index 71cbab655f..c4747097ff 100644 --- a/tools/activeqt/testcon/mainwindow.cpp +++ b/tools/activeqt/testcon/mainwindow.cpp @@ -204,7 +204,7 @@ void MainWindow::on_actionControlProperties_triggered() if (!dlgProperties) { dlgProperties = new ChangeProperties(this); - connect(container, SIGNAL(propertyChanged(const QString&)), dlgProperties, SLOT(updateProperties())); + connect(container, SIGNAL(propertyChanged(QString)), dlgProperties, SLOT(updateProperties())); } dlgProperties->setControl(container); dlgProperties->show(); @@ -336,8 +336,8 @@ void MainWindow::on_actionScriptingLoad_triggered() QAxScript *script = scripts->load(file, file); if (script) { - connect(script, SIGNAL(error(int, const QString&, int, const QString&)), - this, SLOT(logMacro(int, const QString&, int, const QString&))); + connect(script, SIGNAL(error(int,QString,int,QString)), + this, SLOT(logMacro(int,QString,int,QString))); actionScriptingRun->setEnabled(true); } #else @@ -374,17 +374,17 @@ void MainWindow::updateGUI() QAxWidget *ax = qobject_cast<QAxWidget*>(container); if (ax) { - container->disconnect(SIGNAL(signal(const QString&, int, void*))); + container->disconnect(SIGNAL(signal(QString,int,void*))); if (actionLogSignals->isChecked()) - connect(container, SIGNAL(signal(const QString&, int, void*)), this, SLOT(logSignal(const QString&, int, void*))); + connect(container, SIGNAL(signal(QString,int,void*)), this, SLOT(logSignal(QString,int,void*))); - container->disconnect(SIGNAL(exception(int,const QString&,const QString&,const QString&))); - connect(container, SIGNAL(exception(int,const QString&,const QString&,const QString&)), - this, SLOT(logException(int,const QString&,const QString&,const QString&))); + container->disconnect(SIGNAL(exception(int,QString,QString,QString))); + connect(container, SIGNAL(exception(int,QString,QString,QString)), + this, SLOT(logException(int,QString,QString,QString))); - container->disconnect(SIGNAL(propertyChanged(const QString&))); + container->disconnect(SIGNAL(propertyChanged(QString))); if (actionLogProperties->isChecked()) - connect(container, SIGNAL(propertyChanged(const QString&)), this, SLOT(logPropertyChanged(const QString&))); + connect(container, SIGNAL(propertyChanged(QString)), this, SLOT(logPropertyChanged(QString))); container->blockSignals(actionFreezeEvents->isChecked()); } diff --git a/tools/assistant/compat/helpdialog.cpp b/tools/assistant/compat/helpdialog.cpp index 97bd54b1f8..4864965ae0 100644 --- a/tools/assistant/compat/helpdialog.cpp +++ b/tools/assistant/compat/helpdialog.cpp @@ -262,7 +262,7 @@ void HelpDialog::initialize() connect(ui.listBookmarks, SIGNAL(itemActivated(QTreeWidgetItem*,int)), this, SLOT(showTopic(QTreeWidgetItem*))); connect(ui.listBookmarks, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showTreeItemMenu(QPoint))); - connect(ui.termsEdit, SIGNAL(textChanged(const QString&)), this, SLOT(updateSearchButton(const QString&))); + connect(ui.termsEdit, SIGNAL(textChanged(QString)), this, SLOT(updateSearchButton(QString))); connect(ui.resultBox, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showListItemMenu(QPoint))); diff --git a/tools/assistant/compat/tabbedbrowser.cpp b/tools/assistant/compat/tabbedbrowser.cpp index 9c1a1fe041..da577d397e 100644 --- a/tools/assistant/compat/tabbedbrowser.cpp +++ b/tools/assistant/compat/tabbedbrowser.cpp @@ -217,7 +217,7 @@ void TabbedBrowser::init() opt.init(tabBar); opt.shape = tabBar->shape(); tabBar->setContextMenuPolicy(Qt::CustomContextMenu); - connect(tabBar, SIGNAL(customContextMenuRequested(const QPoint&)), SLOT(openTabMenu(const QPoint&))); + connect(tabBar, SIGNAL(customContextMenuRequested(QPoint)), SLOT(openTabMenu(QPoint))); } // workaround for sgi style @@ -248,7 +248,7 @@ void TabbedBrowser::init() QObject::connect(ui.toolPrevious, SIGNAL(clicked()), this, SLOT(findPrevious())); QObject::connect(ui.toolNext, SIGNAL(clicked()), this, SLOT(findNext())); QObject::connect(ui.editFind, SIGNAL(returnPressed()), this, SLOT(findNext())); - QObject::connect(ui.editFind, SIGNAL(textEdited(const QString&)), + QObject::connect(ui.editFind, SIGNAL(textEdited(QString)), this, SLOT(find(QString))); ui.frameFind->setVisible(false); ui.labelWrapped->setVisible(false); diff --git a/tools/assistant/lib/qhelpcontentwidget.cpp b/tools/assistant/lib/qhelpcontentwidget.cpp index 097105cdc1..af5f9e2620 100644 --- a/tools/assistant/lib/qhelpcontentwidget.cpp +++ b/tools/assistant/lib/qhelpcontentwidget.cpp @@ -518,8 +518,8 @@ QHelpContentWidget::QHelpContentWidget() { header()->hide(); setUniformRowHeights(true); - connect(this, SIGNAL(activated(const QModelIndex&)), - this, SLOT(showLink(const QModelIndex&))); + connect(this, SIGNAL(activated(QModelIndex)), + this, SLOT(showLink(QModelIndex))); } /*! diff --git a/tools/assistant/lib/qhelpengine.cpp b/tools/assistant/lib/qhelpengine.cpp index 2194ae95e9..97019bb9c7 100644 --- a/tools/assistant/lib/qhelpengine.cpp +++ b/tools/assistant/lib/qhelpengine.cpp @@ -80,7 +80,7 @@ void QHelpEnginePrivate::init(const QString &collectionFile, connect(helpEngineCore, SIGNAL(setupFinished()), this, SLOT(applyCurrentFilter())); - connect(helpEngineCore, SIGNAL(currentFilterChanged(const QString&)), + connect(helpEngineCore, SIGNAL(currentFilterChanged(QString)), this, SLOT(applyCurrentFilter())); } diff --git a/tools/assistant/lib/qhelpenginecore.cpp b/tools/assistant/lib/qhelpenginecore.cpp index 140e99a786..bd150d615d 100644 --- a/tools/assistant/lib/qhelpenginecore.cpp +++ b/tools/assistant/lib/qhelpenginecore.cpp @@ -66,8 +66,8 @@ void QHelpEngineCorePrivate::init(const QString &collectionFile, { q = helpEngineCore; collectionHandler = new QHelpCollectionHandler(collectionFile, helpEngineCore); - connect(collectionHandler, SIGNAL(error(const QString&)), - this, SLOT(errorReceived(const QString&))); + connect(collectionHandler, SIGNAL(error(QString)), + this, SLOT(errorReceived(QString))); needsSetup = true; } @@ -359,19 +359,21 @@ bool QHelpEngineCore::unregisterDocumentation(const QString &namespaceName) */ QString QHelpEngineCore::documentationFileName(const QString &namespaceName) { - QString res; - if (!d->setup()) - return res; - const QHelpCollectionHandler::DocInfoList docList = d->collectionHandler->registeredDocumentations(); - foreach(const QHelpCollectionHandler::DocInfo info, docList) { - if (info.namespaceName == namespaceName) { - QFileInfo fi(d->collectionHandler->collectionFile()); - fi.setFile(fi.absolutePath() + QDir::separator() + info.fileName); - res = QDir::cleanPath(fi.absoluteFilePath()); - break; + if (d->setup()) { + const QHelpCollectionHandler::DocInfoList docList = + d->collectionHandler->registeredDocumentations(); + foreach(const QHelpCollectionHandler::DocInfo info, docList) { + if (info.namespaceName == namespaceName) { + if (QDir::isAbsolutePath(info.fileName)) + return QDir::cleanPath(info.fileName); + + QFileInfo fi(d->collectionHandler->collectionFile()); + fi.setFile(fi.absolutePath() + QDir::separator() + info.fileName); + return QDir::cleanPath(fi.absoluteFilePath()); + } } } - return res; + return QString(); } /*! diff --git a/tools/assistant/lib/qhelpindexwidget.cpp b/tools/assistant/lib/qhelpindexwidget.cpp index cef887f0d4..475a1fe06e 100644 --- a/tools/assistant/lib/qhelpindexwidget.cpp +++ b/tools/assistant/lib/qhelpindexwidget.cpp @@ -391,8 +391,8 @@ QHelpIndexWidget::QHelpIndexWidget() { setEditTriggers(QAbstractItemView::NoEditTriggers); setUniformItemSizes(true); - connect(this, SIGNAL(activated(const QModelIndex&)), - this, SLOT(showLink(const QModelIndex&))); + connect(this, SIGNAL(activated(QModelIndex)), + this, SLOT(showLink(QModelIndex))); } void QHelpIndexWidget::showLink(const QModelIndex &index) diff --git a/tools/assistant/lib/qhelpsearchresultwidget.cpp b/tools/assistant/lib/qhelpsearchresultwidget.cpp index c0d17dd9a8..75ea987b31 100644 --- a/tools/assistant/lib/qhelpsearchresultwidget.cpp +++ b/tools/assistant/lib/qhelpsearchresultwidget.cpp @@ -67,8 +67,8 @@ public: : QTreeWidget(parent) { header()->hide(); - connect(this, SIGNAL(itemActivated(QTreeWidgetItem*, int)), - this, SLOT(itemActivated(QTreeWidgetItem*, int))); + connect(this, SIGNAL(itemActivated(QTreeWidgetItem*,int)), + this, SLOT(itemActivated(QTreeWidgetItem*,int))); } void showResultPage(const QList<QHelpSearchEngine::SearchHit> hits) @@ -99,8 +99,8 @@ public: QCLuceneResultWidget(QWidget *parent = 0) : QTextBrowser(parent) { - connect(this, SIGNAL(anchorClicked(const QUrl&)), - this, SIGNAL(requestShowLink(const QUrl&))); + connect(this, SIGNAL(anchorClicked(QUrl)), + this, SIGNAL(requestShowLink(QUrl))); setContextMenuPolicy(Qt::NoContextMenu); } @@ -385,8 +385,8 @@ QHelpSearchResultWidget::QHelpSearchResultWidget(QHelpSearchEngine *engine) d->resultTextBrowser = new QCLuceneResultWidget(this); vLayout->addWidget(d->resultTextBrowser); - connect(d->resultTextBrowser, SIGNAL(requestShowLink(const QUrl&)), this, - SIGNAL(requestShowLink(const QUrl&))); + connect(d->resultTextBrowser, SIGNAL(requestShowLink(QUrl)), this, + SIGNAL(requestShowLink(QUrl))); connect(d->nextResultPage, SIGNAL(clicked()), d, SLOT(showNextResultPage())); connect(d->lastResultPage, SIGNAL(clicked()), d, SLOT(showLastResultPage())); @@ -401,8 +401,8 @@ QHelpSearchResultWidget::QHelpSearchResultWidget(QHelpSearchEngine *engine) #else d->resultTreeWidget = new QDefaultResultWidget(this); vLayout->addWidget(d->resultTreeWidget); - connect(d->resultTreeWidget, SIGNAL(requestShowLink(const QUrl&)), this, - SIGNAL(requestShowLink(const QUrl&))); + connect(d->resultTreeWidget, SIGNAL(requestShowLink(QUrl)), this, + SIGNAL(requestShowLink(QUrl))); #endif connect(engine, SIGNAL(searchingFinished(int)), d, SLOT(setResults(int))); diff --git a/tools/assistant/tools/assistant/bookmarkmanager.cpp b/tools/assistant/tools/assistant/bookmarkmanager.cpp index 511a56ec6f..70f3157667 100644 --- a/tools/assistant/tools/assistant/bookmarkmanager.cpp +++ b/tools/assistant/tools/assistant/bookmarkmanager.cpp @@ -630,7 +630,7 @@ BookmarkManager::BookmarkManager(QHelpEngineCore *_helpEngine) SLOT(itemChanged(QStandardItem*))); connect(treeModel, SIGNAL(itemChanged(QStandardItem*)), this, SIGNAL(bookmarksChanged())); - connect(treeModel, SIGNAL(rowsRemoved(QModelIndex, int, int)), + connect(treeModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SIGNAL(bookmarksChanged())); } diff --git a/tools/assistant/tools/assistant/centralwidget.cpp b/tools/assistant/tools/assistant/centralwidget.cpp index 67d803dc80..6f6875f69e 100644 --- a/tools/assistant/tools/assistant/centralwidget.cpp +++ b/tools/assistant/tools/assistant/centralwidget.cpp @@ -227,10 +227,10 @@ CentralWidget::CentralWidget(QHelpEngine *engine, MainWindow *parent) resourcePath.append(QLatin1String("win")); #else resourcePath.append(QLatin1String("mac")); + tabWidget->setDocumentMode(true); #endif tabWidget = new QTabWidget(this); - tabWidget->setDocumentMode(true); connect(tabWidget, SIGNAL(currentChanged(int)), this, SLOT(currentPageChanged(int))); diff --git a/tools/assistant/tools/assistant/helpviewer.cpp b/tools/assistant/tools/assistant/helpviewer.cpp index 35476525a7..f1b7745568 100644 --- a/tools/assistant/tools/assistant/helpviewer.cpp +++ b/tools/assistant/tools/assistant/helpviewer.cpp @@ -292,7 +292,7 @@ HelpViewer::HelpViewer(QHelpEngine *engine, CentralWidget *parent) SLOT(actionChanged())); connect(pageAction(QWebPage::Forward), SIGNAL(changed()), this, SLOT(actionChanged())); - connect(page(), SIGNAL(linkHovered(QString, QString, QString)), this, + connect(page(), SIGNAL(linkHovered(QString,QString,QString)), this, SIGNAL(highlighted(QString))); connect(this, SIGNAL(urlChanged(QUrl)), this, SIGNAL(sourceChanged(QUrl))); connect(this, SIGNAL(loadFinished(bool)), this, SLOT(setLoadFinished(bool))); diff --git a/tools/assistant/tools/assistant/indexwindow.cpp b/tools/assistant/tools/assistant/indexwindow.cpp index 3829cdbaa7..6d35649ccc 100644 --- a/tools/assistant/tools/assistant/indexwindow.cpp +++ b/tools/assistant/tools/assistant/indexwindow.cpp @@ -80,10 +80,10 @@ IndexWindow::IndexWindow(QHelpEngine *helpEngine, QWidget *parent) SLOT(disableSearchLineEdit())); connect(m_helpEngine->indexModel(), SIGNAL(indexCreated()), this, SLOT(enableSearchLineEdit())); - connect(m_indexWidget, SIGNAL(linkActivated(QUrl, QString)), this, + connect(m_indexWidget, SIGNAL(linkActivated(QUrl,QString)), this, SIGNAL(linkActivated(QUrl))); - connect(m_indexWidget, SIGNAL(linksActivated(QMap<QString, QUrl>, QString)), - this, SIGNAL(linksActivated(QMap<QString, QUrl>, QString))); + connect(m_indexWidget, SIGNAL(linksActivated(QMap<QString,QUrl>,QString)), + this, SIGNAL(linksActivated(QMap<QString,QUrl>,QString))); connect(m_searchLineEdit, SIGNAL(returnPressed()), m_indexWidget, SLOT(activateCurrentItem())); layout->addWidget(m_indexWidget); diff --git a/tools/assistant/tools/assistant/installdialog.cpp b/tools/assistant/tools/assistant/installdialog.cpp index b1ea49e87c..ea0bd29984 100644 --- a/tools/assistant/tools/assistant/installdialog.cpp +++ b/tools/assistant/tools/assistant/installdialog.cpp @@ -76,12 +76,12 @@ InstallDialog::InstallDialog(QHelpEngineCore *helpEngine, QWidget *parent, m_windowTitle = tr("Install Documentation"); m_http = new QHttp(this); - connect(m_http, SIGNAL(requestFinished(int, bool)), - this, SLOT(httpRequestFinished(int, bool))); - connect(m_http, SIGNAL(dataReadProgress(int, int)), - this, SLOT(updateDataReadProgress(int, int))); - connect(m_http, SIGNAL(responseHeaderReceived(const QHttpResponseHeader &)), - this, SLOT(readResponseHeader(const QHttpResponseHeader &))); + connect(m_http, SIGNAL(requestFinished(int,bool)), + this, SLOT(httpRequestFinished(int,bool))); + connect(m_http, SIGNAL(dataReadProgress(int,int)), + this, SLOT(updateDataReadProgress(int,int))); + connect(m_http, SIGNAL(responseHeaderReceived(QHttpResponseHeader)), + this, SLOT(readResponseHeader(QHttpResponseHeader))); connect(m_ui.installButton, SIGNAL(clicked()), this, SLOT(install())); connect(m_ui.cancelButton, SIGNAL(clicked()), this, SLOT(cancelDownload())); connect(m_ui.browseButton, SIGNAL(clicked()), this, SLOT(browseDirectories())); diff --git a/tools/assistant/tools/assistant/mainwindow.cpp b/tools/assistant/tools/assistant/mainwindow.cpp index 01c4f7579e..1adb218a3a 100644 --- a/tools/assistant/tools/assistant/mainwindow.cpp +++ b/tools/assistant/tools/assistant/mainwindow.cpp @@ -592,8 +592,8 @@ void MainWindow::setupActions() SLOT(updateNavigationItems())); connect(m_centralWidget, SIGNAL(highlighted(QString)), statusBar(), SLOT(showMessage(QString))); - connect(m_centralWidget, SIGNAL(addNewBookmark(QString, QString)), this, - SLOT(addNewBookmark(QString, QString))); + connect(m_centralWidget, SIGNAL(addNewBookmark(QString,QString)), this, + SLOT(addNewBookmark(QString,QString))); // bookmarks connect(m_bookmarkWidget, SIGNAL(requestShowLink(QUrl)), m_centralWidget, @@ -604,8 +604,8 @@ void MainWindow::setupActions() // index window connect(m_indexWindow, SIGNAL(linkActivated(QUrl)), m_centralWidget, SLOT(setSource(QUrl))); - connect(m_indexWindow, SIGNAL(linksActivated(QMap<QString, QUrl>, QString)), - this, SLOT(showTopicChooser(QMap<QString, QUrl>, QString))); + connect(m_indexWindow, SIGNAL(linksActivated(QMap<QString,QUrl>,QString)), + this, SLOT(showTopicChooser(QMap<QString,QUrl>,QString))); connect(m_indexWindow, SIGNAL(escapePressed()), this, SLOT(activateCurrentCentralWidgetTab())); diff --git a/tools/assistant/tools/assistant/preferencesdialog.cpp b/tools/assistant/tools/assistant/preferencesdialog.cpp index d964015aba..03e4be0ea8 100644 --- a/tools/assistant/tools/assistant/preferencesdialog.cpp +++ b/tools/assistant/tools/assistant/preferencesdialog.cpp @@ -83,11 +83,11 @@ PreferencesDialog::PreferencesDialog(QHelpEngineCore *helpEngine, QWidget *paren m_ui.attributeWidget->header()->hide(); m_ui.attributeWidget->setRootIsDecorated(false); - connect(m_ui.attributeWidget, SIGNAL(itemChanged(QTreeWidgetItem*, int)), + connect(m_ui.attributeWidget, SIGNAL(itemChanged(QTreeWidgetItem*,int)), this, SLOT(updateFilterMap())); connect(m_ui.filterWidget, - SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), this, + SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), this, SLOT(updateAttributes(QListWidgetItem*))); connect(m_ui.filterAddButton, SIGNAL(clicked()), this, diff --git a/tools/assistant/tools/assistant/remotecontrol.cpp b/tools/assistant/tools/assistant/remotecontrol.cpp index 474a6810c3..7d89b553f6 100644 --- a/tools/assistant/tools/assistant/remotecontrol.cpp +++ b/tools/assistant/tools/assistant/remotecontrol.cpp @@ -117,8 +117,8 @@ RemoteControl::RemoteControl(MainWindow *mainWindow, QHelpEngine *helpEngine) connect(m_mainWindow, SIGNAL(initDone()), this, SLOT(applyCache())); #ifdef Q_OS_WIN StdInListenerWin *l = new StdInListenerWin(this); - connect(l, SIGNAL(receivedCommand(const QString&)), - this, SLOT(handleCommandString(const QString&))); + connect(l, SIGNAL(receivedCommand(QString)), + this, SLOT(handleCommandString(QString))); l->start(); #else QSocketNotifier *notifier = new QSocketNotifier(fileno(stdin), diff --git a/tools/assistant/tools/qhelpconverter/generalpage.cpp b/tools/assistant/tools/qhelpconverter/generalpage.cpp index 0f48857012..4259e35b18 100644 --- a/tools/assistant/tools/qhelpconverter/generalpage.cpp +++ b/tools/assistant/tools/qhelpconverter/generalpage.cpp @@ -52,9 +52,9 @@ GeneralPage::GeneralPage(QWidget *parent) "folder for the documentation.")); m_ui.setupUi(this); - connect(m_ui.namespaceLineEdit, SIGNAL(textChanged(const QString&)), + connect(m_ui.namespaceLineEdit, SIGNAL(textChanged(QString)), this, SIGNAL(completeChanged())); - connect(m_ui.folderLineEdit, SIGNAL(textChanged(const QString&)), + connect(m_ui.folderLineEdit, SIGNAL(textChanged(QString)), this, SIGNAL(completeChanged())); m_ui.namespaceLineEdit->setText(QLatin1String("mycompany.com")); diff --git a/tools/assistant/tools/qhelpconverter/outputpage.cpp b/tools/assistant/tools/qhelpconverter/outputpage.cpp index 98e5137b5f..b1c749627a 100644 --- a/tools/assistant/tools/qhelpconverter/outputpage.cpp +++ b/tools/assistant/tools/qhelpconverter/outputpage.cpp @@ -55,9 +55,9 @@ OutputPage::OutputPage(QWidget *parent) setButtonText(QWizard::NextButton, tr("Convert...")); m_ui.setupUi(this); - connect(m_ui.projectLineEdit, SIGNAL(textChanged(const QString&)), + connect(m_ui.projectLineEdit, SIGNAL(textChanged(QString)), this, SIGNAL(completeChanged())); - connect(m_ui.collectionLineEdit, SIGNAL(textChanged(const QString&)), + connect(m_ui.collectionLineEdit, SIGNAL(textChanged(QString)), this, SIGNAL(completeChanged())); registerField(QLatin1String("ProjectFileName"), diff --git a/tools/assistant/tools/shared/helpgenerator.cpp b/tools/assistant/tools/shared/helpgenerator.cpp index 956a22a37a..c364433a5e 100644 --- a/tools/assistant/tools/shared/helpgenerator.cpp +++ b/tools/assistant/tools/shared/helpgenerator.cpp @@ -49,10 +49,10 @@ QT_BEGIN_NAMESPACE HelpGenerator::HelpGenerator() { generator = new QHelpGenerator(this); - connect(generator, SIGNAL(statusChanged(const QString&)), - this, SLOT(printStatus(const QString&))); - connect(generator, SIGNAL(warning(const QString&)), - this, SLOT(printWarning(const QString&))); + connect(generator, SIGNAL(statusChanged(QString)), + this, SLOT(printStatus(QString))); + connect(generator, SIGNAL(warning(QString)), + this, SLOT(printWarning(QString))); } bool HelpGenerator::generate(QHelpDataInterface *helpData, diff --git a/tools/configure/tools.cpp b/tools/configure/tools.cpp index c958dd9fcd..741267789e 100644 --- a/tools/configure/tools.cpp +++ b/tools/configure/tools.cpp @@ -110,28 +110,21 @@ void Tools::checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString // Verify license info... QString licenseKey = licenseInfo["LICENSEKEYEXT"]; - const char * clicenseKey = licenseKey.toLatin1(); + QByteArray clicenseKey = licenseKey.toLatin1(); //We check the licence -#ifndef _WIN32_WCE - char *buffer = strdup(clicenseKey); -#else - char *buffer = (char*) malloc(strlen(clicenseKey) + 1); - strcpy(buffer, clicenseKey); -#endif static const char * const SEP = "-"; char *licenseParts[NUMBER_OF_PARTS]; int partNumber = 0; - for (char *part = strtok(buffer, SEP); part != 0; part = strtok(0, SEP)) + for (char *part = strtok(clicenseKey.data(), SEP); part != 0; part = strtok(0, SEP)) licenseParts[partNumber++] = part; if (partNumber < (NUMBER_OF_PARTS-1)) { dictionary["DONE"] = "error"; cout << "License file does not contain proper license key." <<partNumber<< endl; - free(buffer); return; } char products = licenseParts[0][0]; - char platforms = licenseParts[1][0]; + char* platforms = licenseParts[1]; char* licenseSchema = licenseParts[2]; char licenseFeatures = licenseParts[3][0]; @@ -149,22 +142,79 @@ void Tools::checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString dictionary["EDITION"] = "GUIFramework"; dictionary["QT_EDITION"] = "QT_EDITION_DESKTOPLIGHT"; } - - if (platforms == 'X') { - dictionary["LICENSE_EXTENSION"] = "-ALLOS"; - } else if (strchr("2346789ABCDEGHJKMPQSTUVWX", platforms)) { - dictionary["LICENSE_EXTENSION"] = "-EMBEDDED"; - } else if (strchr("4BFPQRTY", platforms)) { - dictionary["LICENSE_EXTENSION"] = "-DESKTOP"; - } } else if (strcmp(licenseSchema,"Z4M") == 0 || strcmp(licenseSchema,"R4M") == 0 || strcmp(licenseSchema,"Q4M") == 0) { if (products == 'B') { dictionary["EDITION"] = "Evaluation"; dictionary["QT_EDITION"] = "QT_EDITION_EVALUATION"; - dictionary["LICENSE_EXTENSION"] = "-EVALUATION"; } } + if (platforms[2] == 'L') { + static const char src[] = "8NPQRTZ"; + static const char dst[] = "UCWX9M7"; + const char *p = strchr(src, platforms[1]); + platforms[1] = dst[p - src]; + } + +#define PL(a,b) (int(a)+int(b)*256) + int platformCode = PL(platforms[0],platforms[1]); + switch (platformCode) { + case PL('X','9'): + case PL('X','C'): + case PL('X','U'): + case PL('X','W'): + case PL('X','M'): // old license key + dictionary["LICENSE_EXTENSION"] = "-ALLOS"; + break; + + case PL('6', 'M'): + case PL('8', 'M'): + case PL('K', 'M'): // old license key + case PL('N', '7'): + case PL('N', '9'): + case PL('N', 'X'): + case PL('S', '9'): + case PL('S', 'C'): + case PL('S', 'U'): + case PL('S', 'W'): + dictionary["LICENSE_EXTENSION"] = "-EMBEDDED"; + if (dictionary["PLATFORM NAME"].contains("Windows CE") + && platformCode != PL('6', 'M') && platformCode != PL('S', '9') + && platformCode != PL('S', 'C') && platformCode != PL('S', 'U') + && platformCode != PL('S', 'W') && platformCode != PL('K', 'M')) { + dictionary["DONE"] = "error"; + } else if (dictionary["PLATFORM NAME"].contains("Symbian") + && platformCode != PL('N', '9') && platformCode != PL('S', '9') + && platformCode != PL('S', 'C') && platformCode != PL('S', 'U') + && platformCode != PL('S', 'W')) { + dictionary["DONE"] = "error"; + } + break; + case PL('R', 'M'): + case PL('F', 'M'): + dictionary["LICENSE_EXTENSION"] = "-DESKTOP"; + if (!dictionary["PLATFORM NAME"].endsWith("Windows")) { + dictionary["DONE"] = "error"; + } + break; + default: + dictionary["DONE"] = "error"; + break; + } +#undef PL + + if (dictionary.value("DONE") == "error") { + cout << "You are not licensed for the " << dictionary["PLATFORM NAME"] << " platform." << endl << endl; + cout << "Please contact qt-info@nokia.com to upgrade your license" << endl; + cout << "to include the " << dictionary["PLATFORM NAME"] << " platform, or install the" << endl; + cout << "Qt Open Source Edition if you intend to develop free software." << endl; + return; + } + + // Override for evaluation licenses + if (dictionary["Edition"] == "Evaluation") + dictionary["LICENSE_EXTENSION"] = "-EVALUATION"; + if (QFile::exists(dictionary["QT_SOURCE_TREE"] + "/.LICENSE")) { // Generic, no-suffix license dictionary["LICENSE_EXTENSION"] = QString(); @@ -180,27 +230,13 @@ void Tools::checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString return; } - if (dictionary["PLATFORM NAME"].contains("Windows CE")) { - // verify that we are licensed to use Qt for Windows CE - if (dictionary["LICENSE_EXTENSION"] != "-EMBEDDED" && dictionary["LICENSE_EXTENSION"] != "-ALLOS") { - cout << "You are not licensed for the " << dictionary["PLATFORM NAME"] << " platform." << endl << endl; - cout << "Please contact qt-info@nokia.com to upgrade your license" << endl; - cout << "to include the " << dictionary["PLATFORM NAME"] << " platform, or install the" << endl; - cout << "Qt Open Source Edition if you intend to develop free software." << endl; - dictionary["DONE"] = "error"; - return; - } - } - // copy one of .LICENSE-*(-US) to LICENSE QString toLicenseFile = dictionary["QT_SOURCE_TREE"] + "/LICENSE"; QString fromLicenseFile = dictionary["QT_SOURCE_TREE"] + "/.LICENSE" + dictionary["LICENSE_EXTENSION"]; - if (licenseFeatures == 'G') //US + if (licenseFeatures == 'B' || licenseFeatures == 'G' + || licenseFeatures == 'L' || licenseFeatures == 'Y') fromLicenseFile += "-US"; - if (licenseFeatures == '5') //Floating - dictionary["METERED LICENSE"] = "true"; - if (!CopyFile((wchar_t*)QDir::toNativeSeparators(fromLicenseFile).utf16(), (wchar_t*)QDir::toNativeSeparators(toLicenseFile).utf16(), FALSE)) { cout << "Failed to copy license file (" << fromLicenseFile << ")"; @@ -208,6 +244,5 @@ void Tools::checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString return; } dictionary["LICENSE FILE"] = toLicenseFile; - free(buffer); } diff --git a/tools/designer/src/components/formeditor/brushmanagerproxy.cpp b/tools/designer/src/components/formeditor/brushmanagerproxy.cpp index 470258b57b..8369cc5110 100644 --- a/tools/designer/src/components/formeditor/brushmanagerproxy.cpp +++ b/tools/designer/src/components/formeditor/brushmanagerproxy.cpp @@ -160,10 +160,10 @@ void BrushManagerProxy::setBrushManager(QtBrushManager *manager) return; if (d_ptr->m_Manager) { - disconnect(d_ptr->m_Manager, SIGNAL(brushAdded(const QString &, const QBrush &)), - this, SLOT(brushAdded(const QString &, const QBrush &))); - disconnect(d_ptr->m_Manager, SIGNAL(brushRemoved(const QString &)), - this, SLOT(brushRemoved(const QString &))); + disconnect(d_ptr->m_Manager, SIGNAL(brushAdded(QString,QBrush)), + this, SLOT(brushAdded(QString,QBrush))); + disconnect(d_ptr->m_Manager, SIGNAL(brushRemoved(QString)), + this, SLOT(brushRemoved(QString))); } d_ptr->m_Manager = manager; @@ -256,7 +256,7 @@ void BrushManagerProxy::setBrushManager(QtBrushManager *manager) } connect(d_ptr->m_Manager, SIGNAL(brushAdded(QString,QBrush)), - this, SLOT(brushAdded(QString, QBrush))); + this, SLOT(brushAdded(QString,QBrush))); connect(d_ptr->m_Manager, SIGNAL(brushRemoved(QString)), this, SLOT(brushRemoved(QString))); diff --git a/tools/designer/src/components/formeditor/formeditor.cpp b/tools/designer/src/components/formeditor/formeditor.cpp index 9f00aa1947..9208a32bb5 100644 --- a/tools/designer/src/components/formeditor/formeditor.cpp +++ b/tools/designer/src/components/formeditor/formeditor.cpp @@ -162,8 +162,8 @@ FormEditor::FormEditor(QObject *parent) QtResourceModel *resourceModel = new QtResourceModel(this); setResourceModel(resourceModel); - connect(resourceModel, SIGNAL(qrcFileModifiedExternally(const QString &)), - this, SLOT(slotQrcFileChangedExternally(const QString &))); + connect(resourceModel, SIGNAL(qrcFileModifiedExternally(QString)), + this, SLOT(slotQrcFileChangedExternally(QString))); QList<QDesignerOptionsPageInterface*> optionsPages; optionsPages << new TemplateOptionsPage(this) << new FormEditorOptionsPage(this) << new EmbeddedOptionsPage(this); diff --git a/tools/designer/src/components/formeditor/qdesigner_resource.cpp b/tools/designer/src/components/formeditor/qdesigner_resource.cpp index 0048e940c2..d325bcaeae 100644 --- a/tools/designer/src/components/formeditor/qdesigner_resource.cpp +++ b/tools/designer/src/components/formeditor/qdesigner_resource.cpp @@ -2392,8 +2392,8 @@ void QDesignerResource::createResources(DomResources *resources) } else { resourceSet = m_formWindow->core()->resourceModel()->addResourceSet(paths); m_formWindow->setResourceSet(resourceSet); - QObject::connect(m_formWindow->core()->resourceModel(), SIGNAL(resourceSetActivated(QtResourceSet *, bool)), - m_formWindow, SLOT(resourceSetActivated(QtResourceSet *, bool))); + QObject::connect(m_formWindow->core()->resourceModel(), SIGNAL(resourceSetActivated(QtResourceSet*,bool)), + m_formWindow, SLOT(resourceSetActivated(QtResourceSet*,bool))); } } diff --git a/tools/designer/src/components/propertyeditor/designerpropertymanager.cpp b/tools/designer/src/components/propertyeditor/designerpropertymanager.cpp index 1e66c1ebf2..a85c9088dd 100644 --- a/tools/designer/src/components/propertyeditor/designerpropertymanager.cpp +++ b/tools/designer/src/components/propertyeditor/designerpropertymanager.cpp @@ -577,7 +577,7 @@ DesignerPropertyManager::DesignerPropertyManager(QDesignerFormEditorInterface *c m_core(core), m_sourceOfChange(0) { - connect(this, SIGNAL(valueChanged(QtProperty*,QVariant)), this, SLOT(slotValueChanged(QtProperty*, QVariant))); + connect(this, SIGNAL(valueChanged(QtProperty*,QVariant)), this, SLOT(slotValueChanged(QtProperty*,QVariant))); connect(this, SIGNAL(propertyDestroyed(QtProperty*)), this, SLOT(slotPropertyDestroyed(QtProperty*))); } @@ -2217,7 +2217,7 @@ QWidget *DesignerEditorFactory::createEditor(QtVariantPropertyManager *manager, ed->setRichTextDefaultFont(qvariant_cast<QFont>(richTextDefaultFont)); m_stringPropertyToEditors[property].append(ed); m_editorToStringProperty[ed] = property; - connect(ed, SIGNAL(destroyed(QObject *)), this, SLOT(slotEditorDestroyed(QObject *))); + connect(ed, SIGNAL(destroyed(QObject*)), this, SLOT(slotEditorDestroyed(QObject*))); connect(ed, SIGNAL(textChanged(QString)), this, SLOT(slotStringTextChanged(QString))); editor = ed; } @@ -2302,8 +2302,8 @@ QWidget *DesignerEditorFactory::createEditor(QtVariantPropertyManager *manager, ed->setSpacing(m_spacing); m_pixmapPropertyToEditors[property].append(ed); m_editorToPixmapProperty[ed] = property; - connect(ed, SIGNAL(destroyed(QObject *)), this, SLOT(slotEditorDestroyed(QObject *))); - connect(ed, SIGNAL(pathChanged(const QString &)), this, SLOT(slotPixmapChanged(const QString &))); + connect(ed, SIGNAL(destroyed(QObject*)), this, SLOT(slotEditorDestroyed(QObject*))); + connect(ed, SIGNAL(pathChanged(QString)), this, SLOT(slotPixmapChanged(QString))); editor = ed; } else if (type == DesignerPropertyManager::designerIconTypeId()) { PixmapEditor *ed = new PixmapEditor(m_core, parent); @@ -2319,8 +2319,8 @@ QWidget *DesignerEditorFactory::createEditor(QtVariantPropertyManager *manager, ed->setSpacing(m_spacing); m_iconPropertyToEditors[property].append(ed); m_editorToIconProperty[ed] = property; - connect(ed, SIGNAL(destroyed(QObject *)), this, SLOT(slotEditorDestroyed(QObject *))); - connect(ed, SIGNAL(pathChanged(const QString &)), this, SLOT(slotIconChanged(const QString &))); + connect(ed, SIGNAL(destroyed(QObject*)), this, SLOT(slotEditorDestroyed(QObject*))); + connect(ed, SIGNAL(pathChanged(QString)), this, SLOT(slotIconChanged(QString))); editor = ed; } else if (type == DesignerPropertyManager::designerStringTypeId()) { const TextPropertyValidationMode tvm = static_cast<TextPropertyValidationMode>(manager->attributeValue(property, QLatin1String(validationModesAttributeC)).toInt()); @@ -2330,7 +2330,7 @@ QWidget *DesignerEditorFactory::createEditor(QtVariantPropertyManager *manager, ed->setRichTextDefaultFont(qvariant_cast<QFont>(richTextDefaultFont)); m_stringPropertyToEditors[property].append(ed); m_editorToStringProperty[ed] = property; - connect(ed, SIGNAL(destroyed(QObject *)), this, SLOT(slotEditorDestroyed(QObject *))); + connect(ed, SIGNAL(destroyed(QObject*)), this, SLOT(slotEditorDestroyed(QObject*))); connect(ed, SIGNAL(textChanged(QString)), this, SLOT(slotStringTextChanged(QString))); editor = ed; } else if (type == DesignerPropertyManager::designerKeySequenceTypeId()) { @@ -2338,7 +2338,7 @@ QWidget *DesignerEditorFactory::createEditor(QtVariantPropertyManager *manager, ed->setKeySequence(qVariantValue<PropertySheetKeySequenceValue>(manager->value(property)).value()); m_keySequencePropertyToEditors[property].append(ed); m_editorToKeySequenceProperty[ed] = property; - connect(ed, SIGNAL(destroyed(QObject *)), this, SLOT(slotEditorDestroyed(QObject *))); + connect(ed, SIGNAL(destroyed(QObject*)), this, SLOT(slotEditorDestroyed(QObject*))); connect(ed, SIGNAL(keySequenceChanged(QKeySequence)), this, SLOT(slotKeySequenceChanged(QKeySequence))); editor = ed; } else { @@ -2527,14 +2527,14 @@ ResetDecorator::~ResetDecorator() void ResetDecorator::connectPropertyManager(QtAbstractPropertyManager *manager) { - connect(manager, SIGNAL(propertyChanged(QtProperty *)), - this, SLOT(slotPropertyChanged(QtProperty *))); + connect(manager, SIGNAL(propertyChanged(QtProperty*)), + this, SLOT(slotPropertyChanged(QtProperty*))); } void ResetDecorator::disconnectPropertyManager(QtAbstractPropertyManager *manager) { - disconnect(manager, SIGNAL(propertyChanged(QtProperty *)), - this, SLOT(slotPropertyChanged(QtProperty *))); + disconnect(manager, SIGNAL(propertyChanged(QtProperty*)), + this, SLOT(slotPropertyChanged(QtProperty*))); } void ResetDecorator::setSpacing(int spacing) @@ -2556,7 +2556,7 @@ QWidget *ResetDecorator::editor(QWidget *subEditor, bool resettable, QtAbstractP resetWidget->setValueIcon(property->valueIcon()); resetWidget->setAutoFillBackground(true); connect(resetWidget, SIGNAL(destroyed(QObject*)), this, SLOT(slotEditorDestroyed(QObject*))); - connect(resetWidget, SIGNAL(resetProperty(QtProperty *)), this, SIGNAL(resetProperty(QtProperty *))); + connect(resetWidget, SIGNAL(resetProperty(QtProperty*)), this, SIGNAL(resetProperty(QtProperty*))); m_createdResetWidgets[property].append(resetWidget); m_resetWidgetToProperty[resetWidget] = property; } diff --git a/tools/designer/src/components/propertyeditor/paletteeditor.cpp b/tools/designer/src/components/propertyeditor/paletteeditor.cpp index eeb166f0b7..ffa76b2c04 100644 --- a/tools/designer/src/components/propertyeditor/paletteeditor.cpp +++ b/tools/designer/src/components/propertyeditor/paletteeditor.cpp @@ -77,8 +77,8 @@ PaletteEditor::PaletteEditor(QDesignerFormEditorInterface *core, QWidget *parent ColorDelegate *delegate = new ColorDelegate(core, this); ui.paletteView->setItemDelegate(delegate); ui.paletteView->setEditTriggers(QAbstractItemView::AllEditTriggers); - connect(m_paletteModel, SIGNAL(paletteChanged(const QPalette &)), - this, SLOT(paletteChanged(const QPalette &))); + connect(m_paletteModel, SIGNAL(paletteChanged(QPalette)), + this, SLOT(paletteChanged(QPalette))); ui.paletteView->setSelectionBehavior(QAbstractItemView::SelectRows); ui.paletteView->setDragEnabled(true); ui.paletteView->setDropIndicatorShown(true); @@ -425,7 +425,7 @@ BrushEditor::BrushEditor(QDesignerFormEditorInterface *core, QWidget *parent) : QLayout *layout = new QHBoxLayout(this); layout->setMargin(0); layout->addWidget(m_button); - connect(m_button, SIGNAL(colorChanged(const QColor &)), this, SLOT(brushChanged())); + connect(m_button, SIGNAL(colorChanged(QColor)), this, SLOT(brushChanged())); setFocusProxy(m_button); } @@ -515,13 +515,13 @@ QWidget *ColorDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem QWidget *ed = 0; if (index.column() == 0) { RoleEditor *editor = new RoleEditor(parent); - connect(editor, SIGNAL(changed(QWidget *)), this, SIGNAL(commitData(QWidget *))); + connect(editor, SIGNAL(changed(QWidget*)), this, SIGNAL(commitData(QWidget*))); //editor->setFocusPolicy(Qt::NoFocus); //editor->installEventFilter(const_cast<ColorDelegate *>(this)); ed = editor; } else { BrushEditor *editor = new BrushEditor(m_core, parent); - connect(editor, SIGNAL(changed(QWidget *)), this, SIGNAL(commitData(QWidget *))); + connect(editor, SIGNAL(changed(QWidget*)), this, SIGNAL(commitData(QWidget*))); editor->setFocusPolicy(Qt::NoFocus); editor->installEventFilter(const_cast<ColorDelegate *>(this)); ed = editor; diff --git a/tools/designer/src/components/propertyeditor/stringlisteditor.cpp b/tools/designer/src/components/propertyeditor/stringlisteditor.cpp index e46cca047a..1b8c840353 100644 --- a/tools/designer/src/components/propertyeditor/stringlisteditor.cpp +++ b/tools/designer/src/components/propertyeditor/stringlisteditor.cpp @@ -55,10 +55,10 @@ StringListEditor::StringListEditor(QWidget *parent) listView->setModel(m_model); connect(listView->selectionModel(), - SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)), - this, SLOT(currentIndexChanged(const QModelIndex &, const QModelIndex &))); + SIGNAL(currentChanged(QModelIndex,QModelIndex)), + this, SLOT(currentIndexChanged(QModelIndex,QModelIndex))); connect(listView->itemDelegate(), - SIGNAL(closeEditor(QWidget *, QAbstractItemDelegate::EndEditHint)), + SIGNAL(closeEditor(QWidget*,QAbstractItemDelegate::EndEditHint)), this, SLOT(currentValueChanged())); QIcon upIcon = createIconSet(QString::fromUtf8("up.png")); diff --git a/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp b/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp index e36e82828a..8abaccb470 100644 --- a/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp +++ b/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp @@ -758,8 +758,8 @@ void SignalSlotEditorWindow::setActiveFormWindow(QDesignerFormWindowInterface *f disconnect(m_editor, SIGNAL(connectionSelected(Connection*)), this, SLOT(updateDialogSelection(Connection*))); if (integration) { - disconnect(integration, SIGNAL(objectNameChanged(QDesignerFormWindowInterface *, QObject *, QString, QString)), - this, SLOT(objectNameChanged(QDesignerFormWindowInterface *, QObject *, QString, QString))); + disconnect(integration, SIGNAL(objectNameChanged(QDesignerFormWindowInterface*,QObject*,QString,QString)), + this, SLOT(objectNameChanged(QDesignerFormWindowInterface*,QObject*,QString,QString))); } } @@ -777,8 +777,8 @@ void SignalSlotEditorWindow::setActiveFormWindow(QDesignerFormWindowInterface *f connect(m_editor, SIGNAL(connectionSelected(Connection*)), this, SLOT(updateDialogSelection(Connection*))); if (integration) { - connect(integration, SIGNAL(objectNameChanged(QDesignerFormWindowInterface *, QObject *, QString, QString)), - this, SLOT(objectNameChanged(QDesignerFormWindowInterface *, QObject *, QString, QString))); + connect(integration, SIGNAL(objectNameChanged(QDesignerFormWindowInterface*,QObject*,QString,QString)), + this, SLOT(objectNameChanged(QDesignerFormWindowInterface*,QObject*,QString,QString))); } } diff --git a/tools/designer/src/components/taskmenu/containerwidget_taskmenu.cpp b/tools/designer/src/components/taskmenu/containerwidget_taskmenu.cpp index 88ea59374d..6c212a9488 100644 --- a/tools/designer/src/components/taskmenu/containerwidget_taskmenu.cpp +++ b/tools/designer/src/components/taskmenu/containerwidget_taskmenu.cpp @@ -257,10 +257,10 @@ MdiContainerWidgetTaskMenu::MdiContainerWidgetTaskMenu(QMdiArea *m, QObject *par ContainerWidgetTaskMenu(m, MdiContainer, parent) { initializeActions(); - connect(m_nextAction, SIGNAL(triggered()), m, SLOT( activateNextSubWindow ())); + connect(m_nextAction, SIGNAL(triggered()), m, SLOT(activateNextSubWindow())); connect(m_previousAction, SIGNAL(triggered()), m , SLOT(activatePreviousSubWindow())); connect(m_tileAction, SIGNAL(triggered()), m, SLOT(tileSubWindows())); - connect(m_cascadeAction, SIGNAL(triggered()), m, SLOT(cascadeSubWindows ())); + connect(m_cascadeAction, SIGNAL(triggered()), m, SLOT(cascadeSubWindows())); } MdiContainerWidgetTaskMenu::MdiContainerWidgetTaskMenu(QWorkspace *m, QObject *parent) : diff --git a/tools/designer/src/designer/qdesigner_workbench.cpp b/tools/designer/src/designer/qdesigner_workbench.cpp index c619a09b07..593fecd137 100644 --- a/tools/designer/src/designer/qdesigner_workbench.cpp +++ b/tools/designer/src/designer/qdesigner_workbench.cpp @@ -320,8 +320,8 @@ void QDesignerWorkbench::addFormWindow(QDesignerFormWindow *formWindow) m_actionManager->minimizeAction()->setEnabled(true); m_actionManager->minimizeAction()->setChecked(false); - connect(formWindow, SIGNAL(minimizationStateChanged(QDesignerFormWindowInterface *, bool)), - this, SLOT(minimizationStateChanged(QDesignerFormWindowInterface *, bool))); + connect(formWindow, SIGNAL(minimizationStateChanged(QDesignerFormWindowInterface*,bool)), + this, SLOT(minimizationStateChanged(QDesignerFormWindowInterface*,bool))); m_actionManager->editWidgets()->trigger(); } diff --git a/tools/designer/src/lib/shared/actioneditor.cpp b/tools/designer/src/lib/shared/actioneditor.cpp index 56bd35362c..8d416c9cd9 100644 --- a/tools/designer/src/lib/shared/actioneditor.cpp +++ b/tools/designer/src/lib/shared/actioneditor.cpp @@ -234,8 +234,8 @@ ActionEditor::ActionEditor(QDesignerFormEditorInterface *core, QWidget *parent, connect(m_actionView,SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(slotSelectionChanged(QItemSelection,QItemSelection))); - connect(m_actionView, SIGNAL(contextMenuRequested(QContextMenuEvent*, QAction*)), - this, SLOT(slotContextMenuRequested(QContextMenuEvent*, QAction*))); + connect(m_actionView, SIGNAL(contextMenuRequested(QContextMenuEvent*,QAction*)), + this, SLOT(slotContextMenuRequested(QContextMenuEvent*,QAction*))); connect(this, SIGNAL(itemActivated(QAction*)), this, SLOT(editAction(QAction*))); diff --git a/tools/designer/src/lib/shared/actionrepository.cpp b/tools/designer/src/lib/shared/actionrepository.cpp index 854a2b5b6c..1655d07e26 100644 --- a/tools/designer/src/lib/shared/actionrepository.cpp +++ b/tools/designer/src/lib/shared/actionrepository.cpp @@ -504,10 +504,10 @@ ActionView::ActionView(QWidget *parent) : addWidget(m_actionListView); addWidget(m_actionTreeView); // Wire signals - connect(m_actionTreeView, SIGNAL(contextMenuRequested(QContextMenuEvent*, QAction*)), - this, SIGNAL(contextMenuRequested(QContextMenuEvent*, QAction*))); - connect(m_actionListView, SIGNAL(contextMenuRequested(QContextMenuEvent*, QAction*)), - this, SIGNAL(contextMenuRequested(QContextMenuEvent*, QAction*))); + connect(m_actionTreeView, SIGNAL(contextMenuRequested(QContextMenuEvent*,QAction*)), + this, SIGNAL(contextMenuRequested(QContextMenuEvent*,QAction*))); + connect(m_actionListView, SIGNAL(contextMenuRequested(QContextMenuEvent*,QAction*)), + this, SIGNAL(contextMenuRequested(QContextMenuEvent*,QAction*))); // make it possible for vs integration to reimplement edit action dialog // [which it shouldn't do actually] diff --git a/tools/designer/src/lib/shared/promotionmodel.cpp b/tools/designer/src/lib/shared/promotionmodel.cpp index 80eded05f6..888733a1b0 100644 --- a/tools/designer/src/lib/shared/promotionmodel.cpp +++ b/tools/designer/src/lib/shared/promotionmodel.cpp @@ -121,7 +121,7 @@ namespace qdesigner_internal { PromotionModel::PromotionModel(QDesignerFormEditorInterface *core) : m_core(core) { - connect(this, SIGNAL(itemChanged(QStandardItem *)), this, SLOT(slotItemChanged(QStandardItem *))); + connect(this, SIGNAL(itemChanged(QStandardItem*)), this, SLOT(slotItemChanged(QStandardItem*))); } void PromotionModel::initializeHeaders() { diff --git a/tools/designer/src/lib/shared/qdesigner_integration.cpp b/tools/designer/src/lib/shared/qdesigner_integration.cpp index bf03fe5df8..ee50a45f11 100644 --- a/tools/designer/src/lib/shared/qdesigner_integration.cpp +++ b/tools/designer/src/lib/shared/qdesigner_integration.cpp @@ -117,7 +117,7 @@ void QDesignerIntegration::initialize() // Extensions if (QDesignerPropertyEditor *designerPropertyEditor= qobject_cast<QDesignerPropertyEditor *>(core()->propertyEditor())) { - connect(designerPropertyEditor, SIGNAL(propertyValueChanged(QString, QVariant, bool)), this, SLOT(updateProperty(QString, QVariant, bool))); + connect(designerPropertyEditor, SIGNAL(propertyValueChanged(QString,QVariant,bool)), this, SLOT(updateProperty(QString,QVariant,bool))); connect(designerPropertyEditor, SIGNAL(resetProperty(QString)), this, SLOT(resetProperty(QString))); connect(designerPropertyEditor, SIGNAL(addDynamicProperty(QString,QVariant)), this, SLOT(addDynamicProperty(QString,QVariant))); diff --git a/tools/designer/src/lib/shared/qdesigner_menubar.cpp b/tools/designer/src/lib/shared/qdesigner_menubar.cpp index 80c7b531b7..e25290a409 100644 --- a/tools/designer/src/lib/shared/qdesigner_menubar.cpp +++ b/tools/designer/src/lib/shared/qdesigner_menubar.cpp @@ -867,7 +867,15 @@ void QDesignerMenuBar::showMenu(int index) if ((menu->windowFlags() & Qt::Popup) != Qt::Popup) menu->setWindowFlags(Qt::Popup); menu->adjustSize(); - menu->move(mapToGlobal(g.bottomLeft())); + if (layoutDirection() == Qt::LeftToRight) { + menu->move(mapToGlobal(g.bottomLeft())); + } else { + // The position is not initially correct due to the unknown width, + // causing it to overlap a bit the first time it is invoked. + const QSize menuSize = menu->size(); + QPoint point = g.bottomRight() - QPoint(menu->width(), 0); + menu->move(mapToGlobal(point)); + } menu->setFocus(Qt::MouseFocusReason); menu->raise(); menu->show(); diff --git a/tools/designer/src/lib/shared/qdesigner_promotiondialog.cpp b/tools/designer/src/lib/shared/qdesigner_promotiondialog.cpp index 8c1d21db20..f31fb4611b 100644 --- a/tools/designer/src/lib/shared/qdesigner_promotiondialog.cpp +++ b/tools/designer/src/lib/shared/qdesigner_promotiondialog.cpp @@ -219,8 +219,8 @@ namespace qdesigner_internal { m_treeView->setMinimumWidth(450); m_treeView->setContextMenuPolicy(Qt::CustomContextMenu); - connect(m_treeView->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)), - this, SLOT(slotSelectionChanged(QItemSelection, QItemSelection))); + connect(m_treeView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), + this, SLOT(slotSelectionChanged(QItemSelection,QItemSelection))); connect(m_treeView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(slotTreeViewContextMenu(QPoint))); @@ -248,18 +248,18 @@ namespace qdesigner_internal { preselectedBaseClass = baseClassNameList.indexOf(QLatin1String("QFrame")); NewPromotedClassPanel *newPromotedClassPanel = new NewPromotedClassPanel(baseClassNameList, preselectedBaseClass); - connect(newPromotedClassPanel, SIGNAL(newPromotedClass(PromotionParameters, bool *)), this, SLOT(slotNewPromotedClass(PromotionParameters, bool *))); + connect(newPromotedClassPanel, SIGNAL(newPromotedClass(PromotionParameters,bool*)), this, SLOT(slotNewPromotedClass(PromotionParameters,bool*))); connect(this, SIGNAL(selectedBaseClassChanged(QString)), newPromotedClassPanel, SLOT(chooseBaseClass(QString))); vboxLayout->addWidget(newPromotedClassPanel); // button box vboxLayout->addWidget(m_buttonBox); // connect model - connect(m_model, SIGNAL(includeFileChanged(QDesignerWidgetDataBaseItemInterface*, QString)), - this, SLOT(slotIncludeFileChanged(QDesignerWidgetDataBaseItemInterface*, QString))); + connect(m_model, SIGNAL(includeFileChanged(QDesignerWidgetDataBaseItemInterface*,QString)), + this, SLOT(slotIncludeFileChanged(QDesignerWidgetDataBaseItemInterface*,QString))); - connect(m_model, SIGNAL(classNameChanged(QDesignerWidgetDataBaseItemInterface*, QString)), - this, SLOT(slotClassNameChanged(QDesignerWidgetDataBaseItemInterface*, QString))); + connect(m_model, SIGNAL(classNameChanged(QDesignerWidgetDataBaseItemInterface*,QString)), + this, SLOT(slotClassNameChanged(QDesignerWidgetDataBaseItemInterface*,QString))); // focus if (m_mode == ModeEditChooseClass) diff --git a/tools/designer/src/lib/shared/qdesigner_taskmenu.cpp b/tools/designer/src/lib/shared/qdesigner_taskmenu.cpp index 4a2269081d..ce28b7b979 100644 --- a/tools/designer/src/lib/shared/qdesigner_taskmenu.cpp +++ b/tools/designer/src/lib/shared/qdesigner_taskmenu.cpp @@ -656,7 +656,7 @@ void QDesignerTaskMenu::navigateToSlot(QDesignerFormEditorInterface *core, dialogUi.signalList->addTopLevelItem(row); dialogUi.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); } else { - connect(dialogUi.signalList, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), + connect(dialogUi.signalList, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), &selectSignalDialog, SLOT(accept())); } diff --git a/tools/designer/src/lib/shared/qtresourceeditordialog.cpp b/tools/designer/src/lib/shared/qtresourceeditordialog.cpp index ad9250a5a6..c16cb41bdf 100644 --- a/tools/designer/src/lib/shared/qtresourceeditordialog.cpp +++ b/tools/designer/src/lib/shared/qtresourceeditordialog.cpp @@ -1960,30 +1960,30 @@ QtResourceEditorDialog::QtResourceEditorDialog(QDesignerFormEditorInterface *cor setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); setWindowTitle(tr("Edit Resources")); - connect(d_ptr->m_qrcManager, SIGNAL(qrcFileInserted(QtQrcFile *)), - this, SLOT(slotQrcFileInserted(QtQrcFile *))); - connect(d_ptr->m_qrcManager, SIGNAL(qrcFileMoved(QtQrcFile *, QtQrcFile *)), - this, SLOT(slotQrcFileMoved(QtQrcFile *))); - connect(d_ptr->m_qrcManager, SIGNAL(qrcFileRemoved(QtQrcFile *)), - this, SLOT(slotQrcFileRemoved(QtQrcFile *))); - connect(d_ptr->m_qrcManager, SIGNAL(resourcePrefixInserted(QtResourcePrefix *)), - this, SLOT(slotResourcePrefixInserted(QtResourcePrefix *))); - connect(d_ptr->m_qrcManager, SIGNAL(resourcePrefixMoved(QtResourcePrefix *, QtResourcePrefix *)), - this, SLOT(slotResourcePrefixMoved(QtResourcePrefix *))); - connect(d_ptr->m_qrcManager, SIGNAL(resourcePrefixChanged(QtResourcePrefix *, const QString &)), - this, SLOT(slotResourcePrefixChanged(QtResourcePrefix *))); - connect(d_ptr->m_qrcManager, SIGNAL(resourceLanguageChanged(QtResourcePrefix *, const QString &)), - this, SLOT(slotResourceLanguageChanged(QtResourcePrefix *))); - connect(d_ptr->m_qrcManager, SIGNAL(resourcePrefixRemoved(QtResourcePrefix *)), - this, SLOT(slotResourcePrefixRemoved(QtResourcePrefix *))); - connect(d_ptr->m_qrcManager, SIGNAL(resourceFileInserted(QtResourceFile *)), - this, SLOT(slotResourceFileInserted(QtResourceFile *))); - connect(d_ptr->m_qrcManager, SIGNAL(resourceFileMoved(QtResourceFile *, QtResourceFile *)), - this, SLOT(slotResourceFileMoved(QtResourceFile *))); - connect(d_ptr->m_qrcManager, SIGNAL(resourceAliasChanged(QtResourceFile *, const QString &)), - this, SLOT(slotResourceAliasChanged(QtResourceFile *))); - connect(d_ptr->m_qrcManager, SIGNAL(resourceFileRemoved(QtResourceFile *)), - this, SLOT(slotResourceFileRemoved(QtResourceFile *))); + connect(d_ptr->m_qrcManager, SIGNAL(qrcFileInserted(QtQrcFile*)), + this, SLOT(slotQrcFileInserted(QtQrcFile*))); + connect(d_ptr->m_qrcManager, SIGNAL(qrcFileMoved(QtQrcFile*,QtQrcFile*)), + this, SLOT(slotQrcFileMoved(QtQrcFile*))); + connect(d_ptr->m_qrcManager, SIGNAL(qrcFileRemoved(QtQrcFile*)), + this, SLOT(slotQrcFileRemoved(QtQrcFile*))); + connect(d_ptr->m_qrcManager, SIGNAL(resourcePrefixInserted(QtResourcePrefix*)), + this, SLOT(slotResourcePrefixInserted(QtResourcePrefix*))); + connect(d_ptr->m_qrcManager, SIGNAL(resourcePrefixMoved(QtResourcePrefix*,QtResourcePrefix*)), + this, SLOT(slotResourcePrefixMoved(QtResourcePrefix*))); + connect(d_ptr->m_qrcManager, SIGNAL(resourcePrefixChanged(QtResourcePrefix*,QString)), + this, SLOT(slotResourcePrefixChanged(QtResourcePrefix*))); + connect(d_ptr->m_qrcManager, SIGNAL(resourceLanguageChanged(QtResourcePrefix*,QString)), + this, SLOT(slotResourceLanguageChanged(QtResourcePrefix*))); + connect(d_ptr->m_qrcManager, SIGNAL(resourcePrefixRemoved(QtResourcePrefix*)), + this, SLOT(slotResourcePrefixRemoved(QtResourcePrefix*))); + connect(d_ptr->m_qrcManager, SIGNAL(resourceFileInserted(QtResourceFile*)), + this, SLOT(slotResourceFileInserted(QtResourceFile*))); + connect(d_ptr->m_qrcManager, SIGNAL(resourceFileMoved(QtResourceFile*,QtResourceFile*)), + this, SLOT(slotResourceFileMoved(QtResourceFile*))); + connect(d_ptr->m_qrcManager, SIGNAL(resourceAliasChanged(QtResourceFile*,QString)), + this, SLOT(slotResourceAliasChanged(QtResourceFile*))); + connect(d_ptr->m_qrcManager, SIGNAL(resourceFileRemoved(QtResourceFile*)), + this, SLOT(slotResourceFileRemoved(QtResourceFile*))); QIcon upIcon = qdesigner_internal::createIconSet(QString::fromUtf8("up.png")); QIcon downIcon = qdesigner_internal::createIconSet(QString::fromUtf8("down.png")); @@ -2037,10 +2037,10 @@ QtResourceEditorDialog::QtResourceEditorDialog(QDesignerFormEditorInterface *cor connect(d_ptr->m_moveDownAction, SIGNAL(triggered()), this, SLOT(slotMoveDown())); d_ptr->m_ui.qrcFileList->setContextMenuPolicy(Qt::CustomContextMenu); - connect(d_ptr->m_ui.qrcFileList, SIGNAL(customContextMenuRequested(const QPoint &)), - this, SLOT(slotListWidgetContextMenuRequested(const QPoint &))); - connect(d_ptr->m_ui.qrcFileList, SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)), - this, SLOT(slotCurrentQrcFileChanged(QListWidgetItem *))); + connect(d_ptr->m_ui.qrcFileList, SIGNAL(customContextMenuRequested(QPoint)), + this, SLOT(slotListWidgetContextMenuRequested(QPoint))); + connect(d_ptr->m_ui.qrcFileList, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), + this, SLOT(slotCurrentQrcFileChanged(QListWidgetItem*))); d_ptr->m_treeModel = new QStandardItemModel(this); d_ptr->m_treeModel->setColumnCount(2); @@ -2052,12 +2052,12 @@ QtResourceEditorDialog::QtResourceEditorDialog(QDesignerFormEditorInterface *cor connect(d_ptr->m_ui.resourceTreeView->header(), SIGNAL(sectionDoubleClicked(int)), d_ptr->m_ui.resourceTreeView, SLOT(resizeColumnToContents(int))); d_ptr->m_ui.resourceTreeView->setTextElideMode(Qt::ElideLeft); - connect(d_ptr->m_ui.resourceTreeView, SIGNAL(customContextMenuRequested(const QPoint &)), - this, SLOT(slotTreeViewContextMenuRequested(const QPoint &))); - connect(d_ptr->m_treeModel, SIGNAL(itemChanged(QStandardItem *)), - this, SLOT(slotTreeViewItemChanged(QStandardItem *))); - connect(d_ptr->m_treeSelection, SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)), - this, SLOT(slotCurrentTreeViewItemChanged(const QModelIndex &))); + connect(d_ptr->m_ui.resourceTreeView, SIGNAL(customContextMenuRequested(QPoint)), + this, SLOT(slotTreeViewContextMenuRequested(QPoint))); + connect(d_ptr->m_treeModel, SIGNAL(itemChanged(QStandardItem*)), + this, SLOT(slotTreeViewItemChanged(QStandardItem*))); + connect(d_ptr->m_treeSelection, SIGNAL(currentChanged(QModelIndex,QModelIndex)), + this, SLOT(slotCurrentTreeViewItemChanged(QModelIndex))); d_ptr->m_ui.resourceTreeView->setColumnWidth(0, 200); diff --git a/tools/designer/src/lib/shared/qtresourcemodel.cpp b/tools/designer/src/lib/shared/qtresourcemodel.cpp index a2f368d7b9..37f2cabcae 100644 --- a/tools/designer/src/lib/shared/qtresourcemodel.cpp +++ b/tools/designer/src/lib/shared/qtresourcemodel.cpp @@ -476,8 +476,8 @@ QtResourceModel::QtResourceModel(QObject *parent) : d_ptr->q_ptr = this; d_ptr->m_fileWatcher = new QFileSystemWatcher(this); - connect(d_ptr->m_fileWatcher, SIGNAL(fileChanged(const QString &)), - this, SLOT(slotFileChanged(const QString &))); + connect(d_ptr->m_fileWatcher, SIGNAL(fileChanged(QString)), + this, SLOT(slotFileChanged(QString))); } QtResourceModel::~QtResourceModel() diff --git a/tools/designer/src/lib/shared/qtresourceview.cpp b/tools/designer/src/lib/shared/qtresourceview.cpp index f7d51de88a..29025a82e1 100644 --- a/tools/designer/src/lib/shared/qtresourceview.cpp +++ b/tools/designer/src/lib/shared/qtresourceview.cpp @@ -625,12 +625,12 @@ QtResourceView::QtResourceView(QDesignerFormEditorInterface *core, QWidget *pare d_ptr->m_listWidget->setIconSize(QSize(48, 48)); d_ptr->m_listWidget->setGridSize(QSize(64, 64)); - connect(d_ptr->m_treeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), - this, SLOT(slotCurrentPathChanged(QTreeWidgetItem *))); - connect(d_ptr->m_listWidget, SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)), - this, SLOT(slotCurrentResourceChanged(QListWidgetItem *))); - connect(d_ptr->m_listWidget, SIGNAL(itemActivated(QListWidgetItem *)), - this, SLOT(slotResourceActivated(QListWidgetItem *))); + connect(d_ptr->m_treeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), + this, SLOT(slotCurrentPathChanged(QTreeWidgetItem*))); + connect(d_ptr->m_listWidget, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), + this, SLOT(slotCurrentResourceChanged(QListWidgetItem*))); + connect(d_ptr->m_listWidget, SIGNAL(itemActivated(QListWidgetItem*)), + this, SLOT(slotResourceActivated(QListWidgetItem*))); d_ptr->m_listWidget->setContextMenuPolicy(Qt::CustomContextMenu); connect(d_ptr->m_listWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(slotListWidgetContextMenuRequested(QPoint))); @@ -710,8 +710,8 @@ void QtResourceView::setSettingsKey(const QString &key) void QtResourceView::setResourceModel(QtResourceModel *model) { if (d_ptr->m_resourceModel) { - disconnect(d_ptr->m_resourceModel, SIGNAL(resourceSetActivated(QtResourceSet *, bool)), - this, SLOT(slotResourceSetActivated(QtResourceSet *))); + disconnect(d_ptr->m_resourceModel, SIGNAL(resourceSetActivated(QtResourceSet*,bool)), + this, SLOT(slotResourceSetActivated(QtResourceSet*))); } // clear here @@ -723,8 +723,8 @@ void QtResourceView::setResourceModel(QtResourceModel *model) if (!d_ptr->m_resourceModel) return; - connect(d_ptr->m_resourceModel, SIGNAL(resourceSetActivated(QtResourceSet *, bool)), - this, SLOT(slotResourceSetActivated(QtResourceSet *))); + connect(d_ptr->m_resourceModel, SIGNAL(resourceSetActivated(QtResourceSet*,bool)), + this, SLOT(slotResourceSetActivated(QtResourceSet*))); // fill new here d_ptr->slotResourceSetActivated(d_ptr->m_resourceModel->currentResourceSet()); diff --git a/tools/designer/src/lib/shared/signalslotdialog.cpp b/tools/designer/src/lib/shared/signalslotdialog.cpp index e6dd95d981..3b5a799e80 100644 --- a/tools/designer/src/lib/shared/signalslotdialog.cpp +++ b/tools/designer/src/lib/shared/signalslotdialog.cpp @@ -268,8 +268,8 @@ SignaturePanel::SignaturePanel(QObject *parent, QListView *listView, QToolButton m_listView->setItemDelegate(delegate); connect(m_model, SIGNAL(checkSignature(QString,bool*)), this, SIGNAL(checkSignature(QString,bool*))); - connect(m_listView->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)), - this, SLOT(slotSelectionChanged(QItemSelection, QItemSelection))); + connect(m_listView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), + this, SLOT(slotSelectionChanged(QItemSelection,QItemSelection))); } void SignaturePanel::slotAdd() diff --git a/tools/designer/src/lib/shared/stylesheeteditor.cpp b/tools/designer/src/lib/shared/stylesheeteditor.cpp index b9f9ba2ead..aa4def8b86 100644 --- a/tools/designer/src/lib/shared/stylesheeteditor.cpp +++ b/tools/designer/src/lib/shared/stylesheeteditor.cpp @@ -114,8 +114,8 @@ StyleSheetEditorDialog::StyleSheetEditorDialog(QDesignerFormEditorInterface *cor setLayout(layout); m_editor->setContextMenuPolicy(Qt::CustomContextMenu); - connect(m_editor, SIGNAL(customContextMenuRequested(const QPoint &)), - this, SLOT(slotContextMenuRequested(const QPoint &))); + connect(m_editor, SIGNAL(customContextMenuRequested(QPoint)), + this, SLOT(slotContextMenuRequested(QPoint))); QSignalMapper *resourceActionMapper = new QSignalMapper(this); QSignalMapper *gradientActionMapper = new QSignalMapper(this); diff --git a/tools/designer/src/plugins/widgets/q3wizard/q3wizard_container.cpp b/tools/designer/src/plugins/widgets/q3wizard/q3wizard_container.cpp index 95f0c5c184..00679d54c4 100644 --- a/tools/designer/src/plugins/widgets/q3wizard/q3wizard_container.cpp +++ b/tools/designer/src/plugins/widgets/q3wizard/q3wizard_container.cpp @@ -55,7 +55,7 @@ Q3WizardHelper::Q3WizardHelper(Q3Wizard *wizard) : QObject(wizard), m_wizard(wizard) { - connect(m_wizard, SIGNAL(selected(const QString &)), this, SLOT(slotCurrentChanged())); + connect(m_wizard, SIGNAL(selected(QString)), this, SLOT(slotCurrentChanged())); } void Q3WizardHelper::slotCurrentChanged() diff --git a/tools/linguist/lconvert/main.cpp b/tools/linguist/lconvert/main.cpp index 7807761d26..5f3de7b002 100644 --- a/tools/linguist/lconvert/main.cpp +++ b/tools/linguist/lconvert/main.cpp @@ -46,6 +46,8 @@ #include <QtCore/QString> #include <QtCore/QStringList> +#include <iostream> + static int usage(const QStringList &args) { Q_UNUSED(args); @@ -55,7 +57,7 @@ static int usage(const QStringList &args) foreach (Translator::FileFormat format, Translator::registeredFileFormats()) loaders += line.arg(format.extension, -5).arg(format.description); - qWarning("%s", qPrintable(QString(QLatin1String("\nUsage:\n" + std::cerr << qPrintable(QString(QLatin1String("\nUsage:\n" " lconvert [options] <infile> [<infile>...]\n\n" "lconvert is part of Qt's Linguist tool chain. It can be used as a\n" "stand-alone tool to convert and filter translation data files.\n" @@ -117,7 +119,7 @@ static int usage(const QStringList &args) " 0 on success\n" " 1 on command line parse failures\n" " 2 on read failures\n" - " 3 on write failures\n")).arg(loaders))); + " 3 on write failures\n")).arg(loaders)); return 1; } diff --git a/tools/linguist/linguist/finddialog.cpp b/tools/linguist/linguist/finddialog.cpp index d49ffc5c31..70272647ea 100644 --- a/tools/linguist/linguist/finddialog.cpp +++ b/tools/linguist/linguist/finddialog.cpp @@ -57,7 +57,7 @@ FindDialog::FindDialog(QWidget *parent) findNxt->setEnabled(false); connect(findNxt, SIGNAL(clicked()), this, SLOT(emitFindNext())); - connect(led, SIGNAL(textChanged(const QString &)), this, SLOT(verifyText(const QString &))); + connect(led, SIGNAL(textChanged(QString)), this, SLOT(verifyText(QString))); led->setFocus(); } diff --git a/tools/linguist/linguist/mainwindow.cpp b/tools/linguist/linguist/mainwindow.cpp index 7f09a1ca7f..5c3aaa10e4 100644 --- a/tools/linguist/linguist/mainwindow.cpp +++ b/tools/linguist/linguist/mainwindow.cpp @@ -473,7 +473,7 @@ MainWindow::MainWindow() this, SLOT(updateTranslatorComment(QString))); connect(m_findDialog, SIGNAL(findNext(QString,DataModel::FindLocation,bool,bool)), this, SLOT(findNext(QString,DataModel::FindLocation,bool,bool))); - connect(m_translateDialog, SIGNAL(requestMatchUpdate(bool &)), SLOT(updateTranslateHit(bool &))); + connect(m_translateDialog, SIGNAL(requestMatchUpdate(bool&)), SLOT(updateTranslateHit(bool&))); connect(m_translateDialog, SIGNAL(activated(int)), SLOT(translate(int))); QSize as(qApp->desktop()->size()); diff --git a/tools/linguist/linguist/messageeditor.cpp b/tools/linguist/linguist/messageeditor.cpp index dedb3eeabf..a7cc636e4a 100644 --- a/tools/linguist/linguist/messageeditor.cpp +++ b/tools/linguist/linguist/messageeditor.cpp @@ -148,14 +148,14 @@ void MessageEditor::setupEditorPage() m_source = new FormWidget(tr("Source text"), false); m_source->setHideWhenEmpty(true); m_source->setWhatsThis(tr("This area shows the source text.")); - connect(m_source, SIGNAL(selectionChanged(QTextEdit *)), - SLOT(selectionChanged(QTextEdit *))); + connect(m_source, SIGNAL(selectionChanged(QTextEdit*)), + SLOT(selectionChanged(QTextEdit*))); m_pluralSource = new FormWidget(tr("Source text (Plural)"), false); m_pluralSource->setHideWhenEmpty(true); m_pluralSource->setWhatsThis(tr("This area shows the plural form of the source text.")); - connect(m_pluralSource, SIGNAL(selectionChanged(QTextEdit *)), - SLOT(selectionChanged(QTextEdit *))); + connect(m_pluralSource, SIGNAL(selectionChanged(QTextEdit*)), + SLOT(selectionChanged(QTextEdit*))); m_commentText = new FormWidget(tr("Developer comments"), false); m_commentText->setHideWhenEmpty(true); @@ -222,11 +222,11 @@ void MessageEditor::messageModelAppended() ed.transCommentText->setWhatsThis(tr("Here you can enter comments for your own use." " They have no effect on the translated applications.") ); ed.transCommentText->getEditor()->installEventFilter(this); - connect(ed.transCommentText, SIGNAL(selectionChanged(QTextEdit *)), - SLOT(selectionChanged(QTextEdit *))); - connect(ed.transCommentText, SIGNAL(textChanged(QTextEdit *)), - SLOT(emitTranslatorCommentChanged(QTextEdit *))); - connect(ed.transCommentText, SIGNAL(textChanged(QTextEdit *)), SLOT(resetHoverSelection())); + connect(ed.transCommentText, SIGNAL(selectionChanged(QTextEdit*)), + SLOT(selectionChanged(QTextEdit*))); + connect(ed.transCommentText, SIGNAL(textChanged(QTextEdit*)), + SLOT(emitTranslatorCommentChanged(QTextEdit*))); + connect(ed.transCommentText, SIGNAL(textChanged(QTextEdit*)), SLOT(resetHoverSelection())); connect(ed.transCommentText, SIGNAL(cursorPositionChanged()), SLOT(resetHoverSelection())); fixTabOrder(); QBoxLayout *box = new QVBoxLayout(ed.container); @@ -275,7 +275,7 @@ void MessageEditor::messageModelDeleted(int model) void MessageEditor::addPluralForm(int model, const QString &label, bool writable) { FormMultiWidget *transEditor = new FormMultiWidget(label); - connect(transEditor, SIGNAL(editorCreated(QTextEdit *)), SLOT(editorCreated(QTextEdit *))); + connect(transEditor, SIGNAL(editorCreated(QTextEdit*)), SLOT(editorCreated(QTextEdit*))); transEditor->setEditingEnabled(writable); transEditor->setHideWhenEmpty(!writable); if (!m_editors[model].transTexts.isEmpty()) @@ -284,11 +284,11 @@ void MessageEditor::addPluralForm(int model, const QString &label, bool writable static_cast<QBoxLayout *>(m_editors[model].container->layout())->insertWidget( m_editors[model].transTexts.count(), transEditor); - connect(transEditor, SIGNAL(selectionChanged(QTextEdit *)), - SLOT(selectionChanged(QTextEdit *))); - connect(transEditor, SIGNAL(textChanged(QTextEdit *)), - SLOT(emitTranslationChanged(QTextEdit *))); - connect(transEditor, SIGNAL(textChanged(QTextEdit *)), SLOT(resetHoverSelection())); + connect(transEditor, SIGNAL(selectionChanged(QTextEdit*)), + SLOT(selectionChanged(QTextEdit*))); + connect(transEditor, SIGNAL(textChanged(QTextEdit*)), + SLOT(emitTranslationChanged(QTextEdit*))); + connect(transEditor, SIGNAL(textChanged(QTextEdit*)), SLOT(resetHoverSelection())); connect(transEditor, SIGNAL(cursorPositionChanged()), SLOT(resetHoverSelection())); m_editors[model].transTexts << transEditor; @@ -407,10 +407,12 @@ QTextEdit *MessageEditor::activeTranslation() const { if (m_currentNumerus < 0) return 0; - foreach (QTextEdit *te, m_editors[m_currentModel].transTexts[m_currentNumerus]->getEditors()) + const QList<FormatTextEdit *> &editors = + m_editors[m_currentModel].transTexts[m_currentNumerus]->getEditors(); + foreach (QTextEdit *te, editors) if (te->hasFocus()) return te; - return 0; // This cannot happen + return editors.first(); } QTextEdit *MessageEditor::activeOr1stTranslation() const diff --git a/tools/linguist/linguist/phrasebookbox.cpp b/tools/linguist/linguist/phrasebookbox.cpp index 57518c1864..fd423d4648 100644 --- a/tools/linguist/linguist/phrasebookbox.cpp +++ b/tools/linguist/linguist/phrasebookbox.cpp @@ -87,7 +87,7 @@ PhraseBookBox::PhraseBookBox(PhraseBook *phraseBook, QWidget *parent) this, SLOT(targetChanged(QString))); connect(definitionLed, SIGNAL(textChanged(QString)), this, SLOT(definitionChanged(QString))); - connect(phraseList->selectionModel(), SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)), + connect(phraseList->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(selectionChanged())); connect(newBut, SIGNAL(clicked()), this, SLOT(newPhrase())); connect(removeBut, SIGNAL(clicked()), this, SLOT(removePhrase())); diff --git a/tools/linguist/lrelease/lrelease.pro b/tools/linguist/lrelease/lrelease.pro index e4c18ee36b..b13c03e041 100644 --- a/tools/linguist/lrelease/lrelease.pro +++ b/tools/linguist/lrelease/lrelease.pro @@ -5,6 +5,13 @@ DESTDIR = ../../../bin DEFINES += QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII SOURCES += main.cpp +INCLUDEPATH += $$QT_BUILD_TREE/src/corelib/global # qlibraryinfo.cpp includes qconfig.cpp +SOURCES += \ + $$QT_SOURCE_TREE/src/corelib/global/qlibraryinfo.cpp \ + $$QT_SOURCE_TREE/src/corelib/io/qsettings.cpp +win32:SOURCES += $$QT_SOURCE_TREE/src/corelib/io/qsettings_win.cpp +macx:SOURCES += $$QT_SOURCE_TREE/src/corelib/io/qsettings_mac.cpp + include(../../../src/tools/bootstrap/bootstrap.pri) include(../shared/formats.pri) include(../shared/proparser.pri) diff --git a/tools/linguist/lupdate/cpp.cpp b/tools/linguist/lupdate/cpp.cpp index 443abd0f3a..857233e9e2 100644 --- a/tools/linguist/lupdate/cpp.cpp +++ b/tools/linguist/lupdate/cpp.cpp @@ -306,7 +306,6 @@ private: // the string to read from and current position in the string QTextCodec *yySourceCodec; - bool yySourceIsUnicode; QString yyInStr; const ushort *yyInPtr; @@ -353,7 +352,6 @@ void CppParser::setInput(const QString &in) yyInStr = in; yyFileName = QString(); yySourceCodec = 0; - yySourceIsUnicode = true; yyForceUtf8 = true; } @@ -362,7 +360,6 @@ void CppParser::setInput(QTextStream &ts, const QString &fileName) yyInStr = ts.readAll(); yyFileName = fileName; yySourceCodec = ts.codec(); - yySourceIsUnicode = yySourceCodec->name().startsWith("UTF-"); yyForceUtf8 = false; } @@ -1430,24 +1427,24 @@ QString CppParser::transcode(const QString &str, bool utf8) { static const char tab[] = "abfnrtv"; static const char backTab[] = "\a\b\f\n\r\t\v"; - const QString in = (!utf8 || yySourceIsUnicode) - ? str : QString::fromUtf8(yySourceCodec->fromUnicode(str).data()); - QString out; + // This function has to convert back to bytes, as C's \0* sequences work at that level. + const QByteArray in = yyForceUtf8 ? str.toUtf8() : tor->codec()->fromUnicode(str); + QByteArray out; out.reserve(in.length()); for (int i = 0; i < in.length();) { - ushort c = in[i++].unicode(); + uchar c = in[i++]; if (c == '\\') { if (i >= in.length()) break; - c = in[i++].unicode(); + c = in[i++]; if (c == '\n') continue; if (c == 'x') { QByteArray hex; - while (i < in.length() && isxdigit((c = in[i].unicode()))) { + while (i < in.length() && isxdigit((c = in[i]))) { hex += c; i++; } @@ -1456,7 +1453,7 @@ QString CppParser::transcode(const QString &str, bool utf8) QByteArray oct; int n = 0; oct += c; - while (n < 2 && i < in.length() && (c = in[i].unicode()) >= '0' && c < '8') { + while (n < 2 && i < in.length() && (c = in[i]) >= '0' && c < '8') { i++; n++; oct += c; @@ -1464,13 +1461,14 @@ QString CppParser::transcode(const QString &str, bool utf8) out += oct.toUInt(0, 8); } else { const char *p = strchr(tab, c); - out += QChar(QLatin1Char(!p ? c : backTab[p - tab])); + out += !p ? c : backTab[p - tab]; } } else { out += c; } } - return out; + return (utf8 || yyForceUtf8) ? QString::fromUtf8(out.constData(), out.length()) + : tor->codec()->toUnicode(out); } void CppParser::recordMessage( @@ -2150,9 +2148,9 @@ void loadCPP(Translator &translator, const QStringList &filenames, ConversionDat QTextStream ts(&file); ts.setCodec(codec); ts.setAutoDetectUnicode(true); - if (ts.codec()->name() == "UTF-16") - translator.setCodecName("System"); parser.setInput(ts, filename); + if (cd.m_outputCodec.isEmpty() && ts.codec()->name() == "UTF-16") + translator.setCodecName("System"); Translator *tor = new Translator; tor->setCodecName(translator.codecName()); parser.setTranslator(tor); diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp index af40616343..d76350d8c6 100644 --- a/tools/linguist/lupdate/main.cpp +++ b/tools/linguist/lupdate/main.cpp @@ -54,13 +54,20 @@ #include <QtCore/QStringList> #include <QtCore/QTextCodec> +#include <iostream> + static QString m_defaultExtensions; -static void printOut(const QString & out) +static void printErr(const QString & out) { qWarning("%s", qPrintable(out)); } +static void printOut(const QString & out) +{ + std::cerr << qPrintable(out); +} + static void recursiveFileInfoList(const QDir &dir, const QSet<QString> &nameFilters, QDir::Filters filter, QFileInfoList *fileinfolist) @@ -137,7 +144,7 @@ static void updateTsFiles(const Translator &fetchedTor, const QStringList &tsFil cd.m_sortContexts = !(options & NoSort); if (QFile(fileName).exists()) { if (!tor.load(fileName, cd, QLatin1String("auto"))) { - printOut(cd.error()); + printErr(cd.error()); *fail = true; continue; } @@ -197,11 +204,11 @@ static void updateTsFiles(const Translator &fetchedTor, const QStringList &tsFil out.normalizeTranslations(cd); if (!cd.errors().isEmpty()) { - printOut(cd.error()); + printErr(cd.error()); cd.clearErrors(); } if (!out.save(fileName, cd, QLatin1String("auto"))) { - printOut(cd.error()); + printErr(cd.error()); *fail = true; } } @@ -495,6 +502,7 @@ int main(int argc, char **argv) if (!tmp.isEmpty() && !tmp.first().isEmpty()) { codecForTr = tmp.first().toLatin1(); fetchedTor.setCodecName(codecForTr); + cd.m_outputCodec = codecForTr; } tmp = variables.value("CODECFORSRC"); if (!tmp.isEmpty() && !tmp.first().isEmpty()) { diff --git a/tools/linguist/phrasebooks/french.qph b/tools/linguist/phrasebooks/french.qph index d710abd564..9e1a5809e0 100644 --- a/tools/linguist/phrasebooks/french.qph +++ b/tools/linguist/phrasebooks/french.qph @@ -1402,4 +1402,40 @@ <source>&Redo</source> <target>&Rétablir</target> </phrase> +<phrase> + <source>Edit</source> + <target>Éditer</target> +</phrase> +<phrase> + <source>PATH:</source> + <target>PATH :</target> +</phrase> +<phrase> + <source>Change:</source> + <target>Modification :</target> +</phrase> +<phrase> + <source>Edit...</source> + <target>Modifier...</target> +</phrase> +<phrase> + <source>&Username:</source> + <target>&Utilisateur :</target> +</phrase> +<phrase> + <source>Link</source> + <target>Lien</target> +</phrase> +<phrase> + <source>Paste:</source> + <target>Collage :</target> +</phrase> +<phrase> + <source>Label</source> + <target>Libellé</target> +</phrase> +<phrase> + <source>&Debug</source> + <target>&Déboguer</target> +</phrase> </QPH> diff --git a/tools/linguist/shared/translator.cpp b/tools/linguist/shared/translator.cpp index 05fc6e5f03..8a071d3a38 100644 --- a/tools/linguist/shared/translator.cpp +++ b/tools/linguist/shared/translator.cpp @@ -67,7 +67,7 @@ QString QObject::tr(const char *sourceText, const char *, int n) #endif Translator::Translator() : - m_codecName("ISO-8859-1"), + m_codec(QTextCodec::codecForName("ISO-8859-1")), m_locationsType(AbsoluteLocations) { } @@ -713,12 +713,17 @@ void Translator::setCodecName(const QByteArray &name) if (!codec) { if (!name.isEmpty()) qWarning("No QTextCodec for %s available. Using Latin1\n", name.constData()); - m_codecName = "ISO-8859-1"; + m_codec = QTextCodec::codecForName("ISO-8859-1"); } else { - m_codecName = codec->name(); + m_codec = codec; } } +QByteArray Translator::codecName() const +{ + return m_codec->name(); +} + void Translator::dump() const { for (int i = 0; i != messageCount(); ++i) diff --git a/tools/linguist/shared/translator.h b/tools/linguist/shared/translator.h index f29317b65e..353cf9d05f 100644 --- a/tools/linguist/shared/translator.h +++ b/tools/linguist/shared/translator.h @@ -97,7 +97,7 @@ public: public: QString m_defaultContext; QByteArray m_codecForSource; // CPP, PO & QM specific - QByteArray m_outputCodec; // PO specific + QByteArray m_outputCodec; // CPP & PO specific QString m_unTrPrefix; // QM specific QString m_sourceFileName; QString m_targetFileName; @@ -151,7 +151,8 @@ public: void reportDuplicates(const Duplicates &dupes, const QString &fileName, bool verbose); void setCodecName(const QByteArray &name); - QByteArray codecName() const { return m_codecName; } + QByteArray codecName() const; + QTextCodec *codec() const { return m_codec; } QString languageCode() const { return m_language; } QString sourceLanguageCode() const { return m_sourceLanguage; } @@ -211,7 +212,7 @@ private: typedef QList<TranslatorMessage> TMM; // int stores the sequence position. TMM m_messages; - QByteArray m_codecName; + QTextCodec *m_codec; LocationsType m_locationsType; // A string beginning with a 2 or 3 letter language code (ISO 639-1 diff --git a/tools/qconfig/main.cpp b/tools/qconfig/main.cpp index 5bcbeee0d1..84d88c0ae3 100644 --- a/tools/qconfig/main.cpp +++ b/tools/qconfig/main.cpp @@ -171,11 +171,11 @@ Main::Main() splitter->addWidget(textBrowser); textBrowser->show(); - connect(textBrowser, SIGNAL(featureClicked(const QString&)), - this, SLOT(showInfo(const QString&))); + connect(textBrowser, SIGNAL(featureClicked(QString)), + this, SLOT(showInfo(QString))); connect(featureTree, SIGNAL(activated(QModelIndex)), this, SLOT(showInfo(QModelIndex))); - connect(featureModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)), + connect(featureModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(modelChanged())); connect(featureTree, SIGNAL(clicked(QModelIndex)), this, SLOT(showInfo(QModelIndex))); diff --git a/tools/qdbus/qdbusviewer/qdbusviewer.cpp b/tools/qdbus/qdbusviewer/qdbusviewer.cpp index 4e497d3acc..8f1ba7d933 100644 --- a/tools/qdbus/qdbusviewer/qdbusviewer.cpp +++ b/tools/qdbus/qdbusviewer/qdbusviewer.cpp @@ -76,7 +76,7 @@ QDBusViewer::QDBusViewer(const QDBusConnection &connection, QWidget *parent) : tree = new QTreeView; tree->setContextMenuPolicy(Qt::CustomContextMenu); - connect(tree, SIGNAL(activated(const QModelIndex&)), this, SLOT(activate(const QModelIndex&))); + connect(tree, SIGNAL(activated(QModelIndex)), this, SLOT(activate(QModelIndex))); refreshAction = new QAction(tr("&Refresh"), tree); refreshAction->setData(42); // increase the amount of 42 used as magic number by one diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index 8c039eba50..7a4934f4b9 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -15,16 +15,6 @@ HTML.postheader = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0 " <a href=\"overviews.html\">" \ "<font color=\"#004faf\">Overviews</font></a>" \ "</td>" \ - "<td class=\"searchBar\" align=\"right\" valign=\"center\">" \ - "<form action=\"http://www.google.com/cse\" id=\"cse-search-box\">" \ - "<div>" \ - "<input type=\"hidden\" name=\"cx\" value=\"000136343326384750312:dhbxnqlakyu\" />" \ - "<input type=\"hidden\" name=\"ie\" value=\"UTF-8\" />" \ - "<input type=\"text\" name=\"q\" size=\"31\" />" \ - "<input type=\"submit\" name=\"sa\" value=\"Search\" />" \ - "</div>" \ - "</form>" \ - "</td>\n" \ "</tr></table>" HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \ @@ -32,10 +22,4 @@ HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \ "<td width=\"40%\" align=\"left\">Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies)</td>\n" \ "<td width=\"20%\" align=\"center\"><a href=\"trademarks.html\">Trademarks</a></td>\n" \ "<td width=\"40%\" align=\"right\"><div align=\"right\">Qt \\version</div></td>\n" \ - \ - "<script type=\"text/javascript\" src=\"http://www.google.com/jsapi\"></script>" \ - "<script type=\"text/javascript\">google.load(\"elements\", \"1\", {packages: \"transliteration\"});</script>" \ - "<script type=\"text/javascript\" src=\"http://www.google.com/coop/cse/t13n?form=cse-search-box&t13n_langs=en\"></script>" \ - \ - "<script type=\"text/javascript\" src=\"http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en\"></script>"\ "</tr></table></div></address>" diff --git a/tools/qvfb/qvfbview.cpp b/tools/qvfb/qvfbview.cpp index 69817bdb8e..67f81ac982 100644 --- a/tools/qvfb/qvfbview.cpp +++ b/tools/qvfb/qvfbview.cpp @@ -108,8 +108,8 @@ QVFbView::QVFbView(int id, int w, int h, int d, Rotation r, QWidget *parent) break; } - connect(mView, SIGNAL(displayDataChanged(const QRect &)), - SLOT(refreshDisplay(const QRect &))); + connect(mView, SIGNAL(displayDataChanged(QRect)), + SLOT(refreshDisplay(QRect))); #ifdef Q_WS_X11 connect(mView, SIGNAL(displayEmbedRequested(WId)), this, SLOT(embedDisplay(WId))); diff --git a/tools/shared/fontpanel/fontpanel.cpp b/tools/shared/fontpanel/fontpanel.cpp index 46ce14476a..4fca5dc088 100644 --- a/tools/shared/fontpanel/fontpanel.cpp +++ b/tools/shared/fontpanel/fontpanel.cpp @@ -73,7 +73,7 @@ FontPanel::FontPanel(QWidget *parentWidget) : connect(m_writingSystemComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(slotWritingSystemChanged(int))); formLayout->addRow(tr("&Writing system"), m_writingSystemComboBox); - connect(m_familyComboBox, SIGNAL( currentFontChanged(QFont)), this, SLOT(slotFamilyChanged(QFont))); + connect(m_familyComboBox, SIGNAL(currentFontChanged(QFont)), this, SLOT(slotFamilyChanged(QFont))); formLayout->addRow(tr("&Family"), m_familyComboBox); m_styleComboBox->setEditable(false); diff --git a/tools/shared/qtgradienteditor/qtgradientdialog.cpp b/tools/shared/qtgradienteditor/qtgradientdialog.cpp index d4685f1bcb..d178829fc6 100644 --- a/tools/shared/qtgradienteditor/qtgradientdialog.cpp +++ b/tools/shared/qtgradienteditor/qtgradientdialog.cpp @@ -207,8 +207,8 @@ QtGradientDialog::QtGradientDialog(QWidget *parent) button = d_ptr->m_ui.buttonBox->button(QDialogButtonBox::Cancel); if (button) button->setAutoDefault(false); - connect(d_ptr->m_ui.gradientEditor, SIGNAL(aboutToShowDetails(bool, int)), - this, SLOT(slotAboutToShowDetails(bool, int))); + connect(d_ptr->m_ui.gradientEditor, SIGNAL(aboutToShowDetails(bool,int)), + this, SLOT(slotAboutToShowDetails(bool,int))); } /*! diff --git a/tools/shared/qtgradienteditor/qtgradienteditor.cpp b/tools/shared/qtgradienteditor/qtgradienteditor.cpp index 98dbdd6f8c..d9b42beb58 100644 --- a/tools/shared/qtgradienteditor/qtgradienteditor.cpp +++ b/tools/shared/qtgradienteditor/qtgradienteditor.cpp @@ -760,8 +760,8 @@ QtGradientEditor::QtGradientEditor(QWidget *parent) d_ptr->m_ui.detailsButton->setIcon(icon); connect(d_ptr->m_ui.detailsButton, SIGNAL(clicked(bool)), this, SLOT(slotDetailsChanged(bool))); - connect(d_ptr->m_gradientStopsController, SIGNAL(gradientStopsChanged(const QGradientStops &)), - this, SLOT(slotGradientStopsChanged(const QGradientStops &))); + connect(d_ptr->m_gradientStopsController, SIGNAL(gradientStopsChanged(QGradientStops)), + this, SLOT(slotGradientStopsChanged(QGradientStops))); QIcon iconLinear(QLatin1String(":/trolltech/qtgradienteditor/images/typelinear.png")); QIcon iconRadial(QLatin1String(":/trolltech/qtgradienteditor/images/typeradial.png")); @@ -806,18 +806,18 @@ QtGradientEditor::QtGradientEditor(QWidget *parent) connect(d_ptr->m_ui.spreadComboBox, SIGNAL(activated(int)), this, SLOT(slotSpreadChanged(int))); - connect(d_ptr->m_ui.gradientWidget, SIGNAL(startLinearChanged(const QPointF &)), - this, SLOT(startLinearChanged(const QPointF &))); - connect(d_ptr->m_ui.gradientWidget, SIGNAL(endLinearChanged(const QPointF &)), - this, SLOT(endLinearChanged(const QPointF &))); - connect(d_ptr->m_ui.gradientWidget, SIGNAL(centralRadialChanged(const QPointF &)), - this, SLOT(centralRadialChanged(const QPointF &))); - connect(d_ptr->m_ui.gradientWidget, SIGNAL(focalRadialChanged(const QPointF &)), - this, SLOT(focalRadialChanged(const QPointF &))); + connect(d_ptr->m_ui.gradientWidget, SIGNAL(startLinearChanged(QPointF)), + this, SLOT(startLinearChanged(QPointF))); + connect(d_ptr->m_ui.gradientWidget, SIGNAL(endLinearChanged(QPointF)), + this, SLOT(endLinearChanged(QPointF))); + connect(d_ptr->m_ui.gradientWidget, SIGNAL(centralRadialChanged(QPointF)), + this, SLOT(centralRadialChanged(QPointF))); + connect(d_ptr->m_ui.gradientWidget, SIGNAL(focalRadialChanged(QPointF)), + this, SLOT(focalRadialChanged(QPointF))); connect(d_ptr->m_ui.gradientWidget, SIGNAL(radiusRadialChanged(qreal)), this, SLOT(radiusRadialChanged(qreal))); - connect(d_ptr->m_ui.gradientWidget, SIGNAL(centralConicalChanged(const QPointF &)), - this, SLOT(centralConicalChanged(const QPointF &))); + connect(d_ptr->m_ui.gradientWidget, SIGNAL(centralConicalChanged(QPointF)), + this, SLOT(centralConicalChanged(QPointF))); connect(d_ptr->m_ui.gradientWidget, SIGNAL(angleConicalChanged(qreal)), this, SLOT(angleConicalChanged(qreal))); diff --git a/tools/shared/qtgradienteditor/qtgradientstopscontroller.cpp b/tools/shared/qtgradienteditor/qtgradientstopscontroller.cpp index be707d4df4..b2765b5a57 100644 --- a/tools/shared/qtgradienteditor/qtgradientstopscontroller.cpp +++ b/tools/shared/qtgradienteditor/qtgradientstopscontroller.cpp @@ -608,31 +608,31 @@ void QtGradientStopsController::setUi(Ui::QtGradientEditor *ui) d_ptr->m_model = new QtGradientStopsModel(this); d_ptr->m_ui->gradientStopsWidget->setGradientStopsModel(d_ptr->m_model); - connect(d_ptr->m_model, SIGNAL(currentStopChanged(QtGradientStop *)), - this, SLOT(slotCurrentStopChanged(QtGradientStop *))); - connect(d_ptr->m_model, SIGNAL(stopMoved(QtGradientStop *, qreal)), - this, SLOT(slotStopMoved(QtGradientStop *, qreal))); - connect(d_ptr->m_model, SIGNAL(stopsSwapped(QtGradientStop *, QtGradientStop *)), - this, SLOT(slotStopsSwapped(QtGradientStop *, QtGradientStop *))); - connect(d_ptr->m_model, SIGNAL(stopChanged(QtGradientStop *, const QColor &)), - this, SLOT(slotStopChanged(QtGradientStop *, const QColor &))); - connect(d_ptr->m_model, SIGNAL(stopSelected(QtGradientStop *, bool)), - this, SLOT(slotStopSelected(QtGradientStop *, bool))); - connect(d_ptr->m_model, SIGNAL(stopAdded(QtGradientStop *)), - this, SLOT(slotStopAdded(QtGradientStop *))); - connect(d_ptr->m_model, SIGNAL(stopRemoved(QtGradientStop *)), - this, SLOT(slotStopRemoved(QtGradientStop *))); - - connect(d_ptr->m_ui->hueColorLine, SIGNAL(colorChanged(const QColor &)), - this, SLOT(slotChangeHue(const QColor &))); - connect(d_ptr->m_ui->saturationColorLine, SIGNAL(colorChanged(const QColor &)), - this, SLOT(slotChangeSaturation(const QColor &))); - connect(d_ptr->m_ui->valueColorLine, SIGNAL(colorChanged(const QColor &)), - this, SLOT(slotChangeValue(const QColor &))); - connect(d_ptr->m_ui->alphaColorLine, SIGNAL(colorChanged(const QColor &)), - this, SLOT(slotChangeAlpha(const QColor &))); - connect(d_ptr->m_ui->colorButton, SIGNAL(colorChanged(const QColor &)), - this, SLOT(slotChangeColor(const QColor &))); + connect(d_ptr->m_model, SIGNAL(currentStopChanged(QtGradientStop*)), + this, SLOT(slotCurrentStopChanged(QtGradientStop*))); + connect(d_ptr->m_model, SIGNAL(stopMoved(QtGradientStop*,qreal)), + this, SLOT(slotStopMoved(QtGradientStop*,qreal))); + connect(d_ptr->m_model, SIGNAL(stopsSwapped(QtGradientStop*,QtGradientStop*)), + this, SLOT(slotStopsSwapped(QtGradientStop*,QtGradientStop*))); + connect(d_ptr->m_model, SIGNAL(stopChanged(QtGradientStop*,QColor)), + this, SLOT(slotStopChanged(QtGradientStop*,QColor))); + connect(d_ptr->m_model, SIGNAL(stopSelected(QtGradientStop*,bool)), + this, SLOT(slotStopSelected(QtGradientStop*,bool))); + connect(d_ptr->m_model, SIGNAL(stopAdded(QtGradientStop*)), + this, SLOT(slotStopAdded(QtGradientStop*))); + connect(d_ptr->m_model, SIGNAL(stopRemoved(QtGradientStop*)), + this, SLOT(slotStopRemoved(QtGradientStop*))); + + connect(d_ptr->m_ui->hueColorLine, SIGNAL(colorChanged(QColor)), + this, SLOT(slotChangeHue(QColor))); + connect(d_ptr->m_ui->saturationColorLine, SIGNAL(colorChanged(QColor)), + this, SLOT(slotChangeSaturation(QColor))); + connect(d_ptr->m_ui->valueColorLine, SIGNAL(colorChanged(QColor)), + this, SLOT(slotChangeValue(QColor))); + connect(d_ptr->m_ui->alphaColorLine, SIGNAL(colorChanged(QColor)), + this, SLOT(slotChangeAlpha(QColor))); + connect(d_ptr->m_ui->colorButton, SIGNAL(colorChanged(QColor)), + this, SLOT(slotChangeColor(QColor))); connect(d_ptr->m_ui->hueSpinBox, SIGNAL(valueChanged(int)), this, SLOT(slotChangeHue(int))); diff --git a/tools/shared/qtgradienteditor/qtgradientstopswidget.cpp b/tools/shared/qtgradienteditor/qtgradientstopswidget.cpp index 94e936a115..411dbed456 100644 --- a/tools/shared/qtgradienteditor/qtgradientstopswidget.cpp +++ b/tools/shared/qtgradienteditor/qtgradientstopswidget.cpp @@ -421,20 +421,20 @@ void QtGradientStopsWidget::setGradientStopsModel(QtGradientStopsModel *model) return; if (d_ptr->m_model) { - disconnect(d_ptr->m_model, SIGNAL(stopAdded(QtGradientStop *)), - this, SLOT(slotStopAdded(QtGradientStop *))); - disconnect(d_ptr->m_model, SIGNAL(stopRemoved(QtGradientStop *)), - this, SLOT(slotStopRemoved(QtGradientStop *))); - disconnect(d_ptr->m_model, SIGNAL(stopMoved(QtGradientStop *, qreal)), - this, SLOT(slotStopMoved(QtGradientStop *, qreal))); - disconnect(d_ptr->m_model, SIGNAL(stopsSwapped(QtGradientStop *, QtGradientStop *)), - this, SLOT(slotStopsSwapped(QtGradientStop *, QtGradientStop *))); - disconnect(d_ptr->m_model, SIGNAL(stopChanged(QtGradientStop *, const QColor &)), - this, SLOT(slotStopChanged(QtGradientStop *, const QColor &))); - disconnect(d_ptr->m_model, SIGNAL(stopSelected(QtGradientStop *, bool)), - this, SLOT(slotStopSelected(QtGradientStop *, bool))); - disconnect(d_ptr->m_model, SIGNAL(currentStopChanged(QtGradientStop *)), - this, SLOT(slotCurrentStopChanged(QtGradientStop *))); + disconnect(d_ptr->m_model, SIGNAL(stopAdded(QtGradientStop*)), + this, SLOT(slotStopAdded(QtGradientStop*))); + disconnect(d_ptr->m_model, SIGNAL(stopRemoved(QtGradientStop*)), + this, SLOT(slotStopRemoved(QtGradientStop*))); + disconnect(d_ptr->m_model, SIGNAL(stopMoved(QtGradientStop*,qreal)), + this, SLOT(slotStopMoved(QtGradientStop*,qreal))); + disconnect(d_ptr->m_model, SIGNAL(stopsSwapped(QtGradientStop*,QtGradientStop*)), + this, SLOT(slotStopsSwapped(QtGradientStop*,QtGradientStop*))); + disconnect(d_ptr->m_model, SIGNAL(stopChanged(QtGradientStop*,QColor)), + this, SLOT(slotStopChanged(QtGradientStop*,QColor))); + disconnect(d_ptr->m_model, SIGNAL(stopSelected(QtGradientStop*,bool)), + this, SLOT(slotStopSelected(QtGradientStop*,bool))); + disconnect(d_ptr->m_model, SIGNAL(currentStopChanged(QtGradientStop*)), + this, SLOT(slotCurrentStopChanged(QtGradientStop*))); d_ptr->m_stops.clear(); } @@ -442,20 +442,20 @@ void QtGradientStopsWidget::setGradientStopsModel(QtGradientStopsModel *model) d_ptr->m_model = model; if (d_ptr->m_model) { - connect(d_ptr->m_model, SIGNAL(stopAdded(QtGradientStop *)), - this, SLOT(slotStopAdded(QtGradientStop *))); - connect(d_ptr->m_model, SIGNAL(stopRemoved(QtGradientStop *)), - this, SLOT(slotStopRemoved(QtGradientStop *))); - connect(d_ptr->m_model, SIGNAL(stopMoved(QtGradientStop *, qreal)), - this, SLOT(slotStopMoved(QtGradientStop *, qreal))); - connect(d_ptr->m_model, SIGNAL(stopsSwapped(QtGradientStop *, QtGradientStop *)), - this, SLOT(slotStopsSwapped(QtGradientStop *, QtGradientStop *))); - connect(d_ptr->m_model, SIGNAL(stopChanged(QtGradientStop *, const QColor &)), - this, SLOT(slotStopChanged(QtGradientStop *, const QColor &))); - connect(d_ptr->m_model, SIGNAL(stopSelected(QtGradientStop *, bool)), - this, SLOT(slotStopSelected(QtGradientStop *, bool))); - connect(d_ptr->m_model, SIGNAL(currentStopChanged(QtGradientStop *)), - this, SLOT(slotCurrentStopChanged(QtGradientStop *))); + connect(d_ptr->m_model, SIGNAL(stopAdded(QtGradientStop*)), + this, SLOT(slotStopAdded(QtGradientStop*))); + connect(d_ptr->m_model, SIGNAL(stopRemoved(QtGradientStop*)), + this, SLOT(slotStopRemoved(QtGradientStop*))); + connect(d_ptr->m_model, SIGNAL(stopMoved(QtGradientStop*,qreal)), + this, SLOT(slotStopMoved(QtGradientStop*,qreal))); + connect(d_ptr->m_model, SIGNAL(stopsSwapped(QtGradientStop*,QtGradientStop*)), + this, SLOT(slotStopsSwapped(QtGradientStop*,QtGradientStop*))); + connect(d_ptr->m_model, SIGNAL(stopChanged(QtGradientStop*,QColor)), + this, SLOT(slotStopChanged(QtGradientStop*,QColor))); + connect(d_ptr->m_model, SIGNAL(stopSelected(QtGradientStop*,bool)), + this, SLOT(slotStopSelected(QtGradientStop*,bool))); + connect(d_ptr->m_model, SIGNAL(currentStopChanged(QtGradientStop*)), + this, SLOT(slotCurrentStopChanged(QtGradientStop*))); QList<QtGradientStop *> stops = d_ptr->m_model->stops().values(); QListIterator<QtGradientStop *> itStop(stops); diff --git a/tools/shared/qtgradienteditor/qtgradientview.cpp b/tools/shared/qtgradienteditor/qtgradientview.cpp index 4df42b425f..c9d8aac2f4 100644 --- a/tools/shared/qtgradienteditor/qtgradientview.cpp +++ b/tools/shared/qtgradienteditor/qtgradientview.cpp @@ -201,9 +201,9 @@ QtGradientView::QtGradientView(QWidget *parent) pal.setBrush(QPalette::Base, QBrush(pm)); m_ui.listWidget->viewport()->setPalette(pal); - connect(m_ui.listWidget, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(slotGradientActivated(QListWidgetItem *))); - connect(m_ui.listWidget, SIGNAL(itemChanged(QListWidgetItem *)), this, SLOT(slotRenameGradient(QListWidgetItem *))); - connect(m_ui.listWidget, SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)), this, SLOT(slotCurrentItemChanged(QListWidgetItem *))); + connect(m_ui.listWidget, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(slotGradientActivated(QListWidgetItem*))); + connect(m_ui.listWidget, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(slotRenameGradient(QListWidgetItem*))); + connect(m_ui.listWidget, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), this, SLOT(slotCurrentItemChanged(QListWidgetItem*))); m_newAction = new QAction(QIcon(QLatin1String(":/trolltech/qtgradienteditor/images/plus.png")), tr("New..."), this); m_editAction = new QAction(QIcon(QLatin1String(":/trolltech/qtgradienteditor/images/edit.png")), tr("Edit..."), this); @@ -234,14 +234,14 @@ void QtGradientView::setGradientManager(QtGradientManager *manager) return; if (m_manager) { - disconnect(m_manager, SIGNAL(gradientAdded(const QString &, const QGradient &)), - this, SLOT(slotGradientAdded(const QString &, const QGradient &))); - disconnect(m_manager, SIGNAL(gradientRenamed(const QString &, const QString &)), - this, SLOT(slotGradientRenamed(const QString &, const QString &))); - disconnect(m_manager, SIGNAL(gradientChanged(const QString &, const QGradient &)), - this, SLOT(slotGradientChanged(const QString &, const QGradient &))); - disconnect(m_manager, SIGNAL(gradientRemoved(const QString &)), - this, SLOT(slotGradientRemoved(const QString &))); + disconnect(m_manager, SIGNAL(gradientAdded(QString,QGradient)), + this, SLOT(slotGradientAdded(QString,QGradient))); + disconnect(m_manager, SIGNAL(gradientRenamed(QString,QString)), + this, SLOT(slotGradientRenamed(QString,QString))); + disconnect(m_manager, SIGNAL(gradientChanged(QString,QGradient)), + this, SLOT(slotGradientChanged(QString,QGradient))); + disconnect(m_manager, SIGNAL(gradientRemoved(QString)), + this, SLOT(slotGradientRemoved(QString))); m_ui.listWidget->clear(); m_idToItem.clear(); @@ -260,14 +260,14 @@ void QtGradientView::setGradientManager(QtGradientManager *manager) slotGradientAdded(itGrad.key(), itGrad.value()); } - connect(m_manager, SIGNAL(gradientAdded(const QString &, const QGradient &)), - this, SLOT(slotGradientAdded(const QString &, const QGradient &))); - connect(m_manager, SIGNAL(gradientRenamed(const QString &, const QString &)), - this, SLOT(slotGradientRenamed(const QString &, const QString &))); - connect(m_manager, SIGNAL(gradientChanged(const QString &, const QGradient &)), - this, SLOT(slotGradientChanged(const QString &, const QGradient &))); - connect(m_manager, SIGNAL(gradientRemoved(const QString &)), - this, SLOT(slotGradientRemoved(const QString &))); + connect(m_manager, SIGNAL(gradientAdded(QString,QGradient)), + this, SLOT(slotGradientAdded(QString,QGradient))); + connect(m_manager, SIGNAL(gradientRenamed(QString,QString)), + this, SLOT(slotGradientRenamed(QString,QString))); + connect(m_manager, SIGNAL(gradientChanged(QString,QGradient)), + this, SLOT(slotGradientChanged(QString,QGradient))); + connect(m_manager, SIGNAL(gradientRemoved(QString)), + this, SLOT(slotGradientRemoved(QString))); } QtGradientManager *QtGradientView::gradientManager() const diff --git a/tools/shared/qtgradienteditor/qtgradientviewdialog.cpp b/tools/shared/qtgradienteditor/qtgradientviewdialog.cpp index 0eff3385bc..6f3d88a937 100644 --- a/tools/shared/qtgradienteditor/qtgradientviewdialog.cpp +++ b/tools/shared/qtgradienteditor/qtgradientviewdialog.cpp @@ -50,10 +50,10 @@ QtGradientViewDialog::QtGradientViewDialog(QWidget *parent) { m_ui.setupUi(this); m_ui.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); - connect(m_ui.gradientView, SIGNAL(currentGradientChanged(const QString &)), - this, SLOT(slotGradientSelected(const QString &))); - connect(m_ui.gradientView, SIGNAL(gradientActivated(const QString &)), - this, SLOT(slotGradientActivated(const QString &))); + connect(m_ui.gradientView, SIGNAL(currentGradientChanged(QString)), + this, SLOT(slotGradientSelected(QString))); + connect(m_ui.gradientView, SIGNAL(gradientActivated(QString)), + this, SLOT(slotGradientActivated(QString))); } void QtGradientViewDialog::setGradientManager(QtGradientManager *manager) diff --git a/tools/shared/qtpropertybrowser/qteditorfactory.cpp b/tools/shared/qtpropertybrowser/qteditorfactory.cpp index 1be5ca69f1..17c5be86e4 100644 --- a/tools/shared/qtpropertybrowser/qteditorfactory.cpp +++ b/tools/shared/qtpropertybrowser/qteditorfactory.cpp @@ -248,12 +248,12 @@ QtSpinBoxFactory::~QtSpinBoxFactory() */ void QtSpinBoxFactory::connectPropertyManager(QtIntPropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotPropertyChanged(QtProperty *, int))); - connect(manager, SIGNAL(rangeChanged(QtProperty *, int, int)), - this, SLOT(slotRangeChanged(QtProperty *, int, int))); - connect(manager, SIGNAL(singleStepChanged(QtProperty *, int)), - this, SLOT(slotSingleStepChanged(QtProperty *, int))); + connect(manager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotPropertyChanged(QtProperty*,int))); + connect(manager, SIGNAL(rangeChanged(QtProperty*,int,int)), + this, SLOT(slotRangeChanged(QtProperty*,int,int))); + connect(manager, SIGNAL(singleStepChanged(QtProperty*,int)), + this, SLOT(slotSingleStepChanged(QtProperty*,int))); } /*! @@ -271,8 +271,8 @@ QWidget *QtSpinBoxFactory::createEditor(QtIntPropertyManager *manager, QtPropert editor->setKeyboardTracking(false); connect(editor, SIGNAL(valueChanged(int)), this, SLOT(slotSetValue(int))); - connect(editor, SIGNAL(destroyed(QObject *)), - this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(destroyed(QObject*)), + this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -283,12 +283,12 @@ QWidget *QtSpinBoxFactory::createEditor(QtIntPropertyManager *manager, QtPropert */ void QtSpinBoxFactory::disconnectPropertyManager(QtIntPropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotPropertyChanged(QtProperty *, int))); - disconnect(manager, SIGNAL(rangeChanged(QtProperty *, int, int)), - this, SLOT(slotRangeChanged(QtProperty *, int, int))); - disconnect(manager, SIGNAL(singleStepChanged(QtProperty *, int)), - this, SLOT(slotSingleStepChanged(QtProperty *, int))); + disconnect(manager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotPropertyChanged(QtProperty*,int))); + disconnect(manager, SIGNAL(rangeChanged(QtProperty*,int,int)), + this, SLOT(slotRangeChanged(QtProperty*,int,int))); + disconnect(manager, SIGNAL(singleStepChanged(QtProperty*,int)), + this, SLOT(slotSingleStepChanged(QtProperty*,int))); } // QtSliderFactory @@ -402,12 +402,12 @@ QtSliderFactory::~QtSliderFactory() */ void QtSliderFactory::connectPropertyManager(QtIntPropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotPropertyChanged(QtProperty *, int))); - connect(manager, SIGNAL(rangeChanged(QtProperty *, int, int)), - this, SLOT(slotRangeChanged(QtProperty *, int, int))); - connect(manager, SIGNAL(singleStepChanged(QtProperty *, int)), - this, SLOT(slotSingleStepChanged(QtProperty *, int))); + connect(manager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotPropertyChanged(QtProperty*,int))); + connect(manager, SIGNAL(rangeChanged(QtProperty*,int,int)), + this, SLOT(slotRangeChanged(QtProperty*,int,int))); + connect(manager, SIGNAL(singleStepChanged(QtProperty*,int)), + this, SLOT(slotSingleStepChanged(QtProperty*,int))); } /*! @@ -425,8 +425,8 @@ QWidget *QtSliderFactory::createEditor(QtIntPropertyManager *manager, QtProperty editor->setValue(manager->value(property)); connect(editor, SIGNAL(valueChanged(int)), this, SLOT(slotSetValue(int))); - connect(editor, SIGNAL(destroyed(QObject *)), - this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(destroyed(QObject*)), + this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -437,12 +437,12 @@ QWidget *QtSliderFactory::createEditor(QtIntPropertyManager *manager, QtProperty */ void QtSliderFactory::disconnectPropertyManager(QtIntPropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotPropertyChanged(QtProperty *, int))); - disconnect(manager, SIGNAL(rangeChanged(QtProperty *, int, int)), - this, SLOT(slotRangeChanged(QtProperty *, int, int))); - disconnect(manager, SIGNAL(singleStepChanged(QtProperty *, int)), - this, SLOT(slotSingleStepChanged(QtProperty *, int))); + disconnect(manager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotPropertyChanged(QtProperty*,int))); + disconnect(manager, SIGNAL(rangeChanged(QtProperty*,int,int)), + this, SLOT(slotRangeChanged(QtProperty*,int,int))); + disconnect(manager, SIGNAL(singleStepChanged(QtProperty*,int)), + this, SLOT(slotSingleStepChanged(QtProperty*,int))); } // QtSliderFactory @@ -556,12 +556,12 @@ QtScrollBarFactory::~QtScrollBarFactory() */ void QtScrollBarFactory::connectPropertyManager(QtIntPropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotPropertyChanged(QtProperty *, int))); - connect(manager, SIGNAL(rangeChanged(QtProperty *, int, int)), - this, SLOT(slotRangeChanged(QtProperty *, int, int))); - connect(manager, SIGNAL(singleStepChanged(QtProperty *, int)), - this, SLOT(slotSingleStepChanged(QtProperty *, int))); + connect(manager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotPropertyChanged(QtProperty*,int))); + connect(manager, SIGNAL(rangeChanged(QtProperty*,int,int)), + this, SLOT(slotRangeChanged(QtProperty*,int,int))); + connect(manager, SIGNAL(singleStepChanged(QtProperty*,int)), + this, SLOT(slotSingleStepChanged(QtProperty*,int))); } /*! @@ -578,8 +578,8 @@ QWidget *QtScrollBarFactory::createEditor(QtIntPropertyManager *manager, QtPrope editor->setRange(manager->minimum(property), manager->maximum(property)); editor->setValue(manager->value(property)); connect(editor, SIGNAL(valueChanged(int)), this, SLOT(slotSetValue(int))); - connect(editor, SIGNAL(destroyed(QObject *)), - this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(destroyed(QObject*)), + this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -590,12 +590,12 @@ QWidget *QtScrollBarFactory::createEditor(QtIntPropertyManager *manager, QtPrope */ void QtScrollBarFactory::disconnectPropertyManager(QtIntPropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotPropertyChanged(QtProperty *, int))); - disconnect(manager, SIGNAL(rangeChanged(QtProperty *, int, int)), - this, SLOT(slotRangeChanged(QtProperty *, int, int))); - disconnect(manager, SIGNAL(singleStepChanged(QtProperty *, int)), - this, SLOT(slotSingleStepChanged(QtProperty *, int))); + disconnect(manager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotPropertyChanged(QtProperty*,int))); + disconnect(manager, SIGNAL(rangeChanged(QtProperty*,int,int)), + this, SLOT(slotRangeChanged(QtProperty*,int,int))); + disconnect(manager, SIGNAL(singleStepChanged(QtProperty*,int)), + this, SLOT(slotSingleStepChanged(QtProperty*,int))); } // QtCheckBoxFactory @@ -676,8 +676,8 @@ QtCheckBoxFactory::~QtCheckBoxFactory() */ void QtCheckBoxFactory::connectPropertyManager(QtBoolPropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty *, bool)), - this, SLOT(slotPropertyChanged(QtProperty *, bool))); + connect(manager, SIGNAL(valueChanged(QtProperty*,bool)), + this, SLOT(slotPropertyChanged(QtProperty*,bool))); } /*! @@ -692,8 +692,8 @@ QWidget *QtCheckBoxFactory::createEditor(QtBoolPropertyManager *manager, QtPrope editor->setChecked(manager->value(property)); connect(editor, SIGNAL(toggled(bool)), this, SLOT(slotSetValue(bool))); - connect(editor, SIGNAL(destroyed(QObject *)), - this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(destroyed(QObject*)), + this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -704,8 +704,8 @@ QWidget *QtCheckBoxFactory::createEditor(QtBoolPropertyManager *manager, QtPrope */ void QtCheckBoxFactory::disconnectPropertyManager(QtBoolPropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty *, bool)), - this, SLOT(slotPropertyChanged(QtProperty *, bool))); + disconnect(manager, SIGNAL(valueChanged(QtProperty*,bool)), + this, SLOT(slotPropertyChanged(QtProperty*,bool))); } // QtDoubleSpinBoxFactory @@ -849,14 +849,14 @@ QtDoubleSpinBoxFactory::~QtDoubleSpinBoxFactory() */ void QtDoubleSpinBoxFactory::connectPropertyManager(QtDoublePropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty *, double)), - this, SLOT(slotPropertyChanged(QtProperty *, double))); - connect(manager, SIGNAL(rangeChanged(QtProperty *, double, double)), - this, SLOT(slotRangeChanged(QtProperty *, double, double))); - connect(manager, SIGNAL(singleStepChanged(QtProperty *, double)), - this, SLOT(slotSingleStepChanged(QtProperty *, double))); - connect(manager, SIGNAL(decimalsChanged(QtProperty *, int)), - this, SLOT(slotDecimalsChanged(QtProperty *, int))); + connect(manager, SIGNAL(valueChanged(QtProperty*,double)), + this, SLOT(slotPropertyChanged(QtProperty*,double))); + connect(manager, SIGNAL(rangeChanged(QtProperty*,double,double)), + this, SLOT(slotRangeChanged(QtProperty*,double,double))); + connect(manager, SIGNAL(singleStepChanged(QtProperty*,double)), + this, SLOT(slotSingleStepChanged(QtProperty*,double))); + connect(manager, SIGNAL(decimalsChanged(QtProperty*,int)), + this, SLOT(slotDecimalsChanged(QtProperty*,int))); } /*! @@ -875,8 +875,8 @@ QWidget *QtDoubleSpinBoxFactory::createEditor(QtDoublePropertyManager *manager, editor->setKeyboardTracking(false); connect(editor, SIGNAL(valueChanged(double)), this, SLOT(slotSetValue(double))); - connect(editor, SIGNAL(destroyed(QObject *)), - this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(destroyed(QObject*)), + this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -887,14 +887,14 @@ QWidget *QtDoubleSpinBoxFactory::createEditor(QtDoublePropertyManager *manager, */ void QtDoubleSpinBoxFactory::disconnectPropertyManager(QtDoublePropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty *, double)), - this, SLOT(slotPropertyChanged(QtProperty *, double))); - disconnect(manager, SIGNAL(rangeChanged(QtProperty *, double, double)), - this, SLOT(slotRangeChanged(QtProperty *, double, double))); - disconnect(manager, SIGNAL(singleStepChanged(QtProperty *, double)), - this, SLOT(slotSingleStepChanged(QtProperty *, double))); - disconnect(manager, SIGNAL(decimalsChanged(QtProperty *, int)), - this, SLOT(slotDecimalsChanged(QtProperty *, int))); + disconnect(manager, SIGNAL(valueChanged(QtProperty*,double)), + this, SLOT(slotPropertyChanged(QtProperty*,double))); + disconnect(manager, SIGNAL(rangeChanged(QtProperty*,double,double)), + this, SLOT(slotRangeChanged(QtProperty*,double,double))); + disconnect(manager, SIGNAL(singleStepChanged(QtProperty*,double)), + this, SLOT(slotSingleStepChanged(QtProperty*,double))); + disconnect(manager, SIGNAL(decimalsChanged(QtProperty*,int)), + this, SLOT(slotDecimalsChanged(QtProperty*,int))); } // QtLineEditFactory @@ -1002,10 +1002,10 @@ QtLineEditFactory::~QtLineEditFactory() */ void QtLineEditFactory::connectPropertyManager(QtStringPropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty *, const QString &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QString &))); - connect(manager, SIGNAL(regExpChanged(QtProperty *, const QRegExp &)), - this, SLOT(slotRegExpChanged(QtProperty *, const QRegExp &))); + connect(manager, SIGNAL(valueChanged(QtProperty*,QString)), + this, SLOT(slotPropertyChanged(QtProperty*,QString))); + connect(manager, SIGNAL(regExpChanged(QtProperty*,QRegExp)), + this, SLOT(slotRegExpChanged(QtProperty*,QRegExp))); } /*! @@ -1025,10 +1025,10 @@ QWidget *QtLineEditFactory::createEditor(QtStringPropertyManager *manager, } editor->setText(manager->value(property)); - connect(editor, SIGNAL(textEdited(const QString &)), - this, SLOT(slotSetValue(const QString &))); - connect(editor, SIGNAL(destroyed(QObject *)), - this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(textEdited(QString)), + this, SLOT(slotSetValue(QString))); + connect(editor, SIGNAL(destroyed(QObject*)), + this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -1039,10 +1039,10 @@ QWidget *QtLineEditFactory::createEditor(QtStringPropertyManager *manager, */ void QtLineEditFactory::disconnectPropertyManager(QtStringPropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QString &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QString &))); - disconnect(manager, SIGNAL(regExpChanged(QtProperty *, const QRegExp &)), - this, SLOT(slotRegExpChanged(QtProperty *, const QRegExp &))); + disconnect(manager, SIGNAL(valueChanged(QtProperty*,QString)), + this, SLOT(slotPropertyChanged(QtProperty*,QString))); + disconnect(manager, SIGNAL(regExpChanged(QtProperty*,QRegExp)), + this, SLOT(slotRegExpChanged(QtProperty*,QRegExp))); } // QtDateEditFactory @@ -1143,10 +1143,10 @@ QtDateEditFactory::~QtDateEditFactory() */ void QtDateEditFactory::connectPropertyManager(QtDatePropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty *, const QDate &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QDate &))); - connect(manager, SIGNAL(rangeChanged(QtProperty *, const QDate &, const QDate &)), - this, SLOT(slotRangeChanged(QtProperty *, const QDate &, const QDate &))); + connect(manager, SIGNAL(valueChanged(QtProperty*,QDate)), + this, SLOT(slotPropertyChanged(QtProperty*,QDate))); + connect(manager, SIGNAL(rangeChanged(QtProperty*,QDate,QDate)), + this, SLOT(slotRangeChanged(QtProperty*,QDate,QDate))); } /*! @@ -1162,10 +1162,10 @@ QWidget *QtDateEditFactory::createEditor(QtDatePropertyManager *manager, QtPrope editor->setDateRange(manager->minimum(property), manager->maximum(property)); editor->setDate(manager->value(property)); - connect(editor, SIGNAL(dateChanged(const QDate &)), - this, SLOT(slotSetValue(const QDate &))); - connect(editor, SIGNAL(destroyed(QObject *)), - this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(dateChanged(QDate)), + this, SLOT(slotSetValue(QDate))); + connect(editor, SIGNAL(destroyed(QObject*)), + this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -1176,10 +1176,10 @@ QWidget *QtDateEditFactory::createEditor(QtDatePropertyManager *manager, QtPrope */ void QtDateEditFactory::disconnectPropertyManager(QtDatePropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QDate &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QDate &))); - disconnect(manager, SIGNAL(rangeChanged(QtProperty *, const QDate &, const QDate &)), - this, SLOT(slotRangeChanged(QtProperty *, const QDate &, const QDate &))); + disconnect(manager, SIGNAL(valueChanged(QtProperty*,QDate)), + this, SLOT(slotPropertyChanged(QtProperty*,QDate))); + disconnect(manager, SIGNAL(rangeChanged(QtProperty*,QDate,QDate)), + this, SLOT(slotRangeChanged(QtProperty*,QDate,QDate))); } // QtTimeEditFactory @@ -1259,8 +1259,8 @@ QtTimeEditFactory::~QtTimeEditFactory() */ void QtTimeEditFactory::connectPropertyManager(QtTimePropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty *, const QTime &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QTime &))); + connect(manager, SIGNAL(valueChanged(QtProperty*,QTime)), + this, SLOT(slotPropertyChanged(QtProperty*,QTime))); } /*! @@ -1274,10 +1274,10 @@ QWidget *QtTimeEditFactory::createEditor(QtTimePropertyManager *manager, QtPrope QTimeEdit *editor = d_ptr->createEditor(property, parent); editor->setTime(manager->value(property)); - connect(editor, SIGNAL(timeChanged(const QTime &)), - this, SLOT(slotSetValue(const QTime &))); - connect(editor, SIGNAL(destroyed(QObject *)), - this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(timeChanged(QTime)), + this, SLOT(slotSetValue(QTime))); + connect(editor, SIGNAL(destroyed(QObject*)), + this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -1288,8 +1288,8 @@ QWidget *QtTimeEditFactory::createEditor(QtTimePropertyManager *manager, QtPrope */ void QtTimeEditFactory::disconnectPropertyManager(QtTimePropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QTime &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QTime &))); + disconnect(manager, SIGNAL(valueChanged(QtProperty*,QTime)), + this, SLOT(slotPropertyChanged(QtProperty*,QTime))); } // QtDateTimeEditFactory @@ -1372,8 +1372,8 @@ QtDateTimeEditFactory::~QtDateTimeEditFactory() */ void QtDateTimeEditFactory::connectPropertyManager(QtDateTimePropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty *, const QDateTime &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QDateTime &))); + connect(manager, SIGNAL(valueChanged(QtProperty*,QDateTime)), + this, SLOT(slotPropertyChanged(QtProperty*,QDateTime))); } /*! @@ -1387,10 +1387,10 @@ QWidget *QtDateTimeEditFactory::createEditor(QtDateTimePropertyManager *manager, QDateTimeEdit *editor = d_ptr->createEditor(property, parent); editor->setDateTime(manager->value(property)); - connect(editor, SIGNAL(dateTimeChanged(const QDateTime &)), - this, SLOT(slotSetValue(const QDateTime &))); - connect(editor, SIGNAL(destroyed(QObject *)), - this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(dateTimeChanged(QDateTime)), + this, SLOT(slotSetValue(QDateTime))); + connect(editor, SIGNAL(destroyed(QObject*)), + this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -1401,8 +1401,8 @@ QWidget *QtDateTimeEditFactory::createEditor(QtDateTimePropertyManager *manager, */ void QtDateTimeEditFactory::disconnectPropertyManager(QtDateTimePropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QDateTime &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QDateTime &))); + disconnect(manager, SIGNAL(valueChanged(QtProperty*,QDateTime)), + this, SLOT(slotPropertyChanged(QtProperty*,QDateTime))); } // QtKeySequenceEditorFactory @@ -1484,8 +1484,8 @@ QtKeySequenceEditorFactory::~QtKeySequenceEditorFactory() */ void QtKeySequenceEditorFactory::connectPropertyManager(QtKeySequencePropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty *, const QKeySequence &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QKeySequence &))); + connect(manager, SIGNAL(valueChanged(QtProperty*,QKeySequence)), + this, SLOT(slotPropertyChanged(QtProperty*,QKeySequence))); } /*! @@ -1499,10 +1499,10 @@ QWidget *QtKeySequenceEditorFactory::createEditor(QtKeySequencePropertyManager * QtKeySequenceEdit *editor = d_ptr->createEditor(property, parent); editor->setKeySequence(manager->value(property)); - connect(editor, SIGNAL(keySequenceChanged(const QKeySequence &)), - this, SLOT(slotSetValue(const QKeySequence &))); - connect(editor, SIGNAL(destroyed(QObject *)), - this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(keySequenceChanged(QKeySequence)), + this, SLOT(slotSetValue(QKeySequence))); + connect(editor, SIGNAL(destroyed(QObject*)), + this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -1513,8 +1513,8 @@ QWidget *QtKeySequenceEditorFactory::createEditor(QtKeySequencePropertyManager * */ void QtKeySequenceEditorFactory::disconnectPropertyManager(QtKeySequencePropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QKeySequence &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QKeySequence &))); + disconnect(manager, SIGNAL(valueChanged(QtProperty*,QKeySequence)), + this, SLOT(slotPropertyChanged(QtProperty*,QKeySequence))); } // QtCharEdit @@ -1766,8 +1766,8 @@ QtCharEditorFactory::~QtCharEditorFactory() */ void QtCharEditorFactory::connectPropertyManager(QtCharPropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty *, const QChar &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QChar &))); + connect(manager, SIGNAL(valueChanged(QtProperty*,QChar)), + this, SLOT(slotPropertyChanged(QtProperty*,QChar))); } /*! @@ -1781,10 +1781,10 @@ QWidget *QtCharEditorFactory::createEditor(QtCharPropertyManager *manager, QtCharEdit *editor = d_ptr->createEditor(property, parent); editor->setValue(manager->value(property)); - connect(editor, SIGNAL(valueChanged(const QChar &)), - this, SLOT(slotSetValue(const QChar &))); - connect(editor, SIGNAL(destroyed(QObject *)), - this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(valueChanged(QChar)), + this, SLOT(slotSetValue(QChar))); + connect(editor, SIGNAL(destroyed(QObject*)), + this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -1795,8 +1795,8 @@ QWidget *QtCharEditorFactory::createEditor(QtCharPropertyManager *manager, */ void QtCharEditorFactory::disconnectPropertyManager(QtCharPropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QChar &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QChar &))); + disconnect(manager, SIGNAL(valueChanged(QtProperty*,QChar)), + this, SLOT(slotPropertyChanged(QtProperty*,QChar))); } // QtEnumEditorFactory @@ -1928,10 +1928,10 @@ QtEnumEditorFactory::~QtEnumEditorFactory() */ void QtEnumEditorFactory::connectPropertyManager(QtEnumPropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotPropertyChanged(QtProperty *, int))); - connect(manager, SIGNAL(enumNamesChanged(QtProperty *, const QStringList &)), - this, SLOT(slotEnumNamesChanged(QtProperty *, const QStringList &))); + connect(manager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotPropertyChanged(QtProperty*,int))); + connect(manager, SIGNAL(enumNamesChanged(QtProperty*,QStringList)), + this, SLOT(slotEnumNamesChanged(QtProperty*,QStringList))); } /*! @@ -1954,8 +1954,8 @@ QWidget *QtEnumEditorFactory::createEditor(QtEnumPropertyManager *manager, QtPro editor->setCurrentIndex(manager->value(property)); connect(editor, SIGNAL(currentIndexChanged(int)), this, SLOT(slotSetValue(int))); - connect(editor, SIGNAL(destroyed(QObject *)), - this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(destroyed(QObject*)), + this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -1966,10 +1966,10 @@ QWidget *QtEnumEditorFactory::createEditor(QtEnumPropertyManager *manager, QtPro */ void QtEnumEditorFactory::disconnectPropertyManager(QtEnumPropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotPropertyChanged(QtProperty *, int))); - disconnect(manager, SIGNAL(enumNamesChanged(QtProperty *, const QStringList &)), - this, SLOT(slotEnumNamesChanged(QtProperty *, const QStringList &))); + disconnect(manager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotPropertyChanged(QtProperty*,int))); + disconnect(manager, SIGNAL(enumNamesChanged(QtProperty*,QStringList)), + this, SLOT(slotEnumNamesChanged(QtProperty*,QStringList))); } // QtCursorEditorFactory @@ -2076,8 +2076,8 @@ QtCursorEditorFactory::QtCursorEditorFactory(QObject *parent) d_ptr->m_enumEditorFactory = new QtEnumEditorFactory(this); d_ptr->m_enumPropertyManager = new QtEnumPropertyManager(this); - connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotEnumChanged(QtProperty *, int))); + connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotEnumChanged(QtProperty*,int))); d_ptr->m_enumEditorFactory->addPropertyManager(d_ptr->m_enumPropertyManager); } @@ -2095,8 +2095,8 @@ QtCursorEditorFactory::~QtCursorEditorFactory() */ void QtCursorEditorFactory::connectPropertyManager(QtCursorPropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty *, const QCursor &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QCursor &))); + connect(manager, SIGNAL(valueChanged(QtProperty*,QCursor)), + this, SLOT(slotPropertyChanged(QtProperty*,QCursor))); } /*! @@ -2124,8 +2124,8 @@ QWidget *QtCursorEditorFactory::createEditor(QtCursorPropertyManager *manager, Q QWidget *editor = af->createEditor(enumProp, parent); d_ptr->m_enumToEditors[enumProp].append(editor); d_ptr->m_editorToEnum[editor] = enumProp; - connect(editor, SIGNAL(destroyed(QObject *)), - this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(destroyed(QObject*)), + this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -2136,8 +2136,8 @@ QWidget *QtCursorEditorFactory::createEditor(QtCursorPropertyManager *manager, Q */ void QtCursorEditorFactory::disconnectPropertyManager(QtCursorPropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QCursor &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QCursor &))); + disconnect(manager, SIGNAL(valueChanged(QtProperty*,QCursor)), + this, SLOT(slotPropertyChanged(QtProperty*,QCursor))); } // QtColorEditWidget @@ -2324,7 +2324,7 @@ QWidget *QtColorEditorFactory::createEditor(QtColorPropertyManager *manager, QtColorEditWidget *editor = d_ptr->createEditor(property, parent); editor->setValue(manager->value(property)); connect(editor, SIGNAL(valueChanged(QColor)), this, SLOT(slotSetValue(QColor))); - connect(editor, SIGNAL(destroyed(QObject *)), this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(destroyed(QObject*)), this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -2537,7 +2537,7 @@ QWidget *QtFontEditorFactory::createEditor(QtFontPropertyManager *manager, QtFontEditWidget *editor = d_ptr->createEditor(property, parent); editor->setValue(manager->value(property)); connect(editor, SIGNAL(valueChanged(QFont)), this, SLOT(slotSetValue(QFont))); - connect(editor, SIGNAL(destroyed(QObject *)), this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(destroyed(QObject*)), this, SLOT(slotEditorDestroyed(QObject*))); return editor; } diff --git a/tools/shared/qtpropertybrowser/qtpropertybrowser.cpp b/tools/shared/qtpropertybrowser/qtpropertybrowser.cpp index c7fcdf04f3..4f2ed5697c 100644 --- a/tools/shared/qtpropertybrowser/qtpropertybrowser.cpp +++ b/tools/shared/qtpropertybrowser/qtpropertybrowser.cpp @@ -1243,11 +1243,11 @@ void QtAbstractPropertyBrowserPrivate::insertSubTree(QtProperty *property, QtProperty *, QtProperty *))); q_ptr->connect(manager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), - q_ptr, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); - q_ptr->connect(manager, SIGNAL(propertyDestroyed(QtProperty *)), - q_ptr, SLOT(slotPropertyDestroyed(QtProperty *))); - q_ptr->connect(manager, SIGNAL(propertyChanged(QtProperty *)), - q_ptr, SLOT(slotPropertyDataChanged(QtProperty *))); + q_ptr, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); + q_ptr->connect(manager, SIGNAL(propertyDestroyed(QtProperty*)), + q_ptr, SLOT(slotPropertyDestroyed(QtProperty*))); + q_ptr->connect(manager, SIGNAL(propertyChanged(QtProperty*)), + q_ptr, SLOT(slotPropertyDataChanged(QtProperty*))); } m_managerToProperties[manager].append(property); m_propertyToParents[property].append(parentProperty); @@ -1283,11 +1283,11 @@ void QtAbstractPropertyBrowserPrivate::removeSubTree(QtProperty *property, QtProperty *, QtProperty *))); q_ptr->disconnect(manager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), - q_ptr, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); - q_ptr->disconnect(manager, SIGNAL(propertyDestroyed(QtProperty *)), - q_ptr, SLOT(slotPropertyDestroyed(QtProperty *))); - q_ptr->disconnect(manager, SIGNAL(propertyChanged(QtProperty *)), - q_ptr, SLOT(slotPropertyDataChanged(QtProperty *))); + q_ptr, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); + q_ptr->disconnect(manager, SIGNAL(propertyDestroyed(QtProperty*)), + q_ptr, SLOT(slotPropertyDestroyed(QtProperty*))); + q_ptr->disconnect(manager, SIGNAL(propertyChanged(QtProperty*)), + q_ptr, SLOT(slotPropertyDataChanged(QtProperty*))); m_managerToProperties.remove(manager); } diff --git a/tools/shared/qtpropertybrowser/qtpropertymanager.cpp b/tools/shared/qtpropertybrowser/qtpropertymanager.cpp index 7f04c03412..a26dcdaff4 100644 --- a/tools/shared/qtpropertybrowser/qtpropertymanager.cpp +++ b/tools/shared/qtpropertybrowser/qtpropertymanager.cpp @@ -2334,11 +2334,11 @@ QtLocalePropertyManager::QtLocalePropertyManager(QObject *parent) d_ptr->q_ptr = this; d_ptr->m_enumPropertyManager = new QtEnumPropertyManager(this); - connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotEnumChanged(QtProperty *, int))); + connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotEnumChanged(QtProperty*,int))); - connect(d_ptr->m_enumPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), - this, SLOT(slotPropertyDestroyed(QtProperty *))); + connect(d_ptr->m_enumPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), + this, SLOT(slotPropertyDestroyed(QtProperty*))); } /*! @@ -2571,10 +2571,10 @@ QtPointPropertyManager::QtPointPropertyManager(QObject *parent) d_ptr->q_ptr = this; d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); - connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotIntChanged(QtProperty *, int))); - connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), - this, SLOT(slotPropertyDestroyed(QtProperty *))); + connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotIntChanged(QtProperty*,int))); + connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), + this, SLOT(slotPropertyDestroyed(QtProperty*))); } /*! @@ -2801,10 +2801,10 @@ QtPointFPropertyManager::QtPointFPropertyManager(QObject *parent) d_ptr->q_ptr = this; d_ptr->m_doublePropertyManager = new QtDoublePropertyManager(this); - connect(d_ptr->m_doublePropertyManager, SIGNAL(valueChanged(QtProperty *, double)), - this, SLOT(slotDoubleChanged(QtProperty *, double))); - connect(d_ptr->m_doublePropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), - this, SLOT(slotPropertyDestroyed(QtProperty *))); + connect(d_ptr->m_doublePropertyManager, SIGNAL(valueChanged(QtProperty*,double)), + this, SLOT(slotDoubleChanged(QtProperty*,double))); + connect(d_ptr->m_doublePropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), + this, SLOT(slotPropertyDestroyed(QtProperty*))); } /*! @@ -3112,10 +3112,10 @@ QtSizePropertyManager::QtSizePropertyManager(QObject *parent) d_ptr->q_ptr = this; d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); - connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotIntChanged(QtProperty *, int))); - connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), - this, SLOT(slotPropertyDestroyed(QtProperty *))); + connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotIntChanged(QtProperty*,int))); + connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), + this, SLOT(slotPropertyDestroyed(QtProperty*))); } /*! @@ -3466,10 +3466,10 @@ QtSizeFPropertyManager::QtSizeFPropertyManager(QObject *parent) d_ptr->q_ptr = this; d_ptr->m_doublePropertyManager = new QtDoublePropertyManager(this); - connect(d_ptr->m_doublePropertyManager, SIGNAL(valueChanged(QtProperty *, double)), - this, SLOT(slotDoubleChanged(QtProperty *, double))); - connect(d_ptr->m_doublePropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), - this, SLOT(slotPropertyDestroyed(QtProperty *))); + connect(d_ptr->m_doublePropertyManager, SIGNAL(valueChanged(QtProperty*,double)), + this, SLOT(slotDoubleChanged(QtProperty*,double))); + connect(d_ptr->m_doublePropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), + this, SLOT(slotPropertyDestroyed(QtProperty*))); } /*! @@ -3880,10 +3880,10 @@ QtRectPropertyManager::QtRectPropertyManager(QObject *parent) d_ptr->q_ptr = this; d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); - connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotIntChanged(QtProperty *, int))); - connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), - this, SLOT(slotPropertyDestroyed(QtProperty *))); + connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotIntChanged(QtProperty*,int))); + connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), + this, SLOT(slotPropertyDestroyed(QtProperty*))); } /*! @@ -4300,10 +4300,10 @@ QtRectFPropertyManager::QtRectFPropertyManager(QObject *parent) d_ptr->q_ptr = this; d_ptr->m_doublePropertyManager = new QtDoublePropertyManager(this); - connect(d_ptr->m_doublePropertyManager, SIGNAL(valueChanged(QtProperty *, double)), - this, SLOT(slotDoubleChanged(QtProperty *, double))); - connect(d_ptr->m_doublePropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), - this, SLOT(slotPropertyDestroyed(QtProperty *))); + connect(d_ptr->m_doublePropertyManager, SIGNAL(valueChanged(QtProperty*,double)), + this, SLOT(slotDoubleChanged(QtProperty*,double))); + connect(d_ptr->m_doublePropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), + this, SLOT(slotPropertyDestroyed(QtProperty*))); } /*! @@ -4993,10 +4993,10 @@ QtFlagPropertyManager::QtFlagPropertyManager(QObject *parent) d_ptr->q_ptr = this; d_ptr->m_boolPropertyManager = new QtBoolPropertyManager(this); - connect(d_ptr->m_boolPropertyManager, SIGNAL(valueChanged(QtProperty *, bool)), - this, SLOT(slotBoolChanged(QtProperty *, bool))); - connect(d_ptr->m_boolPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), - this, SLOT(slotPropertyDestroyed(QtProperty *))); + connect(d_ptr->m_boolPropertyManager, SIGNAL(valueChanged(QtProperty*,bool)), + this, SLOT(slotBoolChanged(QtProperty*,bool))); + connect(d_ptr->m_boolPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), + this, SLOT(slotPropertyDestroyed(QtProperty*))); } /*! @@ -5319,16 +5319,16 @@ QtSizePolicyPropertyManager::QtSizePolicyPropertyManager(QObject *parent) d_ptr->q_ptr = this; d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); - connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotIntChanged(QtProperty *, int))); + connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotIntChanged(QtProperty*,int))); d_ptr->m_enumPropertyManager = new QtEnumPropertyManager(this); - connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotEnumChanged(QtProperty *, int))); + connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotEnumChanged(QtProperty*,int))); - connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), - this, SLOT(slotPropertyDestroyed(QtProperty *))); - connect(d_ptr->m_enumPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), - this, SLOT(slotPropertyDestroyed(QtProperty *))); + connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), + this, SLOT(slotPropertyDestroyed(QtProperty*))); + connect(d_ptr->m_enumPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), + this, SLOT(slotPropertyDestroyed(QtProperty*))); } /*! @@ -5730,21 +5730,21 @@ QtFontPropertyManager::QtFontPropertyManager(QObject *parent) QObject::connect(qApp, SIGNAL(fontDatabaseChanged()), this, SLOT(slotFontDatabaseChanged())); d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); - connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotIntChanged(QtProperty *, int))); + connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotIntChanged(QtProperty*,int))); d_ptr->m_enumPropertyManager = new QtEnumPropertyManager(this); - connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotEnumChanged(QtProperty *, int))); + connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotEnumChanged(QtProperty*,int))); d_ptr->m_boolPropertyManager = new QtBoolPropertyManager(this); - connect(d_ptr->m_boolPropertyManager, SIGNAL(valueChanged(QtProperty *, bool)), - this, SLOT(slotBoolChanged(QtProperty *, bool))); + connect(d_ptr->m_boolPropertyManager, SIGNAL(valueChanged(QtProperty*,bool)), + this, SLOT(slotBoolChanged(QtProperty*,bool))); - connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), - this, SLOT(slotPropertyDestroyed(QtProperty *))); - connect(d_ptr->m_enumPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), - this, SLOT(slotPropertyDestroyed(QtProperty *))); - connect(d_ptr->m_boolPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), - this, SLOT(slotPropertyDestroyed(QtProperty *))); + connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), + this, SLOT(slotPropertyDestroyed(QtProperty*))); + connect(d_ptr->m_enumPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), + this, SLOT(slotPropertyDestroyed(QtProperty*))); + connect(d_ptr->m_boolPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), + this, SLOT(slotPropertyDestroyed(QtProperty*))); } /*! @@ -6105,11 +6105,11 @@ QtColorPropertyManager::QtColorPropertyManager(QObject *parent) d_ptr->q_ptr = this; d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); - connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotIntChanged(QtProperty *, int))); + connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotIntChanged(QtProperty*,int))); - connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), - this, SLOT(slotPropertyDestroyed(QtProperty *))); + connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), + this, SLOT(slotPropertyDestroyed(QtProperty*))); } /*! diff --git a/tools/shared/qtpropertybrowser/qttreepropertybrowser.cpp b/tools/shared/qtpropertybrowser/qttreepropertybrowser.cpp index 0b3fd77640..7fa044925c 100644 --- a/tools/shared/qtpropertybrowser/qttreepropertybrowser.cpp +++ b/tools/shared/qtpropertybrowser/qttreepropertybrowser.cpp @@ -310,7 +310,7 @@ QWidget *QtPropertyEditorDelegate::createEditor(QWidget *parent, if (editor) { editor->setAutoFillBackground(true); editor->installEventFilter(const_cast<QtPropertyEditorDelegate *>(this)); - connect(editor, SIGNAL(destroyed(QObject *)), this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(destroyed(QObject*)), this, SLOT(slotEditorDestroyed(QObject*))); m_propertyToEditor[property] = editor; m_editorToProperty[editor] = property; m_editedItem = item; @@ -452,8 +452,8 @@ void QtTreePropertyBrowserPrivate::init(QWidget *parent) m_expandIcon = drawIndicatorIcon(q_ptr->palette(), q_ptr->style()); - QObject::connect(m_treeWidget, SIGNAL(collapsed(const QModelIndex &)), q_ptr, SLOT(slotCollapsed(const QModelIndex &))); - QObject::connect(m_treeWidget, SIGNAL(expanded(const QModelIndex &)), q_ptr, SLOT(slotExpanded(const QModelIndex &))); + QObject::connect(m_treeWidget, SIGNAL(collapsed(QModelIndex)), q_ptr, SLOT(slotCollapsed(QModelIndex))); + QObject::connect(m_treeWidget, SIGNAL(expanded(QModelIndex)), q_ptr, SLOT(slotExpanded(QModelIndex))); QObject::connect(m_treeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), q_ptr, SLOT(slotCurrentTreeItemChanged(QTreeWidgetItem*,QTreeWidgetItem*))); } diff --git a/tools/shared/qtpropertybrowser/qtvariantproperty.cpp b/tools/shared/qtpropertybrowser/qtvariantproperty.cpp index 9b4b8a448e..3488fb1d62 100644 --- a/tools/shared/qtpropertybrowser/qtvariantproperty.cpp +++ b/tools/shared/qtpropertybrowser/qtvariantproperty.cpp @@ -926,12 +926,12 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) d_ptr->m_typeToAttributeToAttributeType[QVariant::Int][d_ptr->m_maximumAttribute] = QVariant::Int; d_ptr->m_typeToAttributeToAttributeType[QVariant::Int][d_ptr->m_singleStepAttribute] = QVariant::Int; d_ptr->m_typeToValueType[QVariant::Int] = QVariant::Int; - connect(intPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotValueChanged(QtProperty *, int))); - connect(intPropertyManager, SIGNAL(rangeChanged(QtProperty *, int, int)), - this, SLOT(slotRangeChanged(QtProperty *, int, int))); - connect(intPropertyManager, SIGNAL(singleStepChanged(QtProperty *, int)), - this, SLOT(slotSingleStepChanged(QtProperty *, int))); + connect(intPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotValueChanged(QtProperty*,int))); + connect(intPropertyManager, SIGNAL(rangeChanged(QtProperty*,int,int)), + this, SLOT(slotRangeChanged(QtProperty*,int,int))); + connect(intPropertyManager, SIGNAL(singleStepChanged(QtProperty*,int)), + this, SLOT(slotSingleStepChanged(QtProperty*,int))); // DoublePropertyManager QtDoublePropertyManager *doublePropertyManager = new QtDoublePropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Double] = doublePropertyManager; @@ -944,30 +944,30 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) d_ptr->m_typeToAttributeToAttributeType[QVariant::Double][d_ptr->m_decimalsAttribute] = QVariant::Int; d_ptr->m_typeToValueType[QVariant::Double] = QVariant::Double; - connect(doublePropertyManager, SIGNAL(valueChanged(QtProperty *, double)), - this, SLOT(slotValueChanged(QtProperty *, double))); - connect(doublePropertyManager, SIGNAL(rangeChanged(QtProperty *, double, double)), - this, SLOT(slotRangeChanged(QtProperty *, double, double))); - connect(doublePropertyManager, SIGNAL(singleStepChanged(QtProperty *, double)), - this, SLOT(slotSingleStepChanged(QtProperty *, double))); - connect(doublePropertyManager, SIGNAL(decimalsChanged(QtProperty *, int)), - this, SLOT(slotDecimalsChanged(QtProperty *, int))); + connect(doublePropertyManager, SIGNAL(valueChanged(QtProperty*,double)), + this, SLOT(slotValueChanged(QtProperty*,double))); + connect(doublePropertyManager, SIGNAL(rangeChanged(QtProperty*,double,double)), + this, SLOT(slotRangeChanged(QtProperty*,double,double))); + connect(doublePropertyManager, SIGNAL(singleStepChanged(QtProperty*,double)), + this, SLOT(slotSingleStepChanged(QtProperty*,double))); + connect(doublePropertyManager, SIGNAL(decimalsChanged(QtProperty*,int)), + this, SLOT(slotDecimalsChanged(QtProperty*,int))); // BoolPropertyManager QtBoolPropertyManager *boolPropertyManager = new QtBoolPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Bool] = boolPropertyManager; d_ptr->m_typeToValueType[QVariant::Bool] = QVariant::Bool; - connect(boolPropertyManager, SIGNAL(valueChanged(QtProperty *, bool)), - this, SLOT(slotValueChanged(QtProperty *, bool))); + connect(boolPropertyManager, SIGNAL(valueChanged(QtProperty*,bool)), + this, SLOT(slotValueChanged(QtProperty*,bool))); // StringPropertyManager QtStringPropertyManager *stringPropertyManager = new QtStringPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::String] = stringPropertyManager; d_ptr->m_typeToValueType[QVariant::String] = QVariant::String; d_ptr->m_typeToAttributeToAttributeType[QVariant::String][d_ptr->m_regExpAttribute] = QVariant::RegExp; - connect(stringPropertyManager, SIGNAL(valueChanged(QtProperty *, const QString &)), - this, SLOT(slotValueChanged(QtProperty *, const QString &))); - connect(stringPropertyManager, SIGNAL(regExpChanged(QtProperty *, const QRegExp &)), - this, SLOT(slotRegExpChanged(QtProperty *, const QRegExp &))); + connect(stringPropertyManager, SIGNAL(valueChanged(QtProperty*,QString)), + this, SLOT(slotValueChanged(QtProperty*,QString))); + connect(stringPropertyManager, SIGNAL(regExpChanged(QtProperty*,QRegExp)), + this, SLOT(slotRegExpChanged(QtProperty*,QRegExp))); // DatePropertyManager QtDatePropertyManager *datePropertyManager = new QtDatePropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Date] = datePropertyManager; @@ -976,74 +976,74 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) QVariant::Date; d_ptr->m_typeToAttributeToAttributeType[QVariant::Date][d_ptr->m_maximumAttribute] = QVariant::Date; - connect(datePropertyManager, SIGNAL(valueChanged(QtProperty *, const QDate &)), - this, SLOT(slotValueChanged(QtProperty *, const QDate &))); - connect(datePropertyManager, SIGNAL(rangeChanged(QtProperty *, const QDate &, const QDate &)), - this, SLOT(slotRangeChanged(QtProperty *, const QDate &, const QDate &))); + connect(datePropertyManager, SIGNAL(valueChanged(QtProperty*,QDate)), + this, SLOT(slotValueChanged(QtProperty*,QDate))); + connect(datePropertyManager, SIGNAL(rangeChanged(QtProperty*,QDate,QDate)), + this, SLOT(slotRangeChanged(QtProperty*,QDate,QDate))); // TimePropertyManager QtTimePropertyManager *timePropertyManager = new QtTimePropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Time] = timePropertyManager; d_ptr->m_typeToValueType[QVariant::Time] = QVariant::Time; - connect(timePropertyManager, SIGNAL(valueChanged(QtProperty *, const QTime &)), - this, SLOT(slotValueChanged(QtProperty *, const QTime &))); + connect(timePropertyManager, SIGNAL(valueChanged(QtProperty*,QTime)), + this, SLOT(slotValueChanged(QtProperty*,QTime))); // DateTimePropertyManager QtDateTimePropertyManager *dateTimePropertyManager = new QtDateTimePropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::DateTime] = dateTimePropertyManager; d_ptr->m_typeToValueType[QVariant::DateTime] = QVariant::DateTime; - connect(dateTimePropertyManager, SIGNAL(valueChanged(QtProperty *, const QDateTime &)), - this, SLOT(slotValueChanged(QtProperty *, const QDateTime &))); + connect(dateTimePropertyManager, SIGNAL(valueChanged(QtProperty*,QDateTime)), + this, SLOT(slotValueChanged(QtProperty*,QDateTime))); // KeySequencePropertyManager QtKeySequencePropertyManager *keySequencePropertyManager = new QtKeySequencePropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::KeySequence] = keySequencePropertyManager; d_ptr->m_typeToValueType[QVariant::KeySequence] = QVariant::KeySequence; - connect(keySequencePropertyManager, SIGNAL(valueChanged(QtProperty *, const QKeySequence &)), - this, SLOT(slotValueChanged(QtProperty *, const QKeySequence &))); + connect(keySequencePropertyManager, SIGNAL(valueChanged(QtProperty*,QKeySequence)), + this, SLOT(slotValueChanged(QtProperty*,QKeySequence))); // CharPropertyManager QtCharPropertyManager *charPropertyManager = new QtCharPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Char] = charPropertyManager; d_ptr->m_typeToValueType[QVariant::Char] = QVariant::Char; - connect(charPropertyManager, SIGNAL(valueChanged(QtProperty *, const QChar &)), - this, SLOT(slotValueChanged(QtProperty *, const QChar &))); + connect(charPropertyManager, SIGNAL(valueChanged(QtProperty*,QChar)), + this, SLOT(slotValueChanged(QtProperty*,QChar))); // LocalePropertyManager QtLocalePropertyManager *localePropertyManager = new QtLocalePropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Locale] = localePropertyManager; d_ptr->m_typeToValueType[QVariant::Locale] = QVariant::Locale; - connect(localePropertyManager, SIGNAL(valueChanged(QtProperty *, const QLocale &)), - this, SLOT(slotValueChanged(QtProperty *, const QLocale &))); - connect(localePropertyManager->subEnumPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotValueChanged(QtProperty *, int))); - connect(localePropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), - this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); - connect(localePropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), - this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); + connect(localePropertyManager, SIGNAL(valueChanged(QtProperty*,QLocale)), + this, SLOT(slotValueChanged(QtProperty*,QLocale))); + connect(localePropertyManager->subEnumPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotValueChanged(QtProperty*,int))); + connect(localePropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), + this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); + connect(localePropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), + this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); // PointPropertyManager QtPointPropertyManager *pointPropertyManager = new QtPointPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Point] = pointPropertyManager; d_ptr->m_typeToValueType[QVariant::Point] = QVariant::Point; - connect(pointPropertyManager, SIGNAL(valueChanged(QtProperty *, const QPoint &)), - this, SLOT(slotValueChanged(QtProperty *, const QPoint &))); - connect(pointPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotValueChanged(QtProperty *, int))); - connect(pointPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), - this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); - connect(pointPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), - this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); + connect(pointPropertyManager, SIGNAL(valueChanged(QtProperty*,QPoint)), + this, SLOT(slotValueChanged(QtProperty*,QPoint))); + connect(pointPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotValueChanged(QtProperty*,int))); + connect(pointPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), + this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); + connect(pointPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), + this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); // PointFPropertyManager QtPointFPropertyManager *pointFPropertyManager = new QtPointFPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::PointF] = pointFPropertyManager; d_ptr->m_typeToValueType[QVariant::PointF] = QVariant::PointF; d_ptr->m_typeToAttributeToAttributeType[QVariant::PointF][d_ptr->m_decimalsAttribute] = QVariant::Int; - connect(pointFPropertyManager, SIGNAL(valueChanged(QtProperty *, const QPointF &)), - this, SLOT(slotValueChanged(QtProperty *, const QPointF &))); - connect(pointFPropertyManager, SIGNAL(decimalsChanged(QtProperty *, int)), - this, SLOT(slotDecimalsChanged(QtProperty *, int))); - connect(pointFPropertyManager->subDoublePropertyManager(), SIGNAL(valueChanged(QtProperty *, double)), - this, SLOT(slotValueChanged(QtProperty *, double))); - connect(pointFPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), - this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); - connect(pointFPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), - this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); + connect(pointFPropertyManager, SIGNAL(valueChanged(QtProperty*,QPointF)), + this, SLOT(slotValueChanged(QtProperty*,QPointF))); + connect(pointFPropertyManager, SIGNAL(decimalsChanged(QtProperty*,int)), + this, SLOT(slotDecimalsChanged(QtProperty*,int))); + connect(pointFPropertyManager->subDoublePropertyManager(), SIGNAL(valueChanged(QtProperty*,double)), + this, SLOT(slotValueChanged(QtProperty*,double))); + connect(pointFPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), + this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); + connect(pointFPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), + this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); // SizePropertyManager QtSizePropertyManager *sizePropertyManager = new QtSizePropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Size] = sizePropertyManager; @@ -1052,18 +1052,18 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) QVariant::Size; d_ptr->m_typeToAttributeToAttributeType[QVariant::Size][d_ptr->m_maximumAttribute] = QVariant::Size; - connect(sizePropertyManager, SIGNAL(valueChanged(QtProperty *, const QSize &)), - this, SLOT(slotValueChanged(QtProperty *, const QSize &))); - connect(sizePropertyManager, SIGNAL(rangeChanged(QtProperty *, const QSize &, const QSize &)), - this, SLOT(slotRangeChanged(QtProperty *, const QSize &, const QSize &))); - connect(sizePropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotValueChanged(QtProperty *, int))); - connect(sizePropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty *, int, int)), - this, SLOT(slotRangeChanged(QtProperty *, int, int))); - connect(sizePropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), - this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); - connect(sizePropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), - this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); + connect(sizePropertyManager, SIGNAL(valueChanged(QtProperty*,QSize)), + this, SLOT(slotValueChanged(QtProperty*,QSize))); + connect(sizePropertyManager, SIGNAL(rangeChanged(QtProperty*,QSize,QSize)), + this, SLOT(slotRangeChanged(QtProperty*,QSize,QSize))); + connect(sizePropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotValueChanged(QtProperty*,int))); + connect(sizePropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty*,int,int)), + this, SLOT(slotRangeChanged(QtProperty*,int,int))); + connect(sizePropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), + this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); + connect(sizePropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), + this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); // SizeFPropertyManager QtSizeFPropertyManager *sizeFPropertyManager = new QtSizeFPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::SizeF] = sizeFPropertyManager; @@ -1074,38 +1074,38 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) QVariant::SizeF; d_ptr->m_typeToAttributeToAttributeType[QVariant::SizeF][d_ptr->m_decimalsAttribute] = QVariant::Int; - connect(sizeFPropertyManager, SIGNAL(valueChanged(QtProperty *, const QSizeF &)), - this, SLOT(slotValueChanged(QtProperty *, const QSizeF &))); - connect(sizeFPropertyManager, SIGNAL(rangeChanged(QtProperty *, const QSizeF &, const QSizeF &)), - this, SLOT(slotRangeChanged(QtProperty *, const QSizeF &, const QSizeF &))); - connect(sizeFPropertyManager, SIGNAL(decimalsChanged(QtProperty *, int)), - this, SLOT(slotDecimalsChanged(QtProperty *, int))); - connect(sizeFPropertyManager->subDoublePropertyManager(), SIGNAL(valueChanged(QtProperty *, double)), - this, SLOT(slotValueChanged(QtProperty *, double))); - connect(sizeFPropertyManager->subDoublePropertyManager(), SIGNAL(rangeChanged(QtProperty *, double, double)), - this, SLOT(slotRangeChanged(QtProperty *, double, double))); - connect(sizeFPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), - this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); - connect(sizeFPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), - this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); + connect(sizeFPropertyManager, SIGNAL(valueChanged(QtProperty*,QSizeF)), + this, SLOT(slotValueChanged(QtProperty*,QSizeF))); + connect(sizeFPropertyManager, SIGNAL(rangeChanged(QtProperty*,QSizeF,QSizeF)), + this, SLOT(slotRangeChanged(QtProperty*,QSizeF,QSizeF))); + connect(sizeFPropertyManager, SIGNAL(decimalsChanged(QtProperty*,int)), + this, SLOT(slotDecimalsChanged(QtProperty*,int))); + connect(sizeFPropertyManager->subDoublePropertyManager(), SIGNAL(valueChanged(QtProperty*,double)), + this, SLOT(slotValueChanged(QtProperty*,double))); + connect(sizeFPropertyManager->subDoublePropertyManager(), SIGNAL(rangeChanged(QtProperty*,double,double)), + this, SLOT(slotRangeChanged(QtProperty*,double,double))); + connect(sizeFPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), + this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); + connect(sizeFPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), + this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); // RectPropertyManager QtRectPropertyManager *rectPropertyManager = new QtRectPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Rect] = rectPropertyManager; d_ptr->m_typeToValueType[QVariant::Rect] = QVariant::Rect; d_ptr->m_typeToAttributeToAttributeType[QVariant::Rect][d_ptr->m_constraintAttribute] = QVariant::Rect; - connect(rectPropertyManager, SIGNAL(valueChanged(QtProperty *, const QRect &)), - this, SLOT(slotValueChanged(QtProperty *, const QRect &))); - connect(rectPropertyManager, SIGNAL(constraintChanged(QtProperty *, const QRect &)), - this, SLOT(slotConstraintChanged(QtProperty *, const QRect &))); - connect(rectPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotValueChanged(QtProperty *, int))); - connect(rectPropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty *, int, int)), - this, SLOT(slotRangeChanged(QtProperty *, int, int))); - connect(rectPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), - this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); - connect(rectPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), - this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); + connect(rectPropertyManager, SIGNAL(valueChanged(QtProperty*,QRect)), + this, SLOT(slotValueChanged(QtProperty*,QRect))); + connect(rectPropertyManager, SIGNAL(constraintChanged(QtProperty*,QRect)), + this, SLOT(slotConstraintChanged(QtProperty*,QRect))); + connect(rectPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotValueChanged(QtProperty*,int))); + connect(rectPropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty*,int,int)), + this, SLOT(slotRangeChanged(QtProperty*,int,int))); + connect(rectPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), + this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); + connect(rectPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), + this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); // RectFPropertyManager QtRectFPropertyManager *rectFPropertyManager = new QtRectFPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::RectF] = rectFPropertyManager; @@ -1114,32 +1114,32 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) QVariant::RectF; d_ptr->m_typeToAttributeToAttributeType[QVariant::RectF][d_ptr->m_decimalsAttribute] = QVariant::Int; - connect(rectFPropertyManager, SIGNAL(valueChanged(QtProperty *, const QRectF &)), - this, SLOT(slotValueChanged(QtProperty *, const QRectF &))); - connect(rectFPropertyManager, SIGNAL(constraintChanged(QtProperty *, const QRectF &)), - this, SLOT(slotConstraintChanged(QtProperty *, const QRectF &))); - connect(rectFPropertyManager, SIGNAL(decimalsChanged(QtProperty *, int)), - this, SLOT(slotDecimalsChanged(QtProperty *, int))); - connect(rectFPropertyManager->subDoublePropertyManager(), SIGNAL(valueChanged(QtProperty *, double)), - this, SLOT(slotValueChanged(QtProperty *, double))); - connect(rectFPropertyManager->subDoublePropertyManager(), SIGNAL(rangeChanged(QtProperty *, double, double)), - this, SLOT(slotRangeChanged(QtProperty *, double, double))); - connect(rectFPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), - this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); - connect(rectFPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), - this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); + connect(rectFPropertyManager, SIGNAL(valueChanged(QtProperty*,QRectF)), + this, SLOT(slotValueChanged(QtProperty*,QRectF))); + connect(rectFPropertyManager, SIGNAL(constraintChanged(QtProperty*,QRectF)), + this, SLOT(slotConstraintChanged(QtProperty*,QRectF))); + connect(rectFPropertyManager, SIGNAL(decimalsChanged(QtProperty*,int)), + this, SLOT(slotDecimalsChanged(QtProperty*,int))); + connect(rectFPropertyManager->subDoublePropertyManager(), SIGNAL(valueChanged(QtProperty*,double)), + this, SLOT(slotValueChanged(QtProperty*,double))); + connect(rectFPropertyManager->subDoublePropertyManager(), SIGNAL(rangeChanged(QtProperty*,double,double)), + this, SLOT(slotRangeChanged(QtProperty*,double,double))); + connect(rectFPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), + this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); + connect(rectFPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), + this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); // ColorPropertyManager QtColorPropertyManager *colorPropertyManager = new QtColorPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Color] = colorPropertyManager; d_ptr->m_typeToValueType[QVariant::Color] = QVariant::Color; - connect(colorPropertyManager, SIGNAL(valueChanged(QtProperty *, const QColor &)), - this, SLOT(slotValueChanged(QtProperty *, const QColor &))); - connect(colorPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotValueChanged(QtProperty *, int))); - connect(colorPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), - this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); - connect(colorPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), - this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); + connect(colorPropertyManager, SIGNAL(valueChanged(QtProperty*,QColor)), + this, SLOT(slotValueChanged(QtProperty*,QColor))); + connect(colorPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotValueChanged(QtProperty*,int))); + connect(colorPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), + this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); + connect(colorPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), + this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); // EnumPropertyManager int enumId = enumTypeId(); QtEnumPropertyManager *enumPropertyManager = new QtEnumPropertyManager(this); @@ -1149,58 +1149,58 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) QVariant::StringList; d_ptr->m_typeToAttributeToAttributeType[enumId][d_ptr->m_enumIconsAttribute] = iconMapTypeId(); - connect(enumPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotValueChanged(QtProperty *, int))); - connect(enumPropertyManager, SIGNAL(enumNamesChanged(QtProperty *, const QStringList &)), - this, SLOT(slotEnumNamesChanged(QtProperty *, const QStringList &))); - connect(enumPropertyManager, SIGNAL(enumIconsChanged(QtProperty *, const QMap<int, QIcon> &)), - this, SLOT(slotEnumIconsChanged(QtProperty *, const QMap<int, QIcon> &))); + connect(enumPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotValueChanged(QtProperty*,int))); + connect(enumPropertyManager, SIGNAL(enumNamesChanged(QtProperty*,QStringList)), + this, SLOT(slotEnumNamesChanged(QtProperty*,QStringList))); + connect(enumPropertyManager, SIGNAL(enumIconsChanged(QtProperty*,QMap<int,QIcon>)), + this, SLOT(slotEnumIconsChanged(QtProperty*,QMap<int,QIcon>))); // SizePolicyPropertyManager QtSizePolicyPropertyManager *sizePolicyPropertyManager = new QtSizePolicyPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::SizePolicy] = sizePolicyPropertyManager; d_ptr->m_typeToValueType[QVariant::SizePolicy] = QVariant::SizePolicy; - connect(sizePolicyPropertyManager, SIGNAL(valueChanged(QtProperty *, const QSizePolicy &)), - this, SLOT(slotValueChanged(QtProperty *, const QSizePolicy &))); - connect(sizePolicyPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotValueChanged(QtProperty *, int))); - connect(sizePolicyPropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty *, int, int)), - this, SLOT(slotRangeChanged(QtProperty *, int, int))); - connect(sizePolicyPropertyManager->subEnumPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotValueChanged(QtProperty *, int))); + connect(sizePolicyPropertyManager, SIGNAL(valueChanged(QtProperty*,QSizePolicy)), + this, SLOT(slotValueChanged(QtProperty*,QSizePolicy))); + connect(sizePolicyPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotValueChanged(QtProperty*,int))); + connect(sizePolicyPropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty*,int,int)), + this, SLOT(slotRangeChanged(QtProperty*,int,int))); + connect(sizePolicyPropertyManager->subEnumPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotValueChanged(QtProperty*,int))); connect(sizePolicyPropertyManager->subEnumPropertyManager(), - SIGNAL(enumNamesChanged(QtProperty *, const QStringList &)), - this, SLOT(slotEnumNamesChanged(QtProperty *, const QStringList &))); - connect(sizePolicyPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), - this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); - connect(sizePolicyPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), - this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); + SIGNAL(enumNamesChanged(QtProperty*,QStringList)), + this, SLOT(slotEnumNamesChanged(QtProperty*,QStringList))); + connect(sizePolicyPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), + this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); + connect(sizePolicyPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), + this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); // FontPropertyManager QtFontPropertyManager *fontPropertyManager = new QtFontPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Font] = fontPropertyManager; d_ptr->m_typeToValueType[QVariant::Font] = QVariant::Font; - connect(fontPropertyManager, SIGNAL(valueChanged(QtProperty *, const QFont &)), - this, SLOT(slotValueChanged(QtProperty *, const QFont &))); - connect(fontPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotValueChanged(QtProperty *, int))); - connect(fontPropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty *, int, int)), - this, SLOT(slotRangeChanged(QtProperty *, int, int))); - connect(fontPropertyManager->subEnumPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotValueChanged(QtProperty *, int))); + connect(fontPropertyManager, SIGNAL(valueChanged(QtProperty*,QFont)), + this, SLOT(slotValueChanged(QtProperty*,QFont))); + connect(fontPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotValueChanged(QtProperty*,int))); + connect(fontPropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty*,int,int)), + this, SLOT(slotRangeChanged(QtProperty*,int,int))); + connect(fontPropertyManager->subEnumPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotValueChanged(QtProperty*,int))); connect(fontPropertyManager->subEnumPropertyManager(), - SIGNAL(enumNamesChanged(QtProperty *, const QStringList &)), - this, SLOT(slotEnumNamesChanged(QtProperty *, const QStringList &))); - connect(fontPropertyManager->subBoolPropertyManager(), SIGNAL(valueChanged(QtProperty *, bool)), - this, SLOT(slotValueChanged(QtProperty *, bool))); - connect(fontPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), - this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); - connect(fontPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), - this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); + SIGNAL(enumNamesChanged(QtProperty*,QStringList)), + this, SLOT(slotEnumNamesChanged(QtProperty*,QStringList))); + connect(fontPropertyManager->subBoolPropertyManager(), SIGNAL(valueChanged(QtProperty*,bool)), + this, SLOT(slotValueChanged(QtProperty*,bool))); + connect(fontPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), + this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); + connect(fontPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), + this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); // CursorPropertyManager QtCursorPropertyManager *cursorPropertyManager = new QtCursorPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Cursor] = cursorPropertyManager; d_ptr->m_typeToValueType[QVariant::Cursor] = QVariant::Cursor; - connect(cursorPropertyManager, SIGNAL(valueChanged(QtProperty *, const QCursor &)), - this, SLOT(slotValueChanged(QtProperty *, const QCursor &))); + connect(cursorPropertyManager, SIGNAL(valueChanged(QtProperty*,QCursor)), + this, SLOT(slotValueChanged(QtProperty*,QCursor))); // FlagPropertyManager int flagId = flagTypeId(); QtFlagPropertyManager *flagPropertyManager = new QtFlagPropertyManager(this); @@ -1208,16 +1208,16 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) d_ptr->m_typeToValueType[flagId] = QVariant::Int; d_ptr->m_typeToAttributeToAttributeType[flagId][d_ptr->m_flagNamesAttribute] = QVariant::StringList; - connect(flagPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotValueChanged(QtProperty *, int))); - connect(flagPropertyManager, SIGNAL(flagNamesChanged(QtProperty *, const QStringList &)), - this, SLOT(slotFlagNamesChanged(QtProperty *, const QStringList &))); - connect(flagPropertyManager->subBoolPropertyManager(), SIGNAL(valueChanged(QtProperty *, bool)), - this, SLOT(slotValueChanged(QtProperty *, bool))); - connect(flagPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), - this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); - connect(flagPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), - this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); + connect(flagPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotValueChanged(QtProperty*,int))); + connect(flagPropertyManager, SIGNAL(flagNamesChanged(QtProperty*,QStringList)), + this, SLOT(slotFlagNamesChanged(QtProperty*,QStringList))); + connect(flagPropertyManager->subBoolPropertyManager(), SIGNAL(valueChanged(QtProperty*,bool)), + this, SLOT(slotValueChanged(QtProperty*,bool))); + connect(flagPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), + this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); + connect(flagPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), + this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); // FlagPropertyManager int groupId = groupTypeId(); QtGroupPropertyManager *groupPropertyManager = new QtGroupPropertyManager(this); diff --git a/tools/shared/qttoolbardialog/qttoolbardialog.cpp b/tools/shared/qttoolbardialog/qttoolbardialog.cpp index dbc4138111..c7cf3feb6b 100644 --- a/tools/shared/qttoolbardialog/qttoolbardialog.cpp +++ b/tools/shared/qttoolbardialog/qttoolbardialog.cpp @@ -1807,20 +1807,20 @@ QtToolBarDialog::QtToolBarDialog(QWidget *parent, Qt::WindowFlags flags) connect(d_ptr->ui.buttonBox->button(QDialogButtonBox::Apply), SIGNAL(clicked()), this, SLOT(applyClicked())); connect(d_ptr->ui.buttonBox->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), this, SLOT(cancelClicked())); - connect(d_ptr->ui.actionTree, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), - this, SLOT(currentActionChanged(QTreeWidgetItem *))); - connect(d_ptr->ui.toolBarList, SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)), - this, SLOT(currentToolBarChanged(QListWidgetItem *))); + connect(d_ptr->ui.actionTree, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), + this, SLOT(currentActionChanged(QTreeWidgetItem*))); + connect(d_ptr->ui.toolBarList, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), + this, SLOT(currentToolBarChanged(QListWidgetItem*))); connect(d_ptr->ui.currentToolBarList, - SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)), - this, SLOT(currentToolBarActionChanged(QListWidgetItem *))); + SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), + this, SLOT(currentToolBarActionChanged(QListWidgetItem*))); - connect(d_ptr->ui.actionTree, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), + connect(d_ptr->ui.actionTree, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), this, SLOT(rightClicked())); - connect(d_ptr->ui.currentToolBarList, SIGNAL(itemDoubleClicked(QListWidgetItem *)), + connect(d_ptr->ui.currentToolBarList, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(leftClicked())); - connect(d_ptr->ui.toolBarList, SIGNAL(itemChanged(QListWidgetItem *)), - this, SLOT(toolBarRenamed(QListWidgetItem *))); + connect(d_ptr->ui.toolBarList, SIGNAL(itemChanged(QListWidgetItem*)), + this, SLOT(toolBarRenamed(QListWidgetItem*))); } /*! |