summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@digia.com>2013-01-31 18:55:53 +0100
committerSergio Ahumada <sergio.ahumada@digia.com>2013-01-31 18:55:53 +0100
commit6239af6f0f15871e02a516c97c5f1775743d352b (patch)
tree904e3e5df8c6f3e4aa820db4f2d9e73e3026dfd4 /src
parent3dc47622a469ded1c99397fdedc2053b73d57189 (diff)
parent6654a05fcad565a302e205e7f7deaa0b2757082d (diff)
Merge branch 'release' into stable
Diffstat (limited to 'src')
-rw-r--r--src/angle/src/config.pri3
-rw-r--r--src/corelib/doc/qtcore.qdocconf3
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp2
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_io_qurl.cpp8
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp10
-rw-r--r--src/corelib/doc/snippets/qxmlstreamwriter/main.cpp4
-rw-r--r--src/corelib/doc/snippets/resource-system/application.pro14
-rw-r--r--src/corelib/doc/snippets/resource-system/application.qrc10
-rw-r--r--src/corelib/doc/snippets/resource-system/mainwindow.cpp392
-rw-r--r--src/corelib/doc/src/eventsandfilters.qdoc2
-rw-r--r--src/corelib/doc/src/resource-system.qdoc6
-rw-r--r--src/corelib/global/qnamespace.qdoc2
-rw-r--r--src/corelib/io/qurl.cpp2
-rw-r--r--src/gui/image/qpixmapcache.cpp2
-rw-r--r--src/gui/opengl/qopengl.h1
-rw-r--r--src/network/doc/snippets/code/src_network_access_qnetworkaccessmanager.cpp4
-rw-r--r--src/network/doc/snippets/code/src_network_access_qnetworkdiskcache.cpp4
-rw-r--r--src/network/doc/snippets/code/src_network_kernel_qhostinfo.cpp6
-rw-r--r--src/opengl/qgl.h28
-rw-r--r--src/printsupport/kernel/kernel.pri2
-rw-r--r--src/testlib/doc/src/qt-webpages.qdoc4
-rw-r--r--src/widgets/dialogs/qwizard.cpp2
-rwxr-xr-xsrc/widgets/doc/snippets/macmainwindow.mm347
-rw-r--r--src/widgets/doc/src/gestures.qdoc8
-rw-r--r--src/widgets/doc/src/modelview.qdoc2
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/layout.qdoc2
-rw-r--r--src/widgets/kernel/qlayoutitem.cpp2
-rw-r--r--src/widgets/widgets/qmaccocoaviewcontainer_mac.mm2
-rw-r--r--src/widgets/widgets/qmacnativewidget_mac.mm4
-rw-r--r--src/xml/doc/snippets/code/src_xml_dom_qdom.cpp8
-rw-r--r--src/xml/doc/snippets/rsslisting/listing.cpp (renamed from src/xml/doc/snippets/rsslisting/rsslisting.cpp)0
-rw-r--r--src/xml/sax/qxml.cpp2
32 files changed, 809 insertions, 79 deletions
diff --git a/src/angle/src/config.pri b/src/angle/src/config.pri
index 6ba2cbdf7a..4e52358205 100644
--- a/src/angle/src/config.pri
+++ b/src/angle/src/config.pri
@@ -15,7 +15,8 @@ isEmpty(ANGLE_DIR) {
win32 {
GNUTOOLS_DIR=$$PWD/../../../../gnuwin32/bin
exists($$GNUTOOLS_DIR/gperf.exe) {
- GNUTOOLS = "(set $$escape_expand(\\\")PATH=$$replace(GNUTOOLS_DIR, [/\\\\], $${QMAKE_DIR_SEP});%PATH%$$escape_expand(\\\"))"
+ # Escape closing parens when expanding the variable, otherwise cmd confuses itself.
+ GNUTOOLS = "(set PATH=$$replace(GNUTOOLS_DIR, [/\\\\], $${QMAKE_DIR_SEP});%PATH:)=^)%)"
}
}
diff --git a/src/corelib/doc/qtcore.qdocconf b/src/corelib/doc/qtcore.qdocconf
index cb87530f54..dc239ccf6f 100644
--- a/src/corelib/doc/qtcore.qdocconf
+++ b/src/corelib/doc/qtcore.qdocconf
@@ -36,7 +36,6 @@ exampledirs += \
../ \
snippets \
../../../examples/threads/ \
- ../../../examples/tools/ \
- ../../../examples/widgets/
+ ../../../examples/tools/
imagedirs += images
diff --git a/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp b/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp
index 2b58802426..ddb84bcc74 100644
--- a/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp
@@ -535,7 +535,7 @@ CApaApplication *myApplicationFactory();
//! [49]
-void myMessageHandler(QtMsgType, const QMessageLogContext &, const char *);
+void myMessageHandler(QtMsgType, const QMessageLogContext &, const QString &);
//! [49]
//! [50]
diff --git a/src/corelib/doc/snippets/code/src_corelib_io_qurl.cpp b/src/corelib/doc/snippets/code/src_corelib_io_qurl.cpp
index ad2e502be8..532a0e1f59 100644
--- a/src/corelib/doc/snippets/code/src_corelib_io_qurl.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_io_qurl.cpp
@@ -45,7 +45,7 @@ QUrl url("http://www.example.com/List of holidays.xml");
//! [1]
-QUrl url = QUrl::fromEncoded("http://qt.nokia.com/List%20of%20holidays.xml");
+QUrl url = QUrl::fromEncoded("http://qt-project.org/List%20of%20holidays.xml");
//! [1]
@@ -73,10 +73,10 @@ http://www.example.com/cgi-bin/drawgraph.cgi?type(pie)color(green)
//! [5]
-QUrl baseUrl("http://qt.nokia.com/support");
-QUrl relativeUrl("../products/solutions");
+QUrl baseUrl("http://qt.digia.com/Support/");
+QUrl relativeUrl("../Product/Library/");
qDebug(baseUrl.resolved(relativeUrl).toString());
-// prints "http://qt.nokia.com/products/solutions"
+// prints "http://qt.digia.com/Product/Library/"
//! [5]
diff --git a/src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp b/src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp
index 9f52fcff98..7e221cfaab 100644
--- a/src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp
@@ -258,7 +258,7 @@ if (url.startsWith("ftp:"))
//! [26]
-QByteArray url("http://qt.nokia.com/index.html");
+QByteArray url("http://qt-project.org/doc/qt-5.0/qtdoc/index.html");
if (url.endsWith(".html"))
...
//! [26]
@@ -286,16 +286,16 @@ QByteArray z = x.mid(5); // z == "pineapples"
//! [30]
-QByteArray x("Qt by NOKIA");
+QByteArray x("Qt by DIGIA");
QByteArray y = x.toLower();
-// y == "qt by nokia"
+// y == "qt by digia"
//! [30]
//! [31]
-QByteArray x("Qt by NOKIA");
+QByteArray x("Qt by DIGIA");
QByteArray y = x.toUpper();
-// y == "QT BY NOKIA"
+// y == "QT BY DIGIA"
//! [31]
diff --git a/src/corelib/doc/snippets/qxmlstreamwriter/main.cpp b/src/corelib/doc/snippets/qxmlstreamwriter/main.cpp
index 134c3b55ff..046790e8ae 100644
--- a/src/corelib/doc/snippets/qxmlstreamwriter/main.cpp
+++ b/src/corelib/doc/snippets/qxmlstreamwriter/main.cpp
@@ -61,8 +61,8 @@ int main(int argc, char *argv[])
stream.writeAttribute("folded", "no");
//! [write element]
stream.writeStartElement("bookmark");
- stream.writeAttribute("href", "http://qt.nokia.com/");
- stream.writeTextElement("title", "Qt Home");
+ stream.writeAttribute("href", "http://qt-project.org/");
+ stream.writeTextElement("title", "Qt Project");
stream.writeEndElement(); // bookmark
//! [write element]
stream.writeEndElement(); // folder
diff --git a/src/corelib/doc/snippets/resource-system/application.pro b/src/corelib/doc/snippets/resource-system/application.pro
new file mode 100644
index 0000000000..652cc73485
--- /dev/null
+++ b/src/corelib/doc/snippets/resource-system/application.pro
@@ -0,0 +1,14 @@
+QT += widgets
+
+HEADERS = mainwindow.h
+SOURCES = main.cpp \
+ mainwindow.cpp
+#! [0]
+RESOURCES = application.qrc
+#! [0]
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets/mainwindows/application
+INSTALLS += target
+
+simulator: warning(This example might not fully work on Simulator platform)
diff --git a/src/corelib/doc/snippets/resource-system/application.qrc b/src/corelib/doc/snippets/resource-system/application.qrc
new file mode 100644
index 0000000000..0a776fab4d
--- /dev/null
+++ b/src/corelib/doc/snippets/resource-system/application.qrc
@@ -0,0 +1,10 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>images/copy.png</file>
+ <file>images/cut.png</file>
+ <file>images/new.png</file>
+ <file>images/open.png</file>
+ <file>images/paste.png</file>
+ <file>images/save.png</file>
+</qresource>
+</RCC>
diff --git a/src/corelib/doc/snippets/resource-system/mainwindow.cpp b/src/corelib/doc/snippets/resource-system/mainwindow.cpp
new file mode 100644
index 0000000000..8bdd0303de
--- /dev/null
+++ b/src/corelib/doc/snippets/resource-system/mainwindow.cpp
@@ -0,0 +1,392 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "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 Digia Plc and its Subsidiary(-ies) 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."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include <QtWidgets>
+
+#include "mainwindow.h"
+//! [0]
+
+//! [1]
+MainWindow::MainWindow()
+//! [1] //! [2]
+{
+ textEdit = new QPlainTextEdit;
+ setCentralWidget(textEdit);
+
+ createActions();
+ createMenus();
+ createToolBars();
+ createStatusBar();
+
+ readSettings();
+
+ connect(textEdit->document(), SIGNAL(contentsChanged()),
+ this, SLOT(documentWasModified()));
+
+ setCurrentFile("");
+ setUnifiedTitleAndToolBarOnMac(true);
+}
+//! [2]
+
+//! [3]
+void MainWindow::closeEvent(QCloseEvent *event)
+//! [3] //! [4]
+{
+ if (maybeSave()) {
+ writeSettings();
+ event->accept();
+ } else {
+ event->ignore();
+ }
+}
+//! [4]
+
+//! [5]
+void MainWindow::newFile()
+//! [5] //! [6]
+{
+ if (maybeSave()) {
+ textEdit->clear();
+ setCurrentFile("");
+ }
+}
+//! [6]
+
+//! [7]
+void MainWindow::open()
+//! [7] //! [8]
+{
+ if (maybeSave()) {
+ QString fileName = QFileDialog::getOpenFileName(this);
+ if (!fileName.isEmpty())
+ loadFile(fileName);
+ }
+}
+//! [8]
+
+//! [9]
+bool MainWindow::save()
+//! [9] //! [10]
+{
+ if (curFile.isEmpty()) {
+ return saveAs();
+ } else {
+ return saveFile(curFile);
+ }
+}
+//! [10]
+
+//! [11]
+bool MainWindow::saveAs()
+//! [11] //! [12]
+{
+ QString fileName = QFileDialog::getSaveFileName(this);
+ if (fileName.isEmpty())
+ return false;
+
+ return saveFile(fileName);
+}
+//! [12]
+
+//! [13]
+void MainWindow::about()
+//! [13] //! [14]
+{
+ QMessageBox::about(this, tr("About Application"),
+ tr("The <b>Application</b> example demonstrates how to "
+ "write modern GUI applications using Qt, with a menu bar, "
+ "toolbars, and a status bar."));
+}
+//! [14]
+
+//! [15]
+void MainWindow::documentWasModified()
+//! [15] //! [16]
+{
+ setWindowModified(textEdit->document()->isModified());
+}
+//! [16]
+
+//! [17]
+void MainWindow::createActions()
+//! [17] //! [18]
+{
+ newAct = new QAction(QIcon(":/images/new.png"), tr("&New"), this);
+ newAct->setShortcuts(QKeySequence::New);
+ newAct->setStatusTip(tr("Create a new file"));
+ connect(newAct, SIGNAL(triggered()), this, SLOT(newFile()));
+
+//! [19]
+ openAct = new QAction(QIcon(":/images/open.png"), tr("&Open..."), this);
+ openAct->setShortcuts(QKeySequence::Open);
+ openAct->setStatusTip(tr("Open an existing file"));
+ connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
+//! [18] //! [19]
+
+ saveAct = new QAction(QIcon(":/images/save.png"), tr("&Save"), this);
+ saveAct->setShortcuts(QKeySequence::Save);
+ saveAct->setStatusTip(tr("Save the document to disk"));
+ connect(saveAct, SIGNAL(triggered()), this, SLOT(save()));
+
+ saveAsAct = new QAction(tr("Save &As..."), this);
+ saveAsAct->setShortcuts(QKeySequence::SaveAs);
+ saveAsAct->setStatusTip(tr("Save the document under a new name"));
+ connect(saveAsAct, SIGNAL(triggered()), this, SLOT(saveAs()));
+
+//! [20]
+ exitAct = new QAction(tr("E&xit"), this);
+ exitAct->setShortcuts(QKeySequence::Quit);
+//! [20]
+ exitAct->setStatusTip(tr("Exit the application"));
+ connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
+
+//! [21]
+ cutAct = new QAction(QIcon(":/images/cut.png"), tr("Cu&t"), this);
+//! [21]
+ cutAct->setShortcuts(QKeySequence::Cut);
+ cutAct->setStatusTip(tr("Cut the current selection's contents to the "
+ "clipboard"));
+ connect(cutAct, SIGNAL(triggered()), textEdit, SLOT(cut()));
+
+ copyAct = new QAction(QIcon(":/images/copy.png"), tr("&Copy"), this);
+ copyAct->setShortcuts(QKeySequence::Copy);
+ copyAct->setStatusTip(tr("Copy the current selection's contents to the "
+ "clipboard"));
+ connect(copyAct, SIGNAL(triggered()), textEdit, SLOT(copy()));
+
+ pasteAct = new QAction(QIcon(":/images/paste.png"), tr("&Paste"), this);
+ pasteAct->setShortcuts(QKeySequence::Paste);
+ pasteAct->setStatusTip(tr("Paste the clipboard's contents into the current "
+ "selection"));
+ connect(pasteAct, SIGNAL(triggered()), textEdit, SLOT(paste()));
+
+ aboutAct = new QAction(tr("&About"), this);
+ aboutAct->setStatusTip(tr("Show the application's About box"));
+ connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+
+//! [22]
+ aboutQtAct = new QAction(tr("About &Qt"), this);
+ aboutQtAct->setStatusTip(tr("Show the Qt library's About box"));
+ connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+//! [22]
+
+//! [23]
+ cutAct->setEnabled(false);
+//! [23] //! [24]
+ copyAct->setEnabled(false);
+ connect(textEdit, SIGNAL(copyAvailable(bool)),
+ cutAct, SLOT(setEnabled(bool)));
+ connect(textEdit, SIGNAL(copyAvailable(bool)),
+ copyAct, SLOT(setEnabled(bool)));
+}
+//! [24]
+
+//! [25] //! [26]
+void MainWindow::createMenus()
+//! [25] //! [27]
+{
+ fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(newAct);
+//! [28]
+ fileMenu->addAction(openAct);
+//! [28]
+ fileMenu->addAction(saveAct);
+//! [26]
+ fileMenu->addAction(saveAsAct);
+ fileMenu->addSeparator();
+ fileMenu->addAction(exitAct);
+
+ editMenu = menuBar()->addMenu(tr("&Edit"));
+ editMenu->addAction(cutAct);
+ editMenu->addAction(copyAct);
+ editMenu->addAction(pasteAct);
+
+ menuBar()->addSeparator();
+
+ helpMenu = menuBar()->addMenu(tr("&Help"));
+ helpMenu->addAction(aboutAct);
+ helpMenu->addAction(aboutQtAct);
+}
+//! [27]
+
+//! [29] //! [30]
+void MainWindow::createToolBars()
+{
+ fileToolBar = addToolBar(tr("File"));
+ fileToolBar->addAction(newAct);
+//! [29] //! [31]
+ fileToolBar->addAction(openAct);
+//! [31]
+ fileToolBar->addAction(saveAct);
+
+ editToolBar = addToolBar(tr("Edit"));
+ editToolBar->addAction(cutAct);
+ editToolBar->addAction(copyAct);
+ editToolBar->addAction(pasteAct);
+}
+//! [30]
+
+//! [32]
+void MainWindow::createStatusBar()
+//! [32] //! [33]
+{
+ statusBar()->showMessage(tr("Ready"));
+}
+//! [33]
+
+//! [34] //! [35]
+void MainWindow::readSettings()
+//! [34] //! [36]
+{
+ QSettings settings("QtProject", "Application Example");
+ QPoint pos = settings.value("pos", QPoint(200, 200)).toPoint();
+ QSize size = settings.value("size", QSize(400, 400)).toSize();
+ resize(size);
+ move(pos);
+}
+//! [35] //! [36]
+
+//! [37] //! [38]
+void MainWindow::writeSettings()
+//! [37] //! [39]
+{
+ QSettings settings("QtProject", "Application Example");
+ settings.setValue("pos", pos());
+ settings.setValue("size", size());
+}
+//! [38] //! [39]
+
+//! [40]
+bool MainWindow::maybeSave()
+//! [40] //! [41]
+{
+ if (textEdit->document()->isModified()) {
+ QMessageBox::StandardButton ret;
+ ret = QMessageBox::warning(this, tr("Application"),
+ tr("The document has been modified.\n"
+ "Do you want to save your changes?"),
+ QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
+ if (ret == QMessageBox::Save)
+ return save();
+ else if (ret == QMessageBox::Cancel)
+ return false;
+ }
+ return true;
+}
+//! [41]
+
+//! [42]
+void MainWindow::loadFile(const QString &fileName)
+//! [42] //! [43]
+{
+ QFile file(fileName);
+ if (!file.open(QFile::ReadOnly | QFile::Text)) {
+ QMessageBox::warning(this, tr("Application"),
+ tr("Cannot read file %1:\n%2.")
+ .arg(fileName)
+ .arg(file.errorString()));
+ return;
+ }
+
+ QTextStream in(&file);
+#ifndef QT_NO_CURSOR
+ QApplication::setOverrideCursor(Qt::WaitCursor);
+#endif
+ textEdit->setPlainText(in.readAll());
+#ifndef QT_NO_CURSOR
+ QApplication::restoreOverrideCursor();
+#endif
+
+ setCurrentFile(fileName);
+ statusBar()->showMessage(tr("File loaded"), 2000);
+}
+//! [43]
+
+//! [44]
+bool MainWindow::saveFile(const QString &fileName)
+//! [44] //! [45]
+{
+ QFile file(fileName);
+ if (!file.open(QFile::WriteOnly | QFile::Text)) {
+ QMessageBox::warning(this, tr("Application"),
+ tr("Cannot write file %1:\n%2.")
+ .arg(fileName)
+ .arg(file.errorString()));
+ return false;
+ }
+
+ QTextStream out(&file);
+#ifndef QT_NO_CURSOR
+ QApplication::setOverrideCursor(Qt::WaitCursor);
+#endif
+ out << textEdit->toPlainText();
+#ifndef QT_NO_CURSOR
+ QApplication::restoreOverrideCursor();
+#endif
+
+ setCurrentFile(fileName);
+ statusBar()->showMessage(tr("File saved"), 2000);
+ return true;
+}
+//! [45]
+
+//! [46]
+void MainWindow::setCurrentFile(const QString &fileName)
+//! [46] //! [47]
+{
+ curFile = fileName;
+ textEdit->document()->setModified(false);
+ setWindowModified(false);
+
+ QString shownName = curFile;
+ if (curFile.isEmpty())
+ shownName = "untitled.txt";
+ setWindowFilePath(shownName);
+}
+//! [47]
+
+//! [48]
+QString MainWindow::strippedName(const QString &fullFileName)
+//! [48] //! [49]
+{
+ return QFileInfo(fullFileName).fileName();
+}
+//! [49]
diff --git a/src/corelib/doc/src/eventsandfilters.qdoc b/src/corelib/doc/src/eventsandfilters.qdoc
index 58da01f835..cd31e36dee 100644
--- a/src/corelib/doc/src/eventsandfilters.qdoc
+++ b/src/corelib/doc/src/eventsandfilters.qdoc
@@ -100,7 +100,7 @@
event delivery mechanisms are flexible. The documentation for
QCoreApplication::notify() concisely tells the whole story; the
\e{Qt Quarterly} article
- \l{http://doc.qt.nokia.com/qq/qq11-events.html}{Another Look at Events}
+ \l{http://doc.qt.digia.com/qq/qq11-events.html}{Another Look at Events}
rehashes it less concisely. Here we will explain enough for 95%
of applications.
diff --git a/src/corelib/doc/src/resource-system.qdoc b/src/corelib/doc/src/resource-system.qdoc
index 4a676c0fdf..5ef6bb285c 100644
--- a/src/corelib/doc/src/resource-system.qdoc
+++ b/src/corelib/doc/src/resource-system.qdoc
@@ -50,7 +50,7 @@
Here's an example \c .qrc file:
- \quotefile mainwindows/application/application.qrc
+ \quotefile resource-system/application.qrc
The resource files listed in the \c .qrc file are files that are
part of the application's source tree. The specified paths are
@@ -122,7 +122,7 @@
mentioned in the application's \c .pro file so that \c qmake knows
about it. For example:
- \snippet mainwindows/application/application.pro 0
+ \snippet resource-system/application.pro 0
\c qmake will produce make rules to generate a file called \c
qrc_application.cpp that is linked into the application. This
@@ -167,7 +167,7 @@
pass a resource path instead of a file name to the QIcon, QImage,
or QPixmap constructor:
- \snippet mainwindows/application/mainwindow.cpp 21
+ \snippet resource-system/mainwindow.cpp 21
See the \l{mainwindows/application}{Application} example for an
actual application that uses Qt's resource system to store its
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 02342599a2..cb18dde724 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -2492,7 +2492,7 @@
"\l{http://bugreports.qt-project.org/browse/QTWEBSITE-13}{http://bugreports.qt.../QTWEBSITE-13/}"),
whereas Qt::ElideRight is appropriate
for other strings (e.g.,
- "\l{http://qt.nokia.com/doc/qq/qq09-mac-deployment.html}{Deploying Applications on Ma...}").
+ "\l{http://doc.qt.digia.com/qq/qq09-mac-deployment.html}{Deploying Applications on Ma...}").
\sa QAbstractItemView::textElideMode, QFontMetrics::elidedText(), AlignmentFlag, QTabBar::elideMode
*/
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index 79981738f2..7ff23d931c 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -3861,7 +3861,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\section1 Examples:
\list
- \li qt.nokia.com becomes http://qt.nokia.com
+ \li qt-project.org becomes http://qt-project.org
\li ftp.qt-project.org becomes ftp://ftp.qt-project.org
\li hostname becomes http://hostname
\li /home/user/test.html becomes file:///home/user/test.html
diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp
index 47d6f33634..4a8330d9f3 100644
--- a/src/gui/image/qpixmapcache.cpp
+++ b/src/gui/image/qpixmapcache.cpp
@@ -83,7 +83,7 @@ QT_BEGIN_NAMESPACE
memory.
The \e{Qt Quarterly} article
- \l{http://qt.nokia.com/doc/qq/qq12-qpixmapcache.html}{Optimizing
+ \l{http://doc.qt.digia.com/qq/qq12-qpixmapcache.html}{Optimizing
with QPixmapCache} explains how to use QPixmapCache to speed up
applications by caching the results of painting.
diff --git a/src/gui/opengl/qopengl.h b/src/gui/opengl/qopengl.h
index ba421bd1c1..9d29e07319 100644
--- a/src/gui/opengl/qopengl.h
+++ b/src/gui/opengl/qopengl.h
@@ -95,6 +95,7 @@ typedef GLfloat GLdouble;
# if defined(Q_OS_WIN)
# include <QtCore/qt_windows.h>
# endif
+# define GL_GLEXT_LEGACY // Prevents GL/gl.h form #including system glext.h
# include <GL/gl.h>
# include <QtGui/qopenglext.h>
# endif // Q_OS_MAC
diff --git a/src/network/doc/snippets/code/src_network_access_qnetworkaccessmanager.cpp b/src/network/doc/snippets/code/src_network_access_qnetworkaccessmanager.cpp
index 327bb8beee..f0506f1f41 100644
--- a/src/network/doc/snippets/code/src_network_access_qnetworkaccessmanager.cpp
+++ b/src/network/doc/snippets/code/src_network_access_qnetworkaccessmanager.cpp
@@ -43,13 +43,13 @@ QNetworkAccessManager *manager = new QNetworkAccessManager(this);
connect(manager, SIGNAL(finished(QNetworkReply*)),
this, SLOT(replyFinished(QNetworkReply*)));
-manager->get(QNetworkRequest(QUrl("http://qt.nokia.com")));
+manager->get(QNetworkRequest(QUrl("http://qt-project.org")));
//! [0]
//! [1]
QNetworkRequest request;
-request.setUrl(QUrl("http://qt.nokia.com"));
+request.setUrl(QUrl("http://qt-project.org"));
request.setRawHeader("User-Agent", "MyOwnBrowser 1.0");
QNetworkReply *reply = manager->get(request);
diff --git a/src/network/doc/snippets/code/src_network_access_qnetworkdiskcache.cpp b/src/network/doc/snippets/code/src_network_access_qnetworkdiskcache.cpp
index fd95c6947b..a017d43dce 100644
--- a/src/network/doc/snippets/code/src_network_access_qnetworkdiskcache.cpp
+++ b/src/network/doc/snippets/code/src_network_access_qnetworkdiskcache.cpp
@@ -47,11 +47,11 @@ manager->setCache(diskCache);
//! [1]
// do a normal request (preferred from network, as this is the default)
-QNetworkRequest request(QUrl(QString("http://qt.nokia.com")));
+QNetworkRequest request(QUrl(QString("http://qt-project.org")));
manager->get(request);
// do a request preferred from cache
-QNetworkRequest request2(QUrl(QString("http://qt.nokia.com")));
+QNetworkRequest request2(QUrl(QString("http://qt-project.org")));
request2.setAttribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::PreferCache);
manager->get(request2);
//! [1]
diff --git a/src/network/doc/snippets/code/src_network_kernel_qhostinfo.cpp b/src/network/doc/snippets/code/src_network_kernel_qhostinfo.cpp
index 67645a6628..dae999676e 100644
--- a/src/network/doc/snippets/code/src_network_kernel_qhostinfo.cpp
+++ b/src/network/doc/snippets/code/src_network_kernel_qhostinfo.cpp
@@ -39,8 +39,8 @@
****************************************************************************/
//! [0]
-// To find the IP address of qt.nokia.com
-QHostInfo::lookupHost("qt.nokia.com",
+// To find the IP address of qt-project.org
+QHostInfo::lookupHost("qt-project.org",
this, SLOT(printResults(QHostInfo)));
// To find the host name for 4.2.2.1
@@ -50,7 +50,7 @@ QHostInfo::lookupHost("4.2.2.1",
//! [1]
-QHostInfo info = QHostInfo::fromName("qt.nokia.com");
+QHostInfo info = QHostInfo::fromName("qt-project.org");
//! [1]
diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h
index b5924822ef..2fc21cb501 100644
--- a/src/opengl/qgl.h
+++ b/src/opengl/qgl.h
@@ -44,6 +44,7 @@
#ifndef QT_NO_OPENGL
+#include <QtGui/qopengl.h>
#include <QtWidgets/qwidget.h>
#include <QtGui/qpaintengine.h>
#include <QtOpenGL/qglcolormap.h>
@@ -54,33 +55,6 @@
QT_BEGIN_HEADER
-#if defined(Q_OS_WIN)
-# include <QtCore/qt_windows.h>
-#endif
-
-#if defined(Q_OS_MAC)
-# if !defined(Q_OS_IOS)
-# include <OpenGL/gl.h>
-# else
-# if defined(QT_OPENGL_ES_2)
-# include <OpenGLES/ES2/gl.h>
-# endif
-# endif
-#elif defined(QT_OPENGL_ES_2)
-# include <GLES2/gl2.h>
-# else
-# include <GL/gl.h>
-# endif
-
-#if defined(QT_OPENGL_ES_2)
-# ifndef GL_DOUBLE
-# define GL_DOUBLE GL_FLOAT
-# endif
-# ifndef GLdouble
-typedef GLfloat GLdouble;
-# endif
-#endif
-
QT_BEGIN_NAMESPACE
diff --git a/src/printsupport/kernel/kernel.pri b/src/printsupport/kernel/kernel.pri
index 5f14c28616..8bdccd0f5b 100644
--- a/src/printsupport/kernel/kernel.pri
+++ b/src/printsupport/kernel/kernel.pri
@@ -24,7 +24,7 @@ win32 {
$$PWD/qprintengine_win_p.h
SOURCES += \
$$PWD/qprintengine_win.cpp
- LIBS += -lwinspool -lcomdlg32
+ LIBS += -lwinspool -lcomdlg32 -lgdi32 -luser32
}
unix:!mac:contains(QT_CONFIG, cups): {
diff --git a/src/testlib/doc/src/qt-webpages.qdoc b/src/testlib/doc/src/qt-webpages.qdoc
index a320318926..a0af232c03 100644
--- a/src/testlib/doc/src/qt-webpages.qdoc
+++ b/src/testlib/doc/src/qt-webpages.qdoc
@@ -36,7 +36,3 @@
\externalpage http://qt.gitorious.org/qt-labs/qtestlib-tools
\title qtestlib-tools
*/
-/*!
- \externalpage http://qt.nokia.com/services-partners/partners/partner-directory
- \title Partner Directory
-*/
diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp
index 0e64bb0f42..8bc2eb92c1 100644
--- a/src/widgets/dialogs/qwizard.cpp
+++ b/src/widgets/dialogs/qwizard.cpp
@@ -3573,7 +3573,7 @@ bool QWizardPage::validatePage()
from the rest of your implementation, whenever the value of isComplete()
changes. This ensures that QWizard updates the enabled or disabled state of
its buttons. An example of the reimplementation is
- available \l{http://qt.nokia.com/doc/qq/qq22-qwizard.html#validatebeforeitstoolate}
+ available \l{http://doc.qt.digia.com/qq/qq22-qwizard.html#validatebeforeitstoolate}
{here}.
\sa completeChanged(), isFinalPage()
diff --git a/src/widgets/doc/snippets/macmainwindow.mm b/src/widgets/doc/snippets/macmainwindow.mm
new file mode 100755
index 0000000000..af21ee726a
--- /dev/null
+++ b/src/widgets/doc/snippets/macmainwindow.mm
@@ -0,0 +1,347 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** 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, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "macmainwindow.h"
+#import <Cocoa/Cocoa.h>
+#include <QtGui>
+
+
+#ifdef Q_WS_MAC
+
+#include <Carbon/Carbon.h>
+
+#ifdef QT_MAC_USE_COCOA
+
+//![0]
+SearchWidget::SearchWidget(QWidget *parent)
+ : QMacCocoaViewContainer(0, parent)
+{
+ // Many Cocoa objects create temporary autorelease objects,
+ // so create a pool to catch them.
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ // Create the NSSearchField, set it on the QCocoaViewContainer.
+ NSSearchField *search = [[NSSearchField alloc] init];
+ setCocoaView(search);
+
+ // Use a Qt menu for the search field menu.
+ QMenu *qtMenu = createMenu(this);
+ NSMenu *nsMenu = qtMenu->macMenu(0);
+ [[search cell] setSearchMenuTemplate:nsMenu];
+
+ // Release our reference, since our super class takes ownership and we
+ // don't need it anymore.
+ [search release];
+
+ // Clean up our pool as we no longer need it.
+ [pool release];
+}
+//![0]
+
+SearchWidget::~SearchWidget()
+{
+}
+
+QSize SearchWidget::sizeHint() const
+{
+ return QSize(150, 40);
+}
+
+#else
+
+// The SearchWidget class wraps a native HISearchField.
+SearchWidget::SearchWidget(QWidget *parent)
+ :QWidget(parent)
+{
+
+ // Create a native search field and pass its window id to QWidget::create.
+ searchFieldText = CFStringCreateWithCString(0, "search", 0);
+ HISearchFieldCreate(NULL/*bounds*/, kHISearchFieldAttributesSearchIcon | kHISearchFieldAttributesCancel,
+ NULL/*menu ref*/, searchFieldText, &searchField);
+ create(reinterpret_cast<WId>(searchField));
+
+ // Use a Qt menu for the search field menu.
+ QMenu *searchMenu = createMenu(this);
+ MenuRef menuRef = searchMenu->macMenu(0);
+ HISearchFieldSetSearchMenu(searchField, menuRef);
+ setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+}
+
+SearchWidget::~SearchWidget()
+{
+ CFRelease(searchField);
+ CFRelease(searchFieldText);
+}
+
+// Get the size hint from the search field.
+QSize SearchWidget::sizeHint() const
+{
+ EventRef event;
+ HIRect optimalBounds;
+ CreateEvent(0, kEventClassControl,
+ kEventControlGetOptimalBounds,
+ GetCurrentEventTime(),
+ kEventAttributeUserEvent, &event);
+
+ SendEventToEventTargetWithOptions(event,
+ HIObjectGetEventTarget(HIObjectRef(winId())),
+ kEventTargetDontPropagate);
+
+ GetEventParameter(event,
+ kEventParamControlOptimalBounds, typeHIRect,
+ 0, sizeof(HIRect), 0, &optimalBounds);
+
+ ReleaseEvent(event);
+ return QSize(optimalBounds.size.width + 100, // make it a bit wider.
+ optimalBounds.size.height);
+}
+
+#endif
+
+QMenu *createMenu(QWidget *parent)
+{
+ QMenu *searchMenu = new QMenu(parent);
+
+ QAction * indexAction = searchMenu->addAction("Index Search");
+ indexAction->setCheckable(true);
+ indexAction->setChecked(true);
+
+ QAction * fulltextAction = searchMenu->addAction("Full Text Search");
+ fulltextAction->setCheckable(true);
+
+ QActionGroup *searchActionGroup = new QActionGroup(parent);
+ searchActionGroup->addAction(indexAction);
+ searchActionGroup->addAction(fulltextAction);
+ searchActionGroup->setExclusive(true);
+
+ return searchMenu;
+}
+
+SearchWrapper::SearchWrapper(QWidget *parent)
+:QWidget(parent)
+{
+ s = new SearchWidget(this);
+ s->move(2,2);
+ setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+}
+
+QSize SearchWrapper::sizeHint() const
+{
+ return s->sizeHint() + QSize(6, 2);
+}
+
+Spacer::Spacer(QWidget *parent)
+:QWidget(parent)
+{
+ QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
+ setSizePolicy(sizePolicy);
+}
+
+QSize Spacer::sizeHint() const
+{
+ return QSize(1, 1);
+}
+
+MacSplitterHandle::MacSplitterHandle(Qt::Orientation orientation, QSplitter *parent)
+: QSplitterHandle(orientation, parent) { }
+
+// Paint the horizontal handle as a gradient, paint
+// the vertical handle as a line.
+void MacSplitterHandle::paintEvent(QPaintEvent *)
+{
+ QPainter painter(this);
+
+ QColor topColor(145, 145, 145);
+ QColor bottomColor(142, 142, 142);
+ QColor gradientStart(252, 252, 252);
+ QColor gradientStop(223, 223, 223);
+
+ if (orientation() == Qt::Vertical) {
+ painter.setPen(topColor);
+ painter.drawLine(0, 0, width(), 0);
+ painter.setPen(bottomColor);
+ painter.drawLine(0, height() - 1, width(), height() - 1);
+
+ QLinearGradient linearGrad(QPointF(0, 0), QPointF(0, height() -3));
+ linearGrad.setColorAt(0, gradientStart);
+ linearGrad.setColorAt(1, gradientStop);
+ painter.fillRect(QRect(QPoint(0,1), size() - QSize(0, 2)), QBrush(linearGrad));
+ } else {
+ painter.setPen(topColor);
+ painter.drawLine(0, 0, 0, height());
+ }
+}
+
+QSize MacSplitterHandle::sizeHint() const
+{
+ QSize parent = QSplitterHandle::sizeHint();
+ if (orientation() == Qt::Vertical) {
+ return parent + QSize(0, 3);
+ } else {
+ return QSize(1, parent.height());
+ }
+}
+
+QSplitterHandle *MacSplitter::createHandle()
+{
+ return new MacSplitterHandle(orientation(), this);
+}
+
+MacMainWindow::MacMainWindow()
+{
+ QSettings settings;
+ restoreGeometry(settings.value("Geometry").toByteArray());
+
+ setWindowTitle("Mac Main Window");
+
+ splitter = new MacSplitter();
+
+ // Set up the left-hand side blue side bar.
+ sidebar = new QTreeView();
+ sidebar->setFrameStyle(QFrame::NoFrame);
+ sidebar->setAttribute(Qt::WA_MacShowFocusRect, false);
+ sidebar->setAutoFillBackground(true);
+
+ // Set the palette.
+ QPalette palette = sidebar->palette();
+ QColor macSidebarColor(231, 237, 246);
+ QColor macSidebarHighlightColor(168, 183, 205);
+ palette.setColor(QPalette::Base, macSidebarColor);
+ palette.setColor(QPalette::Highlight, macSidebarHighlightColor);
+ sidebar->setPalette(palette);
+
+ sidebar->setModel(createItemModel());
+ sidebar->header()->hide();
+ sidebar->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ sidebar->setTextElideMode(Qt::ElideMiddle);
+
+ splitter->addWidget(sidebar);
+
+ horizontalSplitter = new MacSplitter();
+ horizontalSplitter->setOrientation(Qt::Vertical);
+ splitter->addWidget(horizontalSplitter);
+
+ splitter->setStretchFactor(0, 0);
+ splitter->setStretchFactor(1, 1);
+
+ // Set up the top document list view.
+ documents = new QListView();
+ documents->setFrameStyle(QFrame::NoFrame);
+ documents->setAttribute(Qt::WA_MacShowFocusRect, false);
+ documents->setModel(createDocumentModel());
+ documents->setAlternatingRowColors(true);
+ documents->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
+ horizontalSplitter->addWidget(documents);
+ horizontalSplitter->setStretchFactor(0, 0);
+
+ // Set up the text view.
+ textedit = new QTextEdit();
+ textedit->setFrameStyle(QFrame::NoFrame);
+ textedit->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
+ textedit->setText("<br><br><br><br><br><br><center><b>This demo shows how to create a \
+ Qt main window application that has the same appearance as other \
+ Mac OS X applications such as Mail or iTunes. This includes \
+ customizing the item views and QSplitter and wrapping native widgets \
+ such as the search field.</b></center>");
+
+ horizontalSplitter->addWidget(textedit);
+
+ setCentralWidget(splitter);
+
+ toolBar = addToolBar(tr("Search"));
+ toolBar->addWidget(new Spacer());
+ toolBar->addWidget(new SearchWrapper());
+
+ setUnifiedTitleAndToolBarOnMac(true);
+}
+
+MacMainWindow::~MacMainWindow()
+{
+ QSettings settings;
+ settings.setValue("Geometry", saveGeometry());
+}
+
+QAbstractItemModel *MacMainWindow::createItemModel()
+{
+ QStandardItemModel *model = new QStandardItemModel();
+ QStandardItem *parentItem = model->invisibleRootItem();
+
+ QStandardItem *documentationItem = new QStandardItem("Documentation");
+ parentItem->appendRow(documentationItem);
+
+ QStandardItem *assistantItem = new QStandardItem("Qt MainWindow Manual");
+ documentationItem->appendRow(assistantItem);
+
+ QStandardItem *designerItem = new QStandardItem("Qt Designer Manual");
+ documentationItem->appendRow(designerItem);
+
+ QStandardItem *qtItem = new QStandardItem("Qt Reference Documentation");
+ qtItem->appendRow(new QStandardItem("Classes"));
+ qtItem->appendRow(new QStandardItem("Overviews"));
+ qtItem->appendRow(new QStandardItem("Tutorial & Examples"));
+ documentationItem->appendRow(qtItem);
+
+ QStandardItem *bookmarksItem = new QStandardItem("Bookmarks");
+ parentItem->appendRow(bookmarksItem);
+ bookmarksItem->appendRow(new QStandardItem("QWidget"));
+ bookmarksItem->appendRow(new QStandardItem("QObject"));
+ bookmarksItem->appendRow(new QStandardItem("QWizard"));
+
+ return model;
+}
+
+void MacMainWindow::resizeEvent(QResizeEvent *)
+{
+ if (toolBar)
+ toolBar->updateGeometry();
+}
+
+QAbstractItemModel *MacMainWindow::createDocumentModel()
+{
+ QStandardItemModel *model = new QStandardItemModel();
+ QStandardItem *parentItem = model->invisibleRootItem();
+ parentItem->appendRow(new QStandardItem("QWidget Class Reference"));
+ parentItem->appendRow(new QStandardItem("QObject Class Reference"));
+ parentItem->appendRow(new QStandardItem("QListView Class Reference"));
+
+ return model;
+}
+
+#endif // Q_WS_MAC
diff --git a/src/widgets/doc/src/gestures.qdoc b/src/widgets/doc/src/gestures.qdoc
index cc0bc76ea3..027f893db2 100644
--- a/src/widgets/doc/src/gestures.qdoc
+++ b/src/widgets/doc/src/gestures.qdoc
@@ -68,7 +68,7 @@
required gesture type. The standard types are defined by the Qt::GestureType
enum and include many commonly used gestures.
- \snippet examples/gestures/imagegestures/imagewidget.cpp enable gestures
+ \snippet ../../../examples/gestures/imagegestures/imagewidget.cpp enable gestures
In the above code, the gestures are set up in the constructor of the target object
itself.
@@ -125,18 +125,18 @@
\l{QWidget::}{event()} handler function and delegates gesture events to a
specialized gestureEvent() function:
- \snippet examples/gestures/imagegestures/imagewidget.cpp event handler
+ \snippet ../../../examples/gestures/imagegestures/imagewidget.cpp event handler
The gesture events delivered to the target object can be examined individually
and dealt with appropriately:
- \snippet examples/gestures/imagegestures/imagewidget.cpp gesture event handler
+ \snippet ../../../examples/gestures/imagegestures/imagewidget.cpp gesture event handler
Responding to a gesture is simply a matter of obtaining the QGesture object
delivered in the QGestureEvent sent to the target object and examining the
information it contains.
- \snippet examples/gestures/imagegestures/imagewidget.cpp swipe function
+ \snippet ../../../examples/gestures/imagegestures/imagewidget.cpp swipe function
Here, we examine the direction in which the user swiped the widget and modify
its contents accordingly.
diff --git a/src/widgets/doc/src/modelview.qdoc b/src/widgets/doc/src/modelview.qdoc
index fac0be3b0a..97d1c72e85 100644
--- a/src/widgets/doc/src/modelview.qdoc
+++ b/src/widgets/doc/src/modelview.qdoc
@@ -576,7 +576,7 @@
problem.
Qt Labs provides software called
- \l{http://labs.qt.nokia.com/page/Projects/Itemview/Modeltest}{ModelTest},
+ \l{http://qt-project.org/wiki/Model_Test}{ModelTest},
which checks models while your programming is running. Every time the model
is changed, ModelTest scans the model and reports errors with an assert.
This is especially important for tree models, since their hierarchical
diff --git a/src/widgets/doc/src/widgets-and-layouts/layout.qdoc b/src/widgets/doc/src/widgets-and-layouts/layout.qdoc
index 5d7ed8be1d..b658fc809c 100644
--- a/src/widgets/doc/src/widgets-and-layouts/layout.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/layout.qdoc
@@ -249,7 +249,7 @@
For further guidance when implementing these functions, see the
\e{Qt Quarterly} article
- \l{http://doc.qt.nokia.com/qq/qq04-height-for-width.html}
+ \l{http://doc.qt.digia.com/qq/qq04-height-for-width.html}
{Trading Height for Width}.
diff --git a/src/widgets/kernel/qlayoutitem.cpp b/src/widgets/kernel/qlayoutitem.cpp
index 1323d2dceb..31276d015d 100644
--- a/src/widgets/kernel/qlayoutitem.cpp
+++ b/src/widgets/kernel/qlayoutitem.cpp
@@ -109,7 +109,7 @@ QSizePolicy::operator QVariant() const
be expressed using hasHeightForWidth(), heightForWidth(), and
minimumHeightForWidth(). For more explanation see the \e{Qt
Quarterly} article
- \l{http://qt.nokia.com/doc/qq/qq04-height-for-width.html}{Trading
+ \l{http://doc.qt.digia.com/qq/qq04-height-for-width.html}{Trading
Height for Width}.
\sa QLayout
diff --git a/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm b/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm
index 0f28854f5c..1eadb62d5c 100644
--- a/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm
+++ b/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm
@@ -85,7 +85,7 @@
developer to provide the autorelease pool.
The following is a snippet of subclassing QMacCocoaViewContainer to wrap a NSSearchField.
- \snippet widgets/mainwindows/macmainwindow/macmainwindow.mm 0
+ \snippet macmainwindow.mm 0
*/
diff --git a/src/widgets/widgets/qmacnativewidget_mac.mm b/src/widgets/widgets/qmacnativewidget_mac.mm
index 27ce9317ba..240bd6d92e 100644
--- a/src/widgets/widgets/qmacnativewidget_mac.mm
+++ b/src/widgets/widgets/qmacnativewidget_mac.mm
@@ -72,10 +72,6 @@
\snippet qmacnativewidget/main.mm 0
- On Carbon, this would do the equivalent:
-
- \snippet qmacnativewidget/main.mm 1
-
Note that QMacNativeWidget requires knowledge of Carbon or Cocoa. All it
does is get the Qt hierarchy into a window not owned by Qt. It is then up
to the programmer to ensure it is placed correctly in the window and
diff --git a/src/xml/doc/snippets/code/src_xml_dom_qdom.cpp b/src/xml/doc/snippets/code/src_xml_dom_qdom.cpp
index 367bd22bbe..6b7a9bfbce 100644
--- a/src/xml/doc/snippets/code/src_xml_dom_qdom.cpp
+++ b/src/xml/doc/snippets/code/src_xml_dom_qdom.cpp
@@ -108,7 +108,7 @@ QDomElement element4 = document.createElement("MyElement");
//! [7]
-<link href="http://qt.nokia.com" color="red" />
+<link href="http://qt-project.org" color="red" />
//! [7]
@@ -116,10 +116,10 @@ QDomElement element4 = document.createElement("MyElement");
QDomElement e = //...
//...
QDomAttr a = e.attributeNode("href");
-cout << a.value() << endl; // prints "http://qt.nokia.com"
-a.setValue("http://qt.nokia.com/doc"); // change the node's attribute
+cout << a.value() << endl; // prints "http://qt-project.org"
+a.setValue("http://qt-project.org/doc"); // change the node's attribute
QDomAttr a2 = e.attributeNode("href");
-cout << a2.value() << endl; // prints "http://qt.nokia.com/doc"
+cout << a2.value() << endl; // prints "http://qt-project.org/doc"
//! [8]
diff --git a/src/xml/doc/snippets/rsslisting/rsslisting.cpp b/src/xml/doc/snippets/rsslisting/listing.cpp
index c62212713c..c62212713c 100644
--- a/src/xml/doc/snippets/rsslisting/rsslisting.cpp
+++ b/src/xml/doc/snippets/rsslisting/listing.cpp
diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp
index 18673dd5e6..689c75774e 100644
--- a/src/xml/sax/qxml.cpp
+++ b/src/xml/sax/qxml.cpp
@@ -2365,7 +2365,7 @@ events are reported.
it we can use the same handler for both of the following
reader functions:
- \snippet rsslisting/rsslisting.cpp 0
+ \snippet rsslisting/listing.cpp 0
Since the reader will inform the handler of parsing errors, it is
necessary to reimplement QXmlErrorHandler::fatalError() if, for