summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure9
-rw-r--r--mkspecs/features/ctest_testcase.prf10
-rw-r--r--qmake/generators/unix/unixmake2.cpp24
-rw-r--r--src/corelib/Qt5CTestMacros.cmake4
-rw-r--r--src/corelib/Qt5Config.cmake.in6
-rw-r--r--src/corelib/Qt5CoreMacros.cmake3
-rw-r--r--src/gui/text/qfontdatabase.cpp20
-rw-r--r--src/gui/text/qfontdatabase_qpa.cpp3
-rw-r--r--src/gui/text/qfontengine_ft.cpp2
-rw-r--r--src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp2
-rw-r--r--src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp9
-rw-r--r--src/plugins/platforms/qnx/qqnxintegration.cpp1
-rw-r--r--src/plugins/platforms/qnx/qqnxscreen.cpp12
-rw-r--r--src/plugins/platforms/qnx/qqnxscreen.h1
-rw-r--r--src/plugins/platforms/windows/qwindowscontext.cpp5
-rw-r--r--src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowsfontengine.cpp2
17 files changed, 64 insertions, 51 deletions
diff --git a/configure b/configure
index f55e2f622b..6d68ed2682 100755
--- a/configure
+++ b/configure
@@ -2565,14 +2565,7 @@ if [ -z "$PLATFORM" ]; then
"
;;
Linux:*)
- case "$UNAME_MACHINE" in
- x86_64|s390x|ppc64)
- PLATFORM=linux-g++-64
- ;;
- *)
- PLATFORM=linux-g++
- ;;
- esac
+ PLATFORM=linux-g++
PLATFORM_NOTES="
- Also available for Linux: linux-kcc linux-icc linux-cxx
"
diff --git a/mkspecs/features/ctest_testcase.prf b/mkspecs/features/ctest_testcase.prf
index 7faf738d6e..c88fc961cf 100644
--- a/mkspecs/features/ctest_testcase.prf
+++ b/mkspecs/features/ctest_testcase.prf
@@ -38,6 +38,10 @@ isEmpty(CMAKE_VERSION) {
CMAKE_BUILD_TYPE = Debug
CONFIG(release, debug|release):CMAKE_BUILD_TYPE = Release
win32-g++*:CMAKE_GENERATOR = -G \"MinGW Makefiles\"
+ win32:equals(QT_ARCH, x86_64) {
+ win32-msvc2010:CMAKE_GENERATOR = -G \"Visual Studio 10 Win64\"
+ win32-msvc2012:CMAKE_GENERATOR = -G \"Visual Studio 11 Win64\"
+ }
BUILD_DIR = $$replace($$list($$OUT_PWD/build), /, $$QMAKE_DIR_SEP)
@@ -53,9 +57,6 @@ isEmpty(CMAKE_VERSION) {
dependentmodules -= $$CMAKE_QT_MODULES_UNDER_TEST
dependentmodules = $$cmakeModuleList($$dependentmodules)
- SET = set
- equals(QMAKE_DIR_SEP, "/"):SET = export
-
CMAKE_MODULE_VERSIONS =
CMAKE_MODULES_UNDER_TEST =
for (MODULE_UNDER_TEST, CMAKE_QT_MODULES_UNDER_TEST) {
@@ -69,8 +70,9 @@ isEmpty(CMAKE_VERSION) {
CMAKE_MODULES_UNDER_TEST = $$join(CMAKE_MODULES_UNDER_TEST, ;)
check.commands = \
- $(MKDIR) $$BUILD_DIR && cd $$BUILD_DIR && $$SET VERBOSE=1 && \
+ $(MKDIR) $$BUILD_DIR && cd $$BUILD_DIR && \
cmake $$_PRO_FILE_PWD_ $$CMAKE_GENERATOR \
+ -DCMAKE_VERBOSE_MAKEFILE=1 \
$$CMAKE_MODULE_DEFINES \
-DCMAKE_BUILD_TYPE=$${CMAKE_BUILD_TYPE} \
-DCMAKE_PREFIX_PATH=$$CMAKE_PREFIX_PATH \
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index 9cb63ce539..2a99b5dd34 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -221,7 +221,11 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
do_incremental = false;
t << "DIST = " << valList(fileFixify(project->values("DISTFILES").toQStringList())) << endl;
t << "QMAKE_TARGET = " << var("QMAKE_ORIG_TARGET") << endl;
- t << "DESTDIR = " << var("DESTDIR") << endl;
+ // The comment is important for mingw32-make.exe on Windows as otherwise trailing slashes
+ // would be interpreted as line continuation. The lack of spacing between the value and the
+ // comment is also important as otherwise quoted use of "$(DESTDIR)" would include this
+ // spacing.
+ t << "DESTDIR = " << var("DESTDIR") << "#avoid trailing-slash linebreak" << endl;
if(project->isActiveConfig("compile_libtool"))
t << "TARGETL = " << var("TARGET_la") << endl;
t << "TARGET = " << escapeFilePath(var("TARGET")) << endl;
@@ -546,7 +550,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
<< var("QMAKE_LINK_SHLIB_CMD");
if(!destdir.isEmpty())
t << "\n\t"
- << "-$(MOVE) $(TARGET) " << destdir;
+ << "-$(MOVE) $(TARGET) " << destdir << " ";
if(!project->isEmpty("QMAKE_POST_LINK"))
t << "\n\t" << var("QMAKE_POST_LINK");
t << endl << endl;
@@ -579,10 +583,10 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
<< "-$(DEL_FILE) " << destdir << "$(TARGET0)\n\t"
<< "-$(DEL_FILE) " << destdir << "$(TARGET1)\n\t"
<< "-$(DEL_FILE) " << destdir << "$(TARGET2)\n\t"
- << "-$(MOVE) $(TARGET) " << destdir << "\n\t"
- << "-$(MOVE) $(TARGET0) " << destdir << "\n\t"
- << "-$(MOVE) $(TARGET1) " << destdir << "\n\t"
- << "-$(MOVE) $(TARGET2) " << destdir << "\n\t";
+ << "-$(MOVE) $(TARGET) " << destdir << " \n\t"
+ << "-$(MOVE) $(TARGET0) " << destdir << " \n\t"
+ << "-$(MOVE) $(TARGET1) " << destdir << " \n\t"
+ << "-$(MOVE) $(TARGET2) " << destdir << " \n\t";
if(!project->isEmpty("QMAKE_POST_LINK"))
t << "\n\t" << var("QMAKE_POST_LINK");
t << endl << endl;
@@ -595,8 +599,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
t << "\n\t"
<< "-$(DEL_FILE) " << destdir << "$(TARGET)\n\t"
<< "-$(DEL_FILE) " << destdir << "$(TARGET0)\n\t"
- << "-$(MOVE) $(TARGET) " << destdir << "\n\t"
- << "-$(MOVE) $(TARGET0) " << destdir << "\n\t";
+ << "-$(MOVE) $(TARGET) " << destdir << " \n\t"
+ << "-$(MOVE) $(TARGET0) " << destdir << " \n\t";
if(!project->isEmpty("QMAKE_POST_LINK"))
t << "\n\t" << var("QMAKE_POST_LINK");
t << endl << endl;
@@ -635,7 +639,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
t << "\t" << "$(RANLIB) $(TARGET)" << "\n";
if(!destdir.isEmpty())
t << "\t" << "-$(DEL_FILE) " << destdir << "$(TARGET)" << "\n"
- << "\t" << "-$(MOVE) $(TARGET) " << destdir << "\n";
+ << "\t" << "-$(MOVE) $(TARGET) " << destdir << " \n";
} else {
int max_files = project->first("QMAKE_MAX_FILES_PER_AR").toInt();
ProStringList objs = project->values("OBJECTS") + project->values("OBJCOMP"),
@@ -666,7 +670,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
t << "\t" << "$(RANLIB) " << (*libit) << "\n";
if(!destdir.isEmpty())
t << "\t" << "-$(DEL_FILE) " << destdir << (*libit) << "\n"
- << "\t" << "-$(MOVE) " << (*libit) << " " << destdir << "\n";
+ << "\t" << "-$(MOVE) " << (*libit) << " " << destdir << " \n";
}
}
t << endl << endl;
diff --git a/src/corelib/Qt5CTestMacros.cmake b/src/corelib/Qt5CTestMacros.cmake
index e507c8009e..ebf134f7d0 100644
--- a/src/corelib/Qt5CTestMacros.cmake
+++ b/src/corelib/Qt5CTestMacros.cmake
@@ -19,6 +19,10 @@ if (CMAKE_TOOLCHAIN_FILE)
list(APPEND BUILD_OPTIONS_LIST "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
endif()
+if (CMAKE_VERBOSE_MAKEFILE)
+ list(APPEND BUILD_OPTIONS_LIST "-DCMAKE_VERBOSE_MAKEFILE=1")
+endif()
+
if (NO_WIDGETS)
list(APPEND BUILD_OPTIONS_LIST "-DNO_WIDGETS=True")
endif()
diff --git a/src/corelib/Qt5Config.cmake.in b/src/corelib/Qt5Config.cmake.in
index 408dd64496..a7e9a042e8 100644
--- a/src/corelib/Qt5Config.cmake.in
+++ b/src/corelib/Qt5Config.cmake.in
@@ -18,7 +18,7 @@ if (Qt5_FIND_QUIETLY)
set(_Qt5_FIND_PARTS_QUIET QUIET)
endif()
-get_filename_component(_qt5_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
+get_filename_component(_qt5_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/..\" ABSOLUTE)
set(_Qt5_NOTFOUND_MESSAGE)
@@ -30,9 +30,9 @@ foreach(module ${Qt5_FIND_COMPONENTS})
)
if (NOT Qt5${module}_FOUND)
if (Qt5_FIND_REQUIRED_${module})
- set(_Qt5_NOTFOUND_MESSAGE \"${_Qt5_NOTFOUND_MESSAGE}Failed to find Qt5 component \\\"${module}\\\" config file at \\\"${_qt5_install_prefix}/lib/cmake/Qt5${module}/Qt5${module}Config.cmake\\\"\\n\")
+ set(_Qt5_NOTFOUND_MESSAGE \"${_Qt5_NOTFOUND_MESSAGE}Failed to find Qt5 component \\\"${module}\\\" config file at \\\"${_qt5_install_prefix}/Qt5${module}/Qt5${module}Config.cmake\\\"\\n\")
elseif(NOT Qt5_FIND_QUIETLY)
- message(WARNING \"Failed to find Qt5 component \\\"${module}\\\" config file at \\\"${_qt5_install_prefix}/lib/cmake/Qt5${module}/Qt5${module}Config.cmake\\\"\")
+ message(WARNING \"Failed to find Qt5 component \\\"${module}\\\" config file at \\\"${_qt5_install_prefix}/Qt5${module}/Qt5${module}Config.cmake\\\"\")
endif()
endif()
endforeach()
diff --git a/src/corelib/Qt5CoreMacros.cmake b/src/corelib/Qt5CoreMacros.cmake
index e3115db8ee..b6124b40cd 100644
--- a/src/corelib/Qt5CoreMacros.cmake
+++ b/src/corelib/Qt5CoreMacros.cmake
@@ -215,6 +215,7 @@ function(QT5_ADD_RESOURCES outfiles )
set(${outfiles} ${${outfiles}} PARENT_SCOPE)
endfunction()
+set(_Qt5_COMPONENT_PATH "${CMAKE_CURRENT_LIST_DIR}/..")
if (NOT CMAKE_VERSION VERSION_LESS 2.8.9)
macro(qt5_use_modules _target _link_type)
@@ -234,7 +235,7 @@ if (NOT CMAKE_VERSION VERSION_LESS 2.8.9)
foreach(_module ${_qt5_modules})
if (NOT Qt5${_module}_FOUND)
- find_package(Qt5${_module} PATHS ${_qt5Core_install_prefix} NO_DEFAULT_PATH)
+ find_package(Qt5${_module} PATHS "${_Qt5_COMPONENT_PATH}" NO_DEFAULT_PATH)
if (NOT Qt5${_module}_FOUND)
message(FATAL_ERROR "Can not use \"${_module}\" module which has not yet been found.")
endif()
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index e3270b430f..86a5bed15d 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -344,6 +344,7 @@ struct QtFontFamily
bool askedForFallback;
unsigned char writingSystems[QFontDatabase::WritingSystemsCount];
+ bool matchesFamilyName(const QString &familyName) const;
QtFontFoundry *foundry(const QString &f, bool = false);
};
@@ -383,6 +384,11 @@ QtFontFoundry *QtFontFamily::foundry(const QString &f, bool create)
return foundries[count++];
}
+bool QtFontFamily::matchesFamilyName(const QString &familyName) const
+{
+ return name.compare(familyName, Qt::CaseInsensitive) == 0 || aliases.contains(familyName, Qt::CaseInsensitive);
+}
+
class QFontDatabasePrivate
{
@@ -852,19 +858,7 @@ static bool matchFamilyName(const QString &familyName, QtFontFamily *f)
{
if (familyName.isEmpty())
return true;
-
- if (f->name.compare(familyName, Qt::CaseInsensitive) == 0)
- return true;
-
- QStringList::const_iterator it = f->aliases.constBegin();
- while (it != f->aliases.constEnd()) {
- if ((*it).compare(familyName, Qt::CaseInsensitive) == 0)
- return true;
-
- ++it;
- }
-
- return false;
+ return f->matchesFamilyName(familyName);
}
/*!
diff --git a/src/gui/text/qfontdatabase_qpa.cpp b/src/gui/text/qfontdatabase_qpa.cpp
index be42e892fa..32580ada7a 100644
--- a/src/gui/text/qfontdatabase_qpa.cpp
+++ b/src/gui/text/qfontdatabase_qpa.cpp
@@ -110,8 +110,7 @@ static QStringList fallbackFamilies(const QString &family, QFont::Style style, Q
for (i = retList.begin(); i != retList.end(); ++i) {
bool contains = false;
for (int j = 0; j < db->count; j++) {
- QtFontFamily *qtFamily = db->families[j];
- if (!(i->compare(qtFamily->name,Qt::CaseInsensitive))) {
+ if (db->families[j]->matchesFamilyName(*i)) {
contains = true;
break;
}
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
index 19b4411b47..10225febcb 100644
--- a/src/gui/text/qfontengine_ft.cpp
+++ b/src/gui/text/qfontengine_ft.cpp
@@ -232,7 +232,7 @@ QFreetypeFace *QFreetypeFace::getFace(const QFontEngine::FaceId &face_id,
QScopedPointer<QFreetypeFace> newFreetype(new QFreetypeFace);
FT_Face face;
if (!face_id.filename.isEmpty()) {
- QString fileName = QString::fromUtf8(face_id.filename);
+ QString fileName = QFile::decodeName(face_id.filename);
if (face_id.filename.startsWith(":qmemoryfonts/")) {
// from qfontdatabase.cpp
QByteArray idx = face_id.filename;
diff --git a/src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp b/src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp
index 49440c8566..9b87418846 100644
--- a/src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp
+++ b/src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp
@@ -123,7 +123,7 @@ QFontEngine *QBasicFontDatabase::fontEngine(const QFontDef &fontDef, QChar::Scri
QFontEngineFT *engine;
FontFile *fontfile = static_cast<FontFile *> (usrPtr);
QFontEngine::FaceId fid;
- fid.filename = fontfile->fileName.toLocal8Bit();
+ fid.filename = QFile::encodeName(fontfile->fileName);
fid.index = fontfile->indexValue;
engine = new QFontEngineFT(fontDef);
diff --git a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
index 6ba71d112e..8d6f415fba 100644
--- a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
+++ b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
@@ -356,7 +356,7 @@ static bool isSymbolFont(FontFile *fontFile)
return false;
QFontEngine::FaceId id;
- id.filename = fontFile->fileName.toLocal8Bit();
+ id.filename = QFile::encodeName(fontFile->fileName);
id.index = fontFile->indexValue;
QFreetypeFace *f = QFreetypeFace::getFace(id);
@@ -370,6 +370,8 @@ static bool isSymbolFont(FontFile *fontFile)
return hasSymbolMap;
}
+Q_GUI_EXPORT void qt_registerAliasToFontFamily(const QString &familyName, const QString &alias);
+
void QFontconfigDatabase::populateFontDatabase()
{
FcFontSet *fonts;
@@ -511,6 +513,9 @@ void QFontconfigDatabase::populateFontDatabase()
QString styleName = style_value ? QString::fromUtf8((const char *) style_value) : QString();
QPlatformFontDatabase::registerFont(familyName,styleName,QLatin1String((const char *)foundry_value),weight,style,stretch,antialias,scalable,pixel_size,fixedPitch,writingSystems,fontFile);
// qDebug() << familyName << (const char *)foundry_value << weight << style << &writingSystems << scalable << true << pixel_size;
+
+ for (int k = 1; FcPatternGetString(fonts->fonts[i], FC_FAMILY, k, &value) == FcResultMatch; ++k)
+ qt_registerAliasToFontFamily(familyName, QString::fromUtf8((const char *)value));
}
FcFontSetDestroy (fonts);
@@ -562,7 +567,7 @@ QFontEngine *QFontconfigDatabase::fontEngine(const QFontDef &f, QChar::Script sc
QFontEngineFT *engine;
FontFile *fontfile = static_cast<FontFile *> (usrPtr);
QFontEngine::FaceId fid;
- fid.filename = fontfile->fileName.toLocal8Bit();
+ fid.filename = QFile::encodeName(fontfile->fileName);
fid.index = fontfile->indexValue;
bool antialias = !(fontDef.styleStrategy & QFont::NoAntialias);
diff --git a/src/plugins/platforms/qnx/qqnxintegration.cpp b/src/plugins/platforms/qnx/qqnxintegration.cpp
index 5ea4fef698..4cbbfa4da8 100644
--- a/src/plugins/platforms/qnx/qqnxintegration.cpp
+++ b/src/plugins/platforms/qnx/qqnxintegration.cpp
@@ -486,6 +486,7 @@ void QQnxIntegration::createDisplay(screen_display_t display, bool isPrimary)
QQnxScreen *screen = new QQnxScreen(m_screenContext, display, isPrimary);
m_screens.append(screen);
screenAdded(screen);
+ screen->adjustOrientation();
QObject::connect(m_screenEventHandler, SIGNAL(newWindowCreated(void*)),
screen, SLOT(newWindowCreated(void*)));
diff --git a/src/plugins/platforms/qnx/qqnxscreen.cpp b/src/plugins/platforms/qnx/qqnxscreen.cpp
index 7614abdc6a..2b81559ab6 100644
--- a/src/plugins/platforms/qnx/qqnxscreen.cpp
+++ b/src/plugins/platforms/qnx/qqnxscreen.cpp
@@ -498,6 +498,18 @@ void QQnxScreen::onWindowPost(QQnxWindow *window)
}
}
+void QQnxScreen::adjustOrientation()
+{
+ if (!m_primaryScreen)
+ return;
+
+ bool ok = false;
+ const int rotation = qgetenv("ORIENTATION").toInt(&ok);
+
+ if (ok)
+ setRotation(rotation);
+}
+
QPlatformCursor * QQnxScreen::cursor() const
{
return m_cursor;
diff --git a/src/plugins/platforms/qnx/qqnxscreen.h b/src/plugins/platforms/qnx/qqnxscreen.h
index 41dc675599..98f2a90fbc 100644
--- a/src/plugins/platforms/qnx/qqnxscreen.h
+++ b/src/plugins/platforms/qnx/qqnxscreen.h
@@ -92,6 +92,7 @@ public:
void updateHierarchy();
void onWindowPost(QQnxWindow *window);
+ void adjustOrientation();
QSharedPointer<QQnxRootWindow> rootWindow() const;
diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp
index 545484de8d..f2ee33d327 100644
--- a/src/plugins/platforms/windows/qwindowscontext.cpp
+++ b/src/plugins/platforms/windows/qwindowscontext.cpp
@@ -417,10 +417,7 @@ QString QWindowsContext::registerWindowClass(const QWindow *w, bool isGL)
if (icon)
cname += QStringLiteral("Icon");
- HBRUSH brush = 0;
- if (!isGL)
- brush = GetSysColorBrush(COLOR_WINDOW);
- return registerWindowClass(cname, qWindowsWndProc, style, brush, icon);
+ return registerWindowClass(cname, qWindowsWndProc, style, GetSysColorBrush(COLOR_WINDOW), icon);
}
QString QWindowsContext::registerWindowClass(QString cname,
diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp
index 98b4e7af62..7f97d58be4 100644
--- a/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp
@@ -285,7 +285,7 @@ static bool addFontToDatabase(const QString &familyName, uchar charSet,
return false;
if (!QDir::isAbsolutePath(value))
- value.prepend(QString::fromLocal8Bit(qgetenv("windir") + "\\Fonts\\"));
+ value.prepend(QFile::decodeName(qgetenv("windir") + "\\Fonts\\"));
QPlatformFontDatabase::registerFont(faceName, QString(), foundryName, weight, style, stretch,
antialias, scalable, size, fixed, writingSystems, createFontFile(value, index));
diff --git a/src/plugins/platforms/windows/qwindowsfontengine.cpp b/src/plugins/platforms/windows/qwindowsfontengine.cpp
index c402f00453..5757bcad4e 100644
--- a/src/plugins/platforms/windows/qwindowsfontengine.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontengine.cpp
@@ -190,7 +190,7 @@ void QWindowsFontEngine::getCMap()
unitsPerEm = otm->otmEMSquare;
x_height = (int)otm->otmsXHeight;
loadKerningPairs(designToDevice);
- _faceId.filename = QString::fromWCharArray((wchar_t *)((char *)otm + (quintptr)otm->otmpFullName)).toLatin1();
+ _faceId.filename = QFile::encodeName(QString::fromWCharArray((wchar_t *)((char *)otm + (quintptr)otm->otmpFullName)));
lineWidth = otm->otmsUnderscoreSize;
fsType = otm->otmfsType;
free(otm);