summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/global/externalsites/qt-webpages.qdoc8
-rw-r--r--examples/widgets/doc/src/codeeditor.qdoc2
-rw-r--r--examples/widgets/doc/src/syntaxhighlighter.qdoc2
-rw-r--r--examples/widgets/widgets/stylesheet/mainwindow.cpp2
-rw-r--r--mkspecs/features/qt.prf6
-rw-r--r--mkspecs/win32-g++/qmake.conf1
-rw-r--r--qmake/doc/src/qmake-manual.qdoc2
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp4
-rw-r--r--qmake/generators/makefile.cpp135
-rw-r--r--qmake/generators/makefile.h7
-rw-r--r--qmake/generators/unix/unixmake.cpp137
-rw-r--r--qmake/generators/unix/unixmake.h3
-rw-r--r--qmake/generators/win32/mingw_make.cpp52
-rw-r--r--qmake/generators/win32/mingw_make.h2
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp2
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp2
-rw-r--r--qmake/generators/win32/winmakefile.cpp202
-rw-r--r--qmake/generators/win32/winmakefile.h5
-rw-r--r--qmake/meta.cpp8
-rw-r--r--qmake/meta.h11
-rw-r--r--src/corelib/doc/src/eventsandfilters.qdoc2
-rw-r--r--src/corelib/doc/src/objectmodel/metaobjects.qdoc2
-rw-r--r--src/corelib/doc/src/objectmodel/properties.qdoc2
-rw-r--r--src/corelib/global/qnamespace.qdoc6
-rw-r--r--src/corelib/plugin/qplugin.qdoc2
-rw-r--r--src/dbus/doc/src/qtdbus-module.qdoc2
-rw-r--r--src/gui/image/qpixmapcache.cpp2
-rw-r--r--src/tools/qdoc/doc/qdoc-manual-contextcmds.qdoc2
-rw-r--r--src/tools/qdoc/doc/qdoc-manual-qdocconf.qdoc6
-rw-r--r--src/tools/qdoc/doc/qdoc-manual-topiccmds.qdoc6
-rw-r--r--src/tools/qdoc/doc/qdoc-minimum-qdocconf.qdoc2
-rw-r--r--src/tools/qdoc/qdocdatabase.cpp6
-rw-r--r--src/tools/qdoc/qdocindexfiles.cpp38
-rw-r--r--src/widgets/dialogs/qwizard.cpp2
-rw-r--r--src/widgets/doc/src/qtwidgets-examples.qdoc2
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/layout.qdoc2
-rw-r--r--src/widgets/util/qsystemtrayicon.cpp2
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/externaltests.cpp1
-rw-r--r--tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp5
-rw-r--r--tools/configure/configureapp.cpp20
-rw-r--r--tools/configure/configureapp.h2
41 files changed, 316 insertions, 391 deletions
diff --git a/doc/global/externalsites/qt-webpages.qdoc b/doc/global/externalsites/qt-webpages.qdoc
index 386573e526..e70a441495 100644
--- a/doc/global/externalsites/qt-webpages.qdoc
+++ b/doc/global/externalsites/qt-webpages.qdoc
@@ -41,11 +41,11 @@
\title Qt Licensing Overview
*/
/*!
- \externalpage http://doc.qt.digia.com/qq/
+ \externalpage http://doc.qt.io/archives/qq/
\title Qt Quarterly
*/
/*!
- \externalpage http://doc.qt.digia.com/qq/qq19-plurals.html
+ \externalpage http://doc.qt.io/archives/qq/qq19-plurals.html
\title Qt Quarterly: Plural Form in Translation
*/
/*!
@@ -62,11 +62,11 @@
\title Qt Coding Style
*/
/*!
- \externalpage http://doc.qt.digia.com/qt-eclipse-1.6/index.html
+ \externalpage http://doc.qt.io/archives/qt-eclipse-1.6/index.html
\title Eclipse Plugin
*/
/*!
- \externalpage http://doc.qt.digia.com/qq/qq11-events.html
+ \externalpage http://doc.qt.io/archives/qq/qq11-events.html
\title Qt Quarterly: Another Look at Events
*/
/*!
diff --git a/examples/widgets/doc/src/codeeditor.qdoc b/examples/widgets/doc/src/codeeditor.qdoc
index 645854a58c..6c9e5921b8 100644
--- a/examples/widgets/doc/src/codeeditor.qdoc
+++ b/examples/widgets/doc/src/codeeditor.qdoc
@@ -192,6 +192,6 @@
fetched with QTextBlock::userData(). Matching parentheses can be
highlighted with an extra selection. The "Matching Parentheses
with QSyntaxHighlighter" article in Qt Quarterly 31 implements
- this. You find it here: \l{http://doc.qt.digia.com/qq/}.
+ this. You find it here: \l{http://doc.qt.io/archives/qq/}.
*/
diff --git a/examples/widgets/doc/src/syntaxhighlighter.qdoc b/examples/widgets/doc/src/syntaxhighlighter.qdoc
index 2b283afe5e..7d33299c81 100644
--- a/examples/widgets/doc/src/syntaxhighlighter.qdoc
+++ b/examples/widgets/doc/src/syntaxhighlighter.qdoc
@@ -248,7 +248,7 @@
It is possible to implement parenthesis matching with
QSyntaxHighlighter. The "Matching Parentheses with
QSyntaxHighlighter" article in Qt Quarterly 31
- (\l{http://doc.qt.digia.com/qq/}) implements this. We also have
+ (\l{http://doc.qt.io/archives/qq/}) implements this. We also have
the \l{Code Editor Example}, which shows how to implement line
numbers and how to highlight the current line.
diff --git a/examples/widgets/widgets/stylesheet/mainwindow.cpp b/examples/widgets/widgets/stylesheet/mainwindow.cpp
index a49c06dfd2..6d84897c77 100644
--- a/examples/widgets/widgets/stylesheet/mainwindow.cpp
+++ b/examples/widgets/widgets/stylesheet/mainwindow.cpp
@@ -67,7 +67,7 @@ void MainWindow::on_aboutAction_triggered()
{
QMessageBox::about(this, tr("About Style sheet"),
tr("The <b>Style Sheet</b> example shows how widgets can be styled "
- "using <a href=\"http://doc.qt.digia.com/4.5/stylesheet.html\">Qt "
+ "using <a href=\"http://doc.qt.io/qt-5/stylesheet.html\">Qt "
"Style Sheets</a>. Click <b>File|Edit Style Sheet</b> to pop up the "
"style editor, and either choose an existing style sheet or design "
"your own."));
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index a8d317a0e3..d416a8955a 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -119,12 +119,6 @@ for(ever) {
!mac|!contains(MODULE_CONFIG, lib_bundle): \
MODULE_NAME ~= s,^Qt,Qt$$QT_MAJOR_VERSION,
- win32 {
- # Make sure the version number isn't appended again to the lib name
- QMAKE_$${upper($$MODULE_NAME$$QT_LIBINFIX)}_VERSION_OVERRIDE = 0
- QMAKE_$${upper($$MODULE_NAME$$QT_LIBINFIX)}D_VERSION_OVERRIDE = 0
- }
-
isEmpty(LINKAGE) {
!isEmpty(MODULE_LIBS_ADD): \
LINKAGE = -L$$MODULE_LIBS_ADD
diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf
index 92bb8f4325..c00b4cd5ff 100644
--- a/mkspecs/win32-g++/qmake.conf
+++ b/mkspecs/win32-g++/qmake.conf
@@ -91,6 +91,7 @@ QMAKE_PREFIX_SHLIB =
QMAKE_EXTENSION_SHLIB = dll
QMAKE_PREFIX_STATICLIB = lib
QMAKE_EXTENSION_STATICLIB = a
+QMAKE_LIB_EXTENSIONS = a dll.a
QMAKE_LIBS =
QMAKE_LIBS_CORE = -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32
diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc
index da6ce337d2..cfa288da82 100644
--- a/qmake/doc/src/qmake-manual.qdoc
+++ b/qmake/doc/src/qmake-manual.qdoc
@@ -4466,7 +4466,7 @@
*/
/*!
- \target qmake-getting-started
+ \keyword qmake-getting-started
\page qmake-tutorial.html
\title Getting Started
\contentspage {qmake Manual}{Contents}
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index bfe9f08e77..219415ffdc 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -833,8 +833,8 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
encode the version number in the Project file which might be a bad
things in days to come? --Sam
*/
- QString lib_file = (*lit) + Option::dir_sep + lib;
- if(QMakeMetaInfo::libExists(lib_file)) {
+ QString lib_file = QMakeMetaInfo::findLib(Option::normalizePath((*lit) + Option::dir_sep + lib));
+ if (!lib_file.isEmpty()) {
QMakeMetaInfo libinfo(project);
if(libinfo.readLib(lib_file)) {
if(!libinfo.isEmpty("QMAKE_PRL_TARGET")) {
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 7d4026c292..c991a57c9d 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -252,10 +252,11 @@ MakefileGenerator::setProjectFile(QMakeProject *p)
else
target_mode = TARG_UNIX_MODE;
init();
- findLibraries();
- if(Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE &&
- project->isActiveConfig("link_prl")) //load up prl's'
- processPrlFiles();
+ bool linkPrl = (Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE)
+ && project->isActiveConfig("link_prl");
+ bool mergeLflags = !project->isActiveConfig("no_smart_library_merge")
+ && !project->isActiveConfig("no_lflags_merge");
+ findLibraries(linkPrl, mergeLflags);
}
ProStringList
@@ -871,65 +872,59 @@ MakefileGenerator::init()
bool
MakefileGenerator::processPrlFile(QString &file)
{
- bool ret = false, try_replace_file=false;
- QString meta_file, orig_file = file;
- if(QMakeMetaInfo::libExists(file)) {
+ bool try_replace_file = false;
+ QString f = fileFixify(file, FileFixifyBackwards);
+ QString meta_file = QMakeMetaInfo::findLib(f);
+ if (!meta_file.isEmpty()) {
try_replace_file = true;
- meta_file = file;
- file = "";
} else {
- QString tmp = file;
+ QString tmp = f;
int ext = tmp.lastIndexOf('.');
if(ext != -1)
tmp = tmp.left(ext);
- meta_file = tmp;
- }
-// meta_file = fileFixify(meta_file);
- QString real_meta_file = Option::normalizePath(meta_file);
- if(!meta_file.isEmpty()) {
- QString f = fileFixify(real_meta_file, FileFixifyBackwards);
- if(QMakeMetaInfo::libExists(f)) {
- QMakeMetaInfo libinfo(project);
- debug_msg(1, "Processing PRL file: %s", real_meta_file.toLatin1().constData());
- if(!libinfo.readLib(f)) {
- fprintf(stderr, "Error processing meta file: %s\n", real_meta_file.toLatin1().constData());
- } else if(project->isActiveConfig("no_read_prl_" + libinfo.type().toLower())) {
- debug_msg(2, "Ignored meta file %s [%s]", real_meta_file.toLatin1().constData(), libinfo.type().toLatin1().constData());
- } else {
- ret = true;
- project->values("QMAKE_CURRENT_PRL_LIBS") = libinfo.values("QMAKE_PRL_LIBS");
- ProStringList &defs = project->values("DEFINES");
- const ProStringList &prl_defs = project->values("PRL_EXPORT_DEFINES");
- foreach (const ProString &def, libinfo.values("QMAKE_PRL_DEFINES"))
- if (!defs.contains(def) && prl_defs.contains(def))
- defs.append(def);
- if(try_replace_file && !libinfo.isEmpty("QMAKE_PRL_TARGET")) {
- QString dir;
- int slsh = real_meta_file.lastIndexOf('/');
- if(slsh != -1)
- dir = real_meta_file.left(slsh+1);
- file = libinfo.first("QMAKE_PRL_TARGET").toQString();
- if(QDir::isRelativePath(file))
- file.prepend(dir);
- }
- }
- }
- if(ret) {
- QString mf = QMakeMetaInfo::findLib(meta_file);
- if(project->values("QMAKE_PRL_INTERNAL_FILES").indexOf(mf) == -1)
- project->values("QMAKE_PRL_INTERNAL_FILES").append(mf);
- if(project->values("QMAKE_INTERNAL_INCLUDED_FILES").indexOf(mf) == -1)
- project->values("QMAKE_INTERNAL_INCLUDED_FILES").append(mf);
- }
+ meta_file = QMakeMetaInfo::findLib(tmp);
}
- if(try_replace_file && file.isEmpty()) {
-#if 0
- warn_msg(WarnLogic, "Found prl [%s] file with no target [%s]!", meta_file.toLatin1().constData(),
- orig_file.toLatin1().constData());
-#endif
- file = orig_file;
+ if (meta_file.isEmpty())
+ return false;
+ QMakeMetaInfo libinfo(project);
+ debug_msg(1, "Processing PRL file: %s", meta_file.toLatin1().constData());
+ if (!libinfo.readLib(meta_file)) {
+ fprintf(stderr, "Error processing meta file %s\n", meta_file.toLatin1().constData());
+ return false;
}
- return ret;
+ if (project->isActiveConfig("no_read_prl_" + libinfo.type().toLower())) {
+ debug_msg(2, "Ignored meta file %s [%s]",
+ meta_file.toLatin1().constData(), libinfo.type().toLatin1().constData());
+ return false;
+ }
+ project->values("QMAKE_CURRENT_PRL_LIBS") = libinfo.values("QMAKE_PRL_LIBS");
+ ProStringList &defs = project->values("DEFINES");
+ const ProStringList &prl_defs = project->values("PRL_EXPORT_DEFINES");
+ foreach (const ProString &def, libinfo.values("QMAKE_PRL_DEFINES"))
+ if (!defs.contains(def) && prl_defs.contains(def))
+ defs.append(def);
+ if (try_replace_file) {
+ ProString tgt = libinfo.first("QMAKE_PRL_TARGET");
+ if (tgt.isEmpty()) {
+ fprintf(stderr, "Error: %s does not define QMAKE_PRL_TARGET\n",
+ meta_file.toLatin1().constData());
+ } else if (!tgt.contains('.')) {
+ fprintf(stderr, "Error: %s defines QMAKE_PRL_TARGET without extension\n",
+ meta_file.toLatin1().constData());
+ } else {
+ int off = qMax(file.lastIndexOf('/'), file.lastIndexOf('\\')) + 1;
+ debug_msg(1, " Replacing library reference %s with %s",
+ file.mid(off).toLatin1().constData(),
+ tgt.toQString().toLatin1().constData());
+ file.replace(off, 1000, tgt.toQString());
+ }
+ }
+ QString mf = fileFixify(meta_file);
+ if (!project->values("QMAKE_PRL_INTERNAL_FILES").contains(mf))
+ project->values("QMAKE_PRL_INTERNAL_FILES").append(mf);
+ if (!project->values("QMAKE_INTERNAL_INCLUDED_FILES").contains(mf))
+ project->values("QMAKE_INTERNAL_INCLUDED_FILES").append(mf);
+ return true;
}
void
@@ -944,12 +939,6 @@ MakefileGenerator::filterIncludedFiles(const char *var)
}
}
-void
-MakefileGenerator::processPrlFiles()
-{
- qFatal("MakefileGenerator::processPrlFiles() called!");
-}
-
static QString
qv(const ProString &val)
{
@@ -968,10 +957,6 @@ qv(const ProStringList &val)
void
MakefileGenerator::writePrlFile(QTextStream &t)
{
- ProString target = project->first("TARGET");
- int slsh = target.lastIndexOf(Option::dir_sep);
- if(slsh != -1)
- target.chopFront(slsh + 1);
QString bdir = Option::output_dir;
if(bdir.isEmpty())
bdir = qmake_getpwd();
@@ -981,7 +966,7 @@ MakefileGenerator::writePrlFile(QTextStream &t)
if(!project->isEmpty("QMAKE_ABSOLUTE_SOURCE_PATH"))
t << "QMAKE_PRL_SOURCE_DIR =" << qv(project->first("QMAKE_ABSOLUTE_SOURCE_PATH")) << endl;
- t << "QMAKE_PRL_TARGET =" << qv(target) << endl;
+ t << "QMAKE_PRL_TARGET =" << qv(project->first("LIB_TARGET")) << endl;
if(!project->isEmpty("PRL_EXPORT_DEFINES"))
t << "QMAKE_PRL_DEFINES =" << qv(project->values("PRL_EXPORT_DEFINES")) << endl;
if(!project->isEmpty("PRL_EXPORT_CFLAGS"))
@@ -2744,6 +2729,22 @@ MakefileGenerator::fileInfo(QString file) const
return fi;
}
+MakefileGenerator::LibFlagType
+MakefileGenerator::parseLibFlag(const ProString &flag, ProString *arg)
+{
+ if (flag.startsWith("-L")) {
+ *arg = flag.mid(2);
+ return LibFlagPath;
+ }
+ if (flag.startsWith("-l")) {
+ *arg = flag.mid(2);
+ return LibFlagLib;
+ }
+ if (flag.startsWith('-'))
+ return LibFlagOther;
+ return LibFlagFile;
+}
+
ProStringList
MakefileGenerator::fixLibFlags(const ProKey &var)
{
diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h
index 07483dbcb0..61b8f9ac60 100644
--- a/qmake/generators/makefile.h
+++ b/qmake/generators/makefile.h
@@ -197,11 +197,10 @@ protected:
QString prlFileName(bool fixify=true);
void writePrlFile();
bool processPrlFile(QString &);
- virtual void processPrlFiles();
virtual void writePrlFile(QTextStream &);
//make sure libraries are found
- virtual bool findLibraries();
+ virtual bool findLibraries(bool linkPrl, bool mergeLflags);
//for retrieving values and lists of values
virtual QString var(const ProKey &var) const;
@@ -221,6 +220,8 @@ protected:
QString filePrefixRoot(const QString &, const QString &);
+ enum LibFlagType { LibFlagLib, LibFlagPath, LibFlagFile, LibFlagOther };
+ virtual LibFlagType parseLibFlag(const ProString &flag, ProString *arg);
ProStringList fixLibFlags(const ProKey &var);
virtual ProString fixLibFlag(const ProString &lib);
@@ -276,7 +277,7 @@ inline bool MakefileGenerator::noIO() const
inline QString MakefileGenerator::defaultInstall(const QString &)
{ return QString(""); }
-inline bool MakefileGenerator::findLibraries()
+inline bool MakefileGenerator::findLibraries(bool, bool)
{ return true; }
inline MakefileGenerator::~MakefileGenerator()
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index 25f686646b..b44d7f032a 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -275,6 +275,11 @@ UnixMakefileGenerator::init()
init2();
project->values("QMAKE_INTERNAL_PRL_LIBS") << "QMAKE_LIBS";
+ ProString target = project->first("TARGET");
+ int slsh = target.lastIndexOf(Option::dir_sep);
+ if (slsh != -1)
+ target.chopFront(slsh + 1);
+ project->values("LIB_TARGET").prepend(target);
if(!project->isEmpty("QMAKE_MAX_FILES_PER_AR")) {
bool ok;
int max_files = project->first("QMAKE_MAX_FILES_PER_AR").toInt(&ok);
@@ -375,12 +380,14 @@ UnixMakefileGenerator::fixLibFlag(const ProString &lib)
}
bool
-UnixMakefileGenerator::findLibraries()
+UnixMakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
{
- QList<QMakeLocalFileName> libdirs;
- int libidx = 0;
+ QList<QMakeLocalFileName> libdirs, frameworkdirs;
+ int libidx = 0, fwidx = 0;
foreach (const ProString &dlib, project->values("QMAKE_DEFAULT_LIBDIRS"))
libdirs.append(QMakeLocalFileName(dlib.toQString()));
+ frameworkdirs.append(QMakeLocalFileName("/System/Library/Frameworks"));
+ frameworkdirs.append(QMakeLocalFileName("/Library/Frameworks"));
static const char * const lflags[] = { "QMAKE_LIBS", "QMAKE_LIBS_PRIVATE", 0 };
for (int i = 0; lflags[i]; i++) {
ProStringList &l = project->values(lflags[i]);
@@ -398,94 +405,58 @@ UnixMakefileGenerator::findLibraries()
libdirs.insert(libidx++, f);
} else if(opt.startsWith("-l")) {
QString lib = opt.mid(2);
- bool found = false;
ProStringList extens;
extens << project->first("QMAKE_EXTENSION_SHLIB") << "a";
- for (ProStringList::Iterator extit = extens.begin(); extit != extens.end(); ++extit) {
- for (QList<QMakeLocalFileName>::Iterator dep_it = libdirs.begin();
- dep_it != libdirs.end(); ++dep_it) {
- QString pathToLib = ((*dep_it).local() + '/'
- + project->first("QMAKE_PREFIX_SHLIB")
- + lib + '.' + (*extit));
- if (exists(pathToLib)) {
- found = true;
- break;
- }
+ for (QList<QMakeLocalFileName>::Iterator dep_it = libdirs.begin();
+ dep_it != libdirs.end(); ++dep_it) {
+ QString libBase = (*dep_it).local() + '/'
+ + project->first("QMAKE_PREFIX_SHLIB") + lib;
+ if (linkPrl && processPrlFile(libBase))
+ goto found;
+ for (ProStringList::Iterator extit = extens.begin(); extit != extens.end(); ++extit) {
+ if (exists(libBase + '.' + (*extit)))
+ goto found;
}
}
- } else if (target_mode == TARG_MAC_MODE && opt.startsWith("-framework")) {
- if (opt.length() == 10)
- ++it;
- // Skip
- }
- }
- ++it;
- }
- }
- return false;
-}
-
-void
-UnixMakefileGenerator::processPrlFiles()
-{
- QList<QMakeLocalFileName> libdirs, frameworkdirs;
- int libidx = 0, fwidx = 0;
- foreach (const ProString &dlib, project->values("QMAKE_DEFAULT_LIBDIRS"))
- libdirs.append(QMakeLocalFileName(dlib.toQString()));
- frameworkdirs.append(QMakeLocalFileName("/System/Library/Frameworks"));
- frameworkdirs.append(QMakeLocalFileName("/Library/Frameworks"));
- static const char * const lflags[] = { "QMAKE_LIBS", "QMAKE_LIBS_PRIVATE", 0 };
- for (int i = 0; lflags[i]; i++) {
- ProStringList &l = project->values(lflags[i]);
- for(int lit = 0; lit < l.size(); ++lit) {
- QString opt = l.at(lit).toQString();
- if(opt.startsWith("-")) {
- if (opt.startsWith("-L")) {
- QMakeLocalFileName l(opt.mid(2));
- if(!libdirs.contains(l))
- libdirs.insert(libidx++, l);
- } else if(opt.startsWith("-l")) {
- QString lib = opt.right(opt.length() - 2);
- for(int dep_i = 0; dep_i < libdirs.size(); ++dep_i) {
- QString prl = libdirs[dep_i].local() + '/'
- + project->first("QMAKE_PREFIX_SHLIB") + lib;
- if (processPrlFile(prl))
- break;
- }
+ found: ;
} else if (target_mode == TARG_MAC_MODE && opt.startsWith("-F")) {
- QMakeLocalFileName f(opt.right(opt.length()-2));
- if(!frameworkdirs.contains(f))
+ QMakeLocalFileName f(opt.mid(2));
+ if (!frameworkdirs.contains(f))
frameworkdirs.insert(fwidx++, f);
} else if (target_mode == TARG_MAC_MODE && opt.startsWith("-framework")) {
- if(opt.length() > 11)
- opt = opt.mid(11).trimmed();
- else
- opt = l.at(++lit).toQString();
- foreach (const QMakeLocalFileName &dir, frameworkdirs) {
- QString prl = dir.local() + "/" + opt + ".framework/" + opt + Option::prl_ext;
- if(processPrlFile(prl))
- break;
+ if (linkPrl) {
+ if (opt.length() == 10)
+ opt = (*++it).toQString();
+ else
+ opt = opt.mid(10).trimmed();
+ foreach (const QMakeLocalFileName &dir, frameworkdirs) {
+ QString prl = dir.local() + "/" + opt + ".framework/" + opt + Option::prl_ext;
+ if (processPrlFile(prl))
+ break;
+ }
+ } else {
+ if (opt.length() == 10)
+ ++it;
+ // Skip
}
}
- } else if(!opt.isNull()) {
+ } else if (linkPrl) {
processPrlFile(opt);
}
ProStringList &prl_libs = project->values("QMAKE_CURRENT_PRL_LIBS");
- if(!prl_libs.isEmpty()) {
- for(int prl = 0; prl < prl_libs.size(); ++prl)
- l.insert(++lit, prl_libs.at(prl));
- prl_libs.clear();
- }
+ for (int prl = 0; prl < prl_libs.size(); ++prl)
+ it = l.insert(++it, prl_libs.at(prl));
+ prl_libs.clear();
+ ++it;
}
- //merge them into a logical order
- if(!project->isActiveConfig("no_smart_library_merge") && !project->isActiveConfig("no_lflags_merge")) {
+ if (mergeLflags) {
QHash<ProKey, ProStringList> lflags;
for(int lit = 0; lit < l.size(); ++lit) {
ProKey arch("default");
ProString opt = l.at(lit);
- if(opt.startsWith("-")) {
+ if (opt.startsWith('-')) {
if (target_mode == TARG_MAC_MODE && opt.startsWith("-Xarch")) {
if (opt.length() > 7) {
arch = opt.mid(7).toKey();
@@ -493,21 +464,20 @@ UnixMakefileGenerator::processPrlFiles()
}
}
- if (opt.startsWith("-L") ||
- (target_mode == TARG_MAC_MODE && opt.startsWith("-F"))) {
- if(!lflags[arch].contains(opt))
+ if (opt.startsWith("-L")
+ || (target_mode == TARG_MAC_MODE && opt.startsWith("-F"))) {
+ if (!lflags[arch].contains(opt))
lflags[arch].append(opt);
- } else if(opt.startsWith("-l") || opt == "-pthread") {
- // Make sure we keep the dependency-order of libraries
- if (lflags[arch].contains(opt))
- lflags[arch].removeAll(opt);
+ } else if (opt.startsWith("-l") || opt == "-pthread") {
+ // Make sure we keep the dependency order of libraries
+ lflags[arch].removeAll(opt);
lflags[arch].append(opt);
} else if (target_mode == TARG_MAC_MODE && opt.startsWith("-framework")) {
- if(opt.length() > 11)
- opt = opt.mid(11);
- else {
+ if (opt.length() > 10) {
+ opt = opt.mid(10).trimmed();
+ } else {
opt = l.at(++lit);
- if (target_mode == TARG_MAC_MODE && opt.startsWith("-Xarch"))
+ if (opt.startsWith("-Xarch"))
opt = l.at(++lit); // The user has done the right thing and prefixed each part
}
bool found = false;
@@ -544,6 +514,7 @@ UnixMakefileGenerator::processPrlFiles()
}
}
}
+ return false;
}
QString
diff --git a/qmake/generators/unix/unixmake.h b/qmake/generators/unix/unixmake.h
index b136ea04d0..db3f59f517 100644
--- a/qmake/generators/unix/unixmake.h
+++ b/qmake/generators/unix/unixmake.h
@@ -54,9 +54,8 @@ protected:
virtual bool doDepends() const { return !Option::mkfile::do_stub_makefile && MakefileGenerator::doDepends(); }
virtual QString defaultInstall(const QString &);
virtual ProString fixLibFlag(const ProString &lib);
- virtual void processPrlFiles();
- virtual bool findLibraries();
+ virtual bool findLibraries(bool linkPrl, bool mergeLflags);
virtual QString escapeFilePath(const QString &path) const;
ProString escapeFilePath(const ProString &path) const { return MakefileGenerator::escapeFilePath(path); }
virtual QStringList &findDependencies(const QString &);
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
index 506aff5c6f..97bfef88a4 100644
--- a/qmake/generators/win32/mingw_make.cpp
+++ b/qmake/generators/win32/mingw_make.cpp
@@ -33,7 +33,6 @@
#include "mingw_make.h"
#include "option.h"
-#include "meta.h"
#include <proitems.h>
@@ -63,46 +62,21 @@ QString MingwMakefileGenerator::getManifestFileForRcFile() const
ProString MingwMakefileGenerator::fixLibFlag(const ProString &lib)
{
- if (lib.startsWith("lib"))
- return QStringLiteral("-l") + escapeFilePath(lib.mid(3));
- return escapeFilePath(lib);
+ if (lib.startsWith("-l")) // Fallback for unresolved -l libs.
+ return QLatin1String("-l") + escapeFilePath(lib.mid(2));
+ if (lib.startsWith("-L")) // Lib search path. Needed only by -l above.
+ return QLatin1String("-L")
+ + escapeFilePath(Option::fixPathToTargetOS(lib.mid(2).toQString(), false));
+ if (lib.startsWith("lib")) // Fallback for unresolved MSVC-style libs.
+ return QLatin1String("-l") + escapeFilePath(lib.mid(3).toQString());
+ return escapeFilePath(Option::fixPathToTargetOS(lib.toQString(), false));
}
-bool MingwMakefileGenerator::findLibraries()
+MakefileGenerator::LibFlagType
+MingwMakefileGenerator::parseLibFlag(const ProString &flag, ProString *arg)
{
- QList<QMakeLocalFileName> dirs;
- static const char * const lflags[] = { "QMAKE_LIBS", "QMAKE_LIBS_PRIVATE", 0 };
- for (int i = 0; lflags[i]; i++) {
- ProStringList &l = project->values(lflags[i]);
- ProStringList::Iterator it = l.begin();
- while (it != l.end()) {
- if ((*it).startsWith("-l")) {
- QString steam = (*it).mid(2).toQString();
- ProString out;
- for (QList<QMakeLocalFileName>::Iterator dir_it = dirs.begin(); dir_it != dirs.end(); ++dir_it) {
- QString extension;
- int ver = findHighestVersion((*dir_it).local(), steam);
- if (ver > 0)
- extension += QString::number(ver);
- if (QMakeMetaInfo::libExists((*dir_it).local() + '/' + steam)
- || exists((*dir_it).local() + '/' + steam + extension + ".a")
- || exists((*dir_it).local() + '/' + steam + extension + ".dll.a")) {
- out = *it + extension;
- break;
- }
- }
- if (!out.isEmpty()) // We assume if it never finds it that its correct
- (*it) = out;
- } else if ((*it).startsWith("-L")) {
- QMakeLocalFileName f((*it).mid(2).toQString());
- dirs.append(f);
- *it = "-L" + f.real();
- }
-
- ++it;
- }
- }
- return true;
+ // Skip MSVC handling from Win32MakefileGenerator
+ return MakefileGenerator::parseLibFlag(flag, arg);
}
bool MingwMakefileGenerator::writeMakefile(QTextStream &t)
@@ -213,8 +187,6 @@ void MingwMakefileGenerator::init()
project->values("TARGET_PRL").append(project->first("TARGET"));
- project->values("QMAKE_L_FLAG") << "-L";
-
processVars();
project->values("QMAKE_LIBS") += project->values("RES_FILE");
diff --git a/qmake/generators/win32/mingw_make.h b/qmake/generators/win32/mingw_make.h
index 73018319bc..4e94a23ae2 100644
--- a/qmake/generators/win32/mingw_make.h
+++ b/qmake/generators/win32/mingw_make.h
@@ -62,7 +62,7 @@ private:
QString preCompHeaderOut;
- virtual bool findLibraries();
+ virtual LibFlagType parseLibFlag(const ProString &flag, ProString *arg);
QString objectsLinkLine;
};
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index 9c34b187bf..31a9c53c90 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -368,8 +368,6 @@ void NmakeMakefileGenerator::init()
return;
}
- project->values("QMAKE_L_FLAG") << "/LIBPATH:";
-
processVars();
project->values("QMAKE_LIBS") += project->values("RES_FILE");
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index 7a695d8605..b1e0745e03 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -810,8 +810,6 @@ void VcprojGenerator::init()
else if (project->first("TEMPLATE") == "vclib")
project->values("QMAKE_LIB_FLAG").append("1");
- project->values("QMAKE_L_FLAG") << "/LIBPATH:";
-
processVars();
// set /VERSION for EXE/DLL header
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index 3d511ea7e8..e6bf3388fa 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -49,151 +49,125 @@ Win32MakefileGenerator::Win32MakefileGenerator() : MakefileGenerator()
{
}
-int
-Win32MakefileGenerator::findHighestVersion(const QString &d, const QString &stem)
-{
- QString bd = Option::normalizePath(d);
- if(!exists(bd))
- return -1;
-
- QMakeMetaInfo libinfo(project);
- bool libInfoRead = libinfo.readLib(bd + '/' + stem);
-
- // If the library, for which we're trying to find the highest version
- // number, is a static library
- if (libInfoRead && libinfo.values("QMAKE_PRL_CONFIG").contains("staticlib"))
- return -1;
-
- const ProStringList &vover = project->values(ProKey("QMAKE_" + stem.toUpper() + "_VERSION_OVERRIDE"));
- if (!vover.isEmpty())
- return vover.first().toInt();
-
- int biggest=-1;
- if(libInfoRead
- && !libinfo.values("QMAKE_PRL_CONFIG").contains("staticlib")
- && !libinfo.isEmpty("QMAKE_PRL_VERSION"))
- biggest = libinfo.first("QMAKE_PRL_VERSION").toQString().replace(".", "").toInt();
- return biggest;
-}
-
ProString Win32MakefileGenerator::fixLibFlag(const ProString &lib)
{
- if (lib.startsWith("/LIBPATH:"))
+ if (lib.startsWith("-l")) // Fallback for unresolved -l libs.
+ return escapeFilePath(lib.mid(2) + QLatin1String(".lib"));
+ if (lib.startsWith("-L")) // Lib search path. Needed only by -l above.
return QLatin1String("/LIBPATH:")
- + escapeFilePath(Option::fixPathToTargetOS(lib.mid(9).toQString(), false));
-
- // This must be a fully resolved library path.
+ + escapeFilePath(Option::fixPathToTargetOS(lib.mid(2).toQString(), false));
return escapeFilePath(Option::fixPathToTargetOS(lib.toQString(), false));
}
+MakefileGenerator::LibFlagType
+Win32MakefileGenerator::parseLibFlag(const ProString &flag, ProString *arg)
+{
+ LibFlagType ret = MakefileGenerator::parseLibFlag(flag, arg);
+ if (ret != LibFlagFile)
+ return ret;
+ // MSVC compatibility. This should be deprecated.
+ if (flag.startsWith("/LIBPATH:")) {
+ *arg = flag.mid(9);
+ return LibFlagPath;
+ }
+ // These are pure qmake inventions. They *really* should be deprecated.
+ if (flag.startsWith("/L")) {
+ *arg = flag.mid(2);
+ return LibFlagPath;
+ }
+ if (flag.startsWith("/l")) {
+ *arg = flag.mid(2);
+ return LibFlagLib;
+ }
+ return LibFlagFile;
+}
+
bool
-Win32MakefileGenerator::findLibraries()
+Win32MakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
{
+ ProStringList impexts = project->values("QMAKE_LIB_EXTENSIONS");
+ if (impexts.isEmpty())
+ impexts = project->values("QMAKE_EXTENSION_STATICLIB");
QList<QMakeLocalFileName> dirs;
static const char * const lflags[] = { "QMAKE_LIBS", "QMAKE_LIBS_PRIVATE", 0 };
for (int i = 0; lflags[i]; i++) {
ProStringList &l = project->values(lflags[i]);
for (ProStringList::Iterator it = l.begin(); it != l.end();) {
- QString opt = (*it).toQString();
- if(opt.startsWith("/LIBPATH:")) {
- QString libpath = opt.mid(9);
- QMakeLocalFileName lp(libpath);
+ const ProString &opt = *it;
+ ProString arg;
+ LibFlagType type = parseLibFlag(opt, &arg);
+ if (type == LibFlagPath) {
+ QMakeLocalFileName lp(arg.toQString());
if (dirs.contains(lp)) {
it = l.erase(it);
continue;
}
dirs.append(lp);
- (*it) = "/LIBPATH:" + lp.real();
- } else if(opt.startsWith("-L") || opt.startsWith("/L")) {
- QString libpath = Option::fixPathToTargetOS(opt.mid(2), false, false);
- QMakeLocalFileName lp(libpath);
- if (dirs.contains(lp)) {
- it = l.erase(it);
- continue;
+ (*it) = "-L" + lp.real();
+ } else if (type == LibFlagLib) {
+ QString lib = arg.toQString();
+ ProString verovr =
+ project->first(ProKey("QMAKE_" + lib.toUpper() + "_VERSION_OVERRIDE"));
+ for (QList<QMakeLocalFileName>::Iterator dir_it = dirs.begin();
+ dir_it != dirs.end(); ++dir_it) {
+ QString cand = (*dir_it).real() + Option::dir_sep + lib;
+ if (linkPrl && processPrlFile(cand)) {
+ (*it) = cand;
+ goto found;
+ }
+ QString libBase = (*dir_it).local() + '/' + lib + verovr;
+ for (ProStringList::ConstIterator extit = impexts.begin();
+ extit != impexts.end(); ++extit) {
+ if (exists(libBase + '.' + *extit)) {
+ (*it) = cand + verovr + '.' + *extit;
+ goto found;
+ }
+ }
}
- dirs.append(lp);
- (*it) = "/LIBPATH:" + lp.real();
- } else if(opt.startsWith("-l") || opt.startsWith("/l")) {
- QString lib = opt.right(opt.length() - 2), out;
- if(!lib.isEmpty()) {
- for(QList<QMakeLocalFileName>::Iterator it = dirs.begin();
- it != dirs.end(); ++it) {
- QString extension;
- int ver = findHighestVersion((*it).local(), lib);
- if(ver > 0)
- extension += QString::number(ver);
- extension += ".lib";
- if (QMakeMetaInfo::libExists((*it).local() + '/' + lib)
- || exists((*it).local() + '/' + lib + extension)) {
- out = (*it).real() + Option::dir_sep + lib + extension;
+ // We assume if it never finds it that it's correct
+ found: ;
+ } else if (linkPrl && type == LibFlagFile) {
+ QString lib = opt.toQString();
+ if (fileInfo(lib).isAbsolute()) {
+ if (processPrlFile(lib))
+ (*it) = lib;
+ } else {
+ for (QList<QMakeLocalFileName>::Iterator dir_it = dirs.begin();
+ dir_it != dirs.end(); ++dir_it) {
+ QString cand = (*dir_it).real() + Option::dir_sep + lib;
+ if (processPrlFile(cand)) {
+ (*it) = cand;
break;
}
}
}
- if(out.isEmpty())
- out = lib + ".lib";
- (*it) = out;
}
+
+ ProStringList &prl_libs = project->values("QMAKE_CURRENT_PRL_LIBS");
+ for (int prl = 0; prl < prl_libs.size(); ++prl)
+ it = l.insert(++it, prl_libs.at(prl));
+ prl_libs.clear();
++it;
}
- }
- return true;
-}
-
-void
-Win32MakefileGenerator::processPrlFiles()
-{
- const QString libArg = project->first("QMAKE_L_FLAG").toQString();
- QList<QMakeLocalFileName> libdirs;
- static const char * const lflags[] = { "QMAKE_LIBS", "QMAKE_LIBS_PRIVATE", 0 };
- for (int i = 0; lflags[i]; i++) {
- ProStringList &l = project->values(lflags[i]);
+ if (mergeLflags) {
+ ProStringList lopts;
for (int lit = 0; lit < l.size(); ++lit) {
- QString opt = l.at(lit).toQString();
- if (opt.startsWith(libArg)) {
- QMakeLocalFileName l(opt.mid(libArg.length()));
- if (!libdirs.contains(l))
- libdirs.append(l);
+ ProString opt = l.at(lit);
+ if (opt.startsWith(QLatin1String("-L"))) {
+ if (!lopts.contains(opt))
+ lopts.append(opt);
} else {
- if (!processPrlFile(opt) && (QDir::isRelativePath(opt) || opt.startsWith("-l"))) {
- QString tmp;
- if (opt.startsWith("-l"))
- tmp = opt.mid(2);
- else
- tmp = opt;
- for(QList<QMakeLocalFileName>::Iterator it = libdirs.begin(); it != libdirs.end(); ++it) {
- QString prl = (*it).local() + '/' + tmp;
- if (processPrlFile(prl))
- break;
- }
- }
- }
- ProStringList &prl_libs = project->values("QMAKE_CURRENT_PRL_LIBS");
- for (int prl = 0; prl < prl_libs.size(); ++prl)
- l.insert(++lit, prl_libs.at(prl));
- prl_libs.clear();
- }
-
- // Merge them into a logical order
- if (!project->isActiveConfig("no_smart_library_merge") && !project->isActiveConfig("no_lflags_merge")) {
- ProStringList lflags;
- for (int lit = 0; lit < l.size(); ++lit) {
- ProString opt = l.at(lit);
- if (opt.startsWith(libArg)) {
- if (!lflags.contains(opt))
- lflags.append(opt);
- } else {
- // Make sure we keep the dependency-order of libraries
- lflags.removeAll(opt);
- lflags.append(opt);
- }
+ // Make sure we keep the dependency order of libraries
+ lopts.removeAll(opt);
+ lopts.append(opt);
}
- l = lflags;
}
+ l = lopts;
}
+ }
+ return true;
}
-
void Win32MakefileGenerator::processVars()
{
project->values("QMAKE_ORIG_TARGET") = project->values("TARGET");
@@ -222,7 +196,6 @@ void Win32MakefileGenerator::processVars()
fixTargetExt();
processRcFileVar();
- ProString libArg = project->first("QMAKE_L_FLAG");
ProStringList libs;
ProStringList &libDir = project->values("QMAKE_LIBDIR");
for (ProStringList::Iterator libDir_it = libDir.begin(); libDir_it != libDir.end(); ++libDir_it) {
@@ -230,7 +203,7 @@ void Win32MakefileGenerator::processVars()
if (!lib.isEmpty()) {
if (lib.endsWith('\\'))
lib.chop(1);
- libs << libArg + Option::fixPathToTargetOS(lib, false, false);
+ libs << QLatin1String("-L") + lib;
}
}
project->values("QMAKE_LIBS") += libs + project->values("LIBS");
@@ -269,6 +242,7 @@ void Win32MakefileGenerator::fixTargetExt()
} else {
project->values("TARGET_EXT").append("." + project->first("QMAKE_EXTENSION_STATICLIB"));
project->values("TARGET").first() = project->first("QMAKE_PREFIX_STATICLIB") + project->first("TARGET");
+ project->values("LIB_TARGET").prepend(project->first("TARGET") + project->first("TARGET_EXT")); // for the .prl only
}
}
diff --git a/qmake/generators/win32/winmakefile.h b/qmake/generators/win32/winmakefile.h
index 25b555ec86..54c4d3be53 100644
--- a/qmake/generators/win32/winmakefile.h
+++ b/qmake/generators/win32/winmakefile.h
@@ -57,12 +57,11 @@ protected:
virtual void writeRcFilePart(QTextStream &t);
- int findHighestVersion(const QString &dir, const QString &stem);
- virtual bool findLibraries();
+ virtual bool findLibraries(bool linkPrl, bool mergeLflags);
+ virtual LibFlagType parseLibFlag(const ProString &flag, ProString *arg);
virtual ProString fixLibFlag(const ProString &lib);
- virtual void processPrlFiles();
void processVars();
void fixTargetExt();
void processRcFileVar();
diff --git a/qmake/meta.cpp b/qmake/meta.cpp
index 73414df73e..719b2c060f 100644
--- a/qmake/meta.cpp
+++ b/qmake/meta.cpp
@@ -48,10 +48,8 @@ QMakeMetaInfo::QMakeMetaInfo(QMakeProject *_conf)
bool
-QMakeMetaInfo::readLib(QString lib)
+QMakeMetaInfo::readLib(const QString &meta_file)
{
- QString meta_file = findLib(lib);
-
if(cache_vars.contains(meta_file)) {
vars = cache_vars[meta_file];
return true;
@@ -84,10 +82,8 @@ QMakeMetaInfo::readLib(QString lib)
QString
-QMakeMetaInfo::findLib(QString lib)
+QMakeMetaInfo::findLib(const QString &lib)
{
- lib = Option::normalizePath(lib);
-
QString ret;
QString extns[] = { Option::prl_ext, /*Option::pkgcfg_ext, Option::libtool_ext,*/ QString() };
for(int extn = 0; !extns[extn].isNull(); extn++) {
diff --git a/qmake/meta.h b/qmake/meta.h
index a1a30fbfa8..7c91ffda44 100644
--- a/qmake/meta.h
+++ b/qmake/meta.h
@@ -55,11 +55,11 @@ class QMakeMetaInfo
public:
QMakeMetaInfo(QMakeProject *_conf);
- bool readLib(QString lib);
- static QString findLib(QString lib);
- static bool libExists(QString lib);
- QString type() const;
+ // These functions expect the path to be normalized
+ static QString findLib(const QString &lib);
+ bool readLib(const QString &meta_file);
+ QString type() const;
bool isEmpty(const ProKey &v);
ProStringList &values(const ProKey &v);
ProString first(const ProKey &v);
@@ -91,9 +91,6 @@ inline ProString QMakeMetaInfo::first(const ProKey &v)
inline ProValueMap &QMakeMetaInfo::variables()
{ return vars; }
-inline bool QMakeMetaInfo::libExists(QString lib)
-{ return !findLib(lib).isNull(); }
-
QT_END_NAMESPACE
#endif // META_H
diff --git a/src/corelib/doc/src/eventsandfilters.qdoc b/src/corelib/doc/src/eventsandfilters.qdoc
index a4710eb288..99a40bb1b8 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.digia.com/qq/qq11-events.html}{Another Look at Events}
+ \l{http://doc.qt.io/archives/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/objectmodel/metaobjects.qdoc b/src/corelib/doc/src/objectmodel/metaobjects.qdoc
index a482c5cc8b..52c134c517 100644
--- a/src/corelib/doc/src/objectmodel/metaobjects.qdoc
+++ b/src/corelib/doc/src/objectmodel/metaobjects.qdoc
@@ -32,7 +32,7 @@
\ingroup qt-basic-concepts
\keyword meta-object
- \target Meta-Object System
+ \keyword Meta-Object System
Qt's meta-object system provides the signals and slots mechanism for
inter-object communication, run-time type information, and the dynamic
diff --git a/src/corelib/doc/src/objectmodel/properties.qdoc b/src/corelib/doc/src/objectmodel/properties.qdoc
index 55622dd56b..28be328e3a 100644
--- a/src/corelib/doc/src/objectmodel/properties.qdoc
+++ b/src/corelib/doc/src/objectmodel/properties.qdoc
@@ -31,7 +31,7 @@
\brief An overview of Qt's property system.
\ingroup qt-basic-concepts
- \target Qt's Property System
+ \keyword Qt's Property System
Qt provides a sophisticated property system similar to the ones
supplied by some compiler vendors. However, as a compiler- and
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 396bf55f17..443eae5a11 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -28,7 +28,7 @@
/*!
\namespace Qt
\inmodule QtCore
- \target Qt Namespace
+ \keyword Qt Namespace
\brief The Qt namespace contains miscellaneous identifiers
used throughout the Qt library.
@@ -2416,7 +2416,7 @@
\value WhatsThisCursor \inlineimage cursor-whatsthis.png
An arrow with a question mark, typically used to indicate
the presence of What's This? help for a widget.
- \value BusyCursor \inlineimage cursor-wait.png
+ \value BusyCursor \inlineimage cursor-busy.png
An hourglass or watch cursor, usually shown during
operations that allow the user to interact with
the application while they are performed in the
@@ -2726,7 +2726,7 @@
"\l{http://bugreports.qt.io/browse/QTWEBSITE-13}{http://bugreports.qt.../QTWEBSITE-13/}"),
whereas Qt::ElideRight is appropriate
for other strings (e.g.,
- "\l{http://doc.qt.digia.com/qq/qq09-mac-deployment.html}{Deploying Applications on Ma...}").
+ "\l{http://doc.qt.io/archives/qq/qq09-mac-deployment.html}{Deploying Applications on Ma...}").
\sa QAbstractItemView::textElideMode, QFontMetrics::elidedText(), AlignmentFlag, QTabBar::elideMode
*/
diff --git a/src/corelib/plugin/qplugin.qdoc b/src/corelib/plugin/qplugin.qdoc
index 94f5bc8a30..00ecb30430 100644
--- a/src/corelib/plugin/qplugin.qdoc
+++ b/src/corelib/plugin/qplugin.qdoc
@@ -28,7 +28,7 @@
/*!
\headerfile <QtPlugin>
\title Defining Plugins
- \target qtplugin-defining-plugins
+ \keyword qtplugin-defining-plugins
\ingroup plugins
\brief The <QtPlugin> header file defines macros for defining plugins.
diff --git a/src/dbus/doc/src/qtdbus-module.qdoc b/src/dbus/doc/src/qtdbus-module.qdoc
index 498da43d7a..87d35386c8 100644
--- a/src/dbus/doc/src/qtdbus-module.qdoc
+++ b/src/dbus/doc/src/qtdbus-module.qdoc
@@ -34,7 +34,7 @@
\ingroup modules
\qtvariable dbus
- \target The QDBus compiler
+ \keyword The QDBus compiler
Applications using the Qt D-Bus module can provide services to
diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp
index 71a79745e8..de37e0ab44 100644
--- a/src/gui/image/qpixmapcache.cpp
+++ b/src/gui/image/qpixmapcache.cpp
@@ -73,7 +73,7 @@ QT_BEGIN_NAMESPACE
memory.
The \e{Qt Quarterly} article
- \l{http://doc.qt.digia.com/qq/qq12-qpixmapcache.html}{Optimizing
+ \l{http://doc.qt.io/archives/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/tools/qdoc/doc/qdoc-manual-contextcmds.qdoc b/src/tools/qdoc/doc/qdoc-manual-contextcmds.qdoc
index a2e851293c..d707c77cfb 100644
--- a/src/tools/qdoc/doc/qdoc-manual-contextcmds.qdoc
+++ b/src/tools/qdoc/doc/qdoc-manual-contextcmds.qdoc
@@ -269,7 +269,7 @@
library.} It is provided to keep old source code
working. We strongly advise against using it in new
code. See the \l
- {http://doc.qt.digia.com/4.0/porting4.html} {Porting
+ {http://doc.qt.io/qt-4.8/porting4.html} {Porting
Guide} for more information.
\endquotation
diff --git a/src/tools/qdoc/doc/qdoc-manual-qdocconf.qdoc b/src/tools/qdoc/doc/qdoc-manual-qdocconf.qdoc
index d490f8549a..69980c1e18 100644
--- a/src/tools/qdoc/doc/qdoc-manual-qdocconf.qdoc
+++ b/src/tools/qdoc/doc/qdoc-manual-qdocconf.qdoc
@@ -1392,8 +1392,8 @@
\endcode
The complete variable entry in \l qtgui.qdocconf provides the
- standard header of the \l {http://doc.qt.digia.com/}
- {Qt Reference Documentation}.
+ standard header of the \l {http://doc.qt.io/qt-5/qtgui-index.html}
+ {Qt GUI Documentation}.
\target HTML.style-variable
\section1 HTML.style
@@ -1521,7 +1521,7 @@
This makes sure that whenever \c qt.index is used to generate
references to for example Qt classes, the base URL is \c
- http://doc.qt.digia.com/4.7.
+ http://doc.qt.io/qt-4.8/.
See also \l indexes.
diff --git a/src/tools/qdoc/doc/qdoc-manual-topiccmds.qdoc b/src/tools/qdoc/doc/qdoc-manual-topiccmds.qdoc
index 306fc40cb8..1dfd031633 100644
--- a/src/tools/qdoc/doc/qdoc-manual-topiccmds.qdoc
+++ b/src/tools/qdoc/doc/qdoc-manual-topiccmds.qdoc
@@ -812,7 +812,7 @@
<tr valign="top" bgcolor="#d0d0d0">
<td><b>
- <a href="http://doc.qt.digia.com/4.0/qftp.html">QFtp</a>
+ <a href="http://doc.qt.io/archives/qt-4.7/qftp.html">QFtp</a>
</b></td>
<td>
Implementation of the FTP protocol
@@ -885,7 +885,7 @@
<pre>#include &lt;Qt&gt;</pre>
<ul>
<li>
- <a href="http://doc.qt.digia.com/4.0/qt-qt3.html">
+ <a href="http://doc.qt.io/archives/qt-4.7/qt-qt3.html">
Qt 3 support members</a></li>
</ul>
@@ -893,7 +893,7 @@
<h3>Types</h3>
<ul>
<li>flags
- <a href="http://doc.qt.digia.com/4.0/qt.html#AlignmentFlag-enum">Alignment</a></b></li>
+ <a href="http://doc.qt.io/archives/qt-4.7/qt.html#AlignmentFlag-enum">Alignment</a></b></li>
<li>...</li></ul>
<hr />
\endraw
diff --git a/src/tools/qdoc/doc/qdoc-minimum-qdocconf.qdoc b/src/tools/qdoc/doc/qdoc-minimum-qdocconf.qdoc
index 66ceed4a3d..1fcd23a0f8 100644
--- a/src/tools/qdoc/doc/qdoc-minimum-qdocconf.qdoc
+++ b/src/tools/qdoc/doc/qdoc-minimum-qdocconf.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
\page qdoc-minimum-qdocconf.html
-\target minimal-qdocconf
+\keyword minimal-qdocconf
\title A Minimal qdocconf File
\brief Describes a minimal .qdocconf file
diff --git a/src/tools/qdoc/qdocdatabase.cpp b/src/tools/qdoc/qdocdatabase.cpp
index 6312deacbf..acd11ff20b 100644
--- a/src/tools/qdoc/qdocdatabase.cpp
+++ b/src/tools/qdoc/qdocdatabase.cpp
@@ -1296,6 +1296,8 @@ void QDocDatabase::resolveIssues() {
QDocIndexFiles::qdocIndexFiles()->resolveRelates();
QDocIndexFiles::destroyQDocIndexFiles();
}
+ if (Generator::generating())
+ resolveNamespaces();
}
void QDocDatabase::resolveStuff()
@@ -1326,8 +1328,10 @@ void QDocDatabase::resolveNamespaces()
int count = nmm_.remove(s);
if (count > 1) {
foreach (Node* n, nodes) {
- if (n->isNamespace() && n->wasSeen()) {
+ // Treat public namespaces from index trees as 'seen'
+ if (n->isNamespace() && (n->wasSeen() || (n->isIndexNode() && n->access() == Node::Public))) {
ns = static_cast<NamespaceNode*>(n);
+ ns->markSeen();
break;
}
}
diff --git a/src/tools/qdoc/qdocindexfiles.cpp b/src/tools/qdoc/qdocindexfiles.cpp
index fc262d9834..fdc42316cb 100644
--- a/src/tools/qdoc/qdocindexfiles.cpp
+++ b/src/tools/qdoc/qdocindexfiles.cpp
@@ -946,27 +946,27 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer,
}
writer.writeAttribute("name", objName);
- if (node->isQmlModule()) {
- logicalModuleName = node->logicalModuleName();
- logicalModuleVersion = node->logicalModuleVersion();
- if (!logicalModuleName.isEmpty()) {
- writer.writeAttribute("qml-module-name", logicalModuleName);
- if (node->isQmlModule())
- writer.writeAttribute("qml-module-version", logicalModuleVersion);
- if (!qmlFullBaseName.isEmpty())
- writer.writeAttribute("qml-base-type", qmlFullBaseName);
+
+ // Write module and base type info for QML/JS types
+ if (node->type() == Node::QmlType || node->type() == Node::QmlModule) {
+ QString baseNameAttr("qml-base-type");
+ QString moduleNameAttr("qml-module-name");
+ QString moduleVerAttr("qml-module-version");
+ if (node->isJsNode()) {
+ baseNameAttr = "js-base-type";
+ moduleNameAttr = "js-module-name";
+ moduleVerAttr = "js-module-version";
}
- }
- else if (node->isJsModule()) {
- logicalModuleName = node->logicalModuleName();
- logicalModuleVersion = node->logicalModuleVersion();
- if (!logicalModuleName.isEmpty()) {
- writer.writeAttribute("js-module-name", logicalModuleName);
- if (node->isQmlModule())
- writer.writeAttribute("js-module-version", logicalModuleVersion);
- if (!qmlFullBaseName.isEmpty())
- writer.writeAttribute("js-base-type", qmlFullBaseName);
+ if (node->type() == Node::QmlModule) {
+ logicalModuleName = node->logicalModuleName();
+ logicalModuleVersion = node->logicalModuleVersion();
}
+ if (!logicalModuleName.isEmpty())
+ writer.writeAttribute(moduleNameAttr, logicalModuleName);
+ if (!logicalModuleVersion.isEmpty())
+ writer.writeAttribute(moduleVerAttr, logicalModuleVersion);
+ if (!qmlFullBaseName.isEmpty())
+ writer.writeAttribute(baseNameAttr, qmlFullBaseName);
}
QString href;
diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp
index 8b9ea95cf3..b9906f13da 100644
--- a/src/widgets/dialogs/qwizard.cpp
+++ b/src/widgets/dialogs/qwizard.cpp
@@ -3662,7 +3662,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://doc.qt.digia.com/qq/qq22-qwizard.html#validatebeforeitstoolate}
+ available \l{http://doc.qt.io/archives/qq/qq22-qwizard.html#validatebeforeitstoolate}
{here}.
\sa completeChanged(), isFinalPage()
diff --git a/src/widgets/doc/src/qtwidgets-examples.qdoc b/src/widgets/doc/src/qtwidgets-examples.qdoc
index 7b727183b8..9c0b29d687 100644
--- a/src/widgets/doc/src/qtwidgets-examples.qdoc
+++ b/src/widgets/doc/src/qtwidgets-examples.qdoc
@@ -127,7 +127,7 @@
/*!
\ingroup all-examples
- \target Graphicsview Examples
+ \keyword Graphicsview Examples
\title Graphics View Examples
\brief Using the Graphics View framework.
\page examples-graphicsview.html
diff --git a/src/widgets/doc/src/widgets-and-layouts/layout.qdoc b/src/widgets/doc/src/widgets-and-layouts/layout.qdoc
index 60281ce109..47c2a17e7e 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.digia.com/qq/qq04-height-for-width.html}
+ \l{http://doc.qt.io/archives/qq/qq04-height-for-width.html}
{Trading Height for Width}.
diff --git a/src/widgets/util/qsystemtrayicon.cpp b/src/widgets/util/qsystemtrayicon.cpp
index 358e4c38d6..d22791048f 100644
--- a/src/widgets/util/qsystemtrayicon.cpp
+++ b/src/widgets/util/qsystemtrayicon.cpp
@@ -74,7 +74,7 @@ QT_BEGIN_NAMESPACE
\l{http://standards.freedesktop.org/systemtray-spec/systemtray-spec-0.2.html freedesktop.org}
XEmbed system tray specification.
\li All X11 desktop environments that implement the D-Bus
- \l{http://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/ StatusNotifierItem}
+ \l{http://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/StatusNotifierItem}
specification, including recent versions of KDE and Unity.
\li All supported versions of OS X. Note that the Growl
notification system must be installed for
diff --git a/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp b/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
index c3a615fdff..2128eeb164 100644
--- a/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
@@ -641,6 +641,7 @@ namespace QTest {
make.setProcessChannelMode(channelMode);
static const char makes[] =
+ "jom.exe\0" //preferred for visual c++ or mingw
"nmake.exe\0" //for visual c++
"mingw32-make.exe\0" //for mingw
"gmake\0"
diff --git a/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp b/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp
index c8964eb02c..db4b15530c 100644
--- a/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp
+++ b/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp
@@ -35,6 +35,7 @@
#include <QtTest/QtTest>
#include <qdebug.h>
#include <qdesktopservices.h>
+#include <qregularexpression.h>
class tst_qdesktopservices : public QObject
{
@@ -74,7 +75,9 @@ void tst_qdesktopservices::openUrl()
QCOMPARE(QDesktopServices::openUrl(QUrl()), false);
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
// this test is only valid on windows on other systems it might mean open a new document in the application handling .file
- QTest::ignoreMessage(QtWarningMsg, "ShellExecute 'file://invalid.file' failed (error 3).");
+ const QRegularExpression messagePattern("ShellExecute 'file://invalid\\.file' failed \\(error \\d+\\)\\.");
+ QVERIFY(messagePattern.isValid());
+ QTest::ignoreMessage(QtWarningMsg, messagePattern);
QCOMPARE(QDesktopServices::openUrl(QUrl("file://invalid.file")), false);
#endif
}
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index c54bc9426e..d4ea0f6d04 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -83,7 +83,7 @@ static inline void promptKeyPress()
exit(0); // Exit cleanly for Ctrl+C
}
-Configure::Configure(int& argc, char** argv)
+Configure::Configure(int& argc, char** argv) : verbose(0)
{
// Default values for indentation
optionIndent = 4;
@@ -383,6 +383,7 @@ void Configure::parseCmdLine()
configCmdLine.clear();
reloadCmdLine();
}
+
else if (configCmdLine.at(i) == "-loadconfig") {
++i;
if (i != argCount) {
@@ -420,6 +421,10 @@ void Configure::parseCmdLine()
|| configCmdLine.at(i) == "-?")
dictionary[ "HELP" ] = "yes";
+ else if (configCmdLine.at(i) == "-v" || configCmdLine.at(i) == "-verbose") {
+ ++verbose;
+ }
+
else if (configCmdLine.at(i) == "-qconfig") {
++i;
if (i == argCount)
@@ -2058,6 +2063,7 @@ bool Configure::displayHelp()
desc( "-loadconfig <config>", "Run configure with the parameters from file configure_<config>.cache.");
desc( "-saveconfig <config>", "Run configure and save the parameters in file configure_<config>.cache.");
desc( "-redo", "Run configure with the same parameters as last time.\n");
+ desc( "-v, -verbose", "Run configure tests with verbose output.\n");
// Qt\Windows CE only options go below here -----------------------------------------------------------------------------
desc("Qt for Windows CE only:\n\n");
@@ -3377,7 +3383,7 @@ bool Configure::tryCompileProject(const QString &projectPath, const QString &ext
}
// run qmake
- QString command = QString("%1 %2 %3 2>&1")
+ QString command = QString("%1 %2 %3")
.arg(QDir::toNativeSeparators(QDir(newpwd).relativeFilePath(buildPath + "/bin/qmake.exe")),
QDir::toNativeSeparators(sourcePath + "/config.tests/" + projectPath),
extraOptions);
@@ -3389,6 +3395,11 @@ bool Configure::tryCompileProject(const QString &projectPath, const QString &ext
addSysroot(&command);
}
+ if (verbose)
+ cout << qPrintable(command) << endl;
+ else
+ command += " 2>&1";
+
int code = 0;
QString output = Environment::execute(command, &code);
//cout << output << endl;
@@ -3398,7 +3409,10 @@ bool Configure::tryCompileProject(const QString &projectPath, const QString &ext
command = dictionary[ "MAKE" ];
if (command.contains("nmake") || command.contains("jom"))
command += " /NOLOGO";
- command += " -s 2>&1";
+ if (verbose)
+ cout << qPrintable(command) << endl;
+ else
+ command += " -s 2>&1";
output = Environment::execute(command, &code);
//cout << output << endl;
diff --git a/tools/configure/configureapp.h b/tools/configure/configureapp.h
index de8d1a2469..78cc118a9d 100644
--- a/tools/configure/configureapp.h
+++ b/tools/configure/configureapp.h
@@ -93,6 +93,8 @@ public:
private:
bool checkAngleAvailability(QString *errorMessage = 0) const;
+ int verbose;
+
// Our variable dictionaries
QMap<QString,QString> dictionary;
QStringList allBuildParts;