Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/5.7' into dev
Browse files Browse the repository at this point in the history
Conflicts:
	configure
5.7 now supports clang on android; but dev re-worked configure

	src/gui/kernel/qevent.h
One side renamed a parameter of a constructor; the other added an
alternate constructor on the next line.  Applied the rename to both
for consistency.

	tests/auto/tools/moc/tst_moc.cpp
Each side added a new test at the end.

	.qmake.conf
Ignored 5.7's change to MODULE_VERSION.

	configure.json
No conflict noticed by git; but changes in 5.7 were needed for the
re-worked configure to accommodate 5.7's stricter handling of C++11.

Change-Id: I9cda53836a32d7bf83828212c7ea00b1de3e09d2
  • Loading branch information
ediosyncratic committed Aug 1, 2016
2 parents 6f75096 + 0eb77c3 commit f6fc342
Show file tree
Hide file tree
Showing 96 changed files with 2,147 additions and 789 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ tools/activeqt/testcon/testcon.tlb
translations/*.qm
translations/*_untranslated.ts
qrc_*.cpp
*.version
*.version.in

# Test generated files
QObject.log
Expand Down
49 changes: 0 additions & 49 deletions config.tests/common/c++11/c++11.cpp

This file was deleted.

3 changes: 0 additions & 3 deletions config.tests/common/c++11/c++11.pro

This file was deleted.

2 changes: 1 addition & 1 deletion config.tests/unix/precomp.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ COMPILER=$1
VERBOSE=$2

case "$COMPILER" in
icpc)
*icpc)
cat >header.h <<EOF
#define HEADER_H
Expand Down
11 changes: 7 additions & 4 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ if [ "$BUILD_ON_MAC" = "yes" ]; then
exit 2
fi

if ! /usr/bin/xcrun -find xcrun >/dev/null 2>&1; then
if ! /usr/bin/xcrun -find xcodebuild >/dev/null 2>&1; then
echo >&2
echo " Xcode not set up properly. You may need to confirm the license" >&2
echo " agreement by running /usr/bin/xcodebuild without arguments." >&2
Expand Down Expand Up @@ -1027,7 +1027,10 @@ case "$XPLATFORM" in
*unsupported*)
;;
*android-g++*)
XPLATFORM_ANDROID=yes
XPLATFORM_ANDROID=g++
;;
*android-clang*)
XPLATFORM_ANDROID=clang
;;
esac

Expand Down Expand Up @@ -1193,7 +1196,7 @@ fi
# command line and environment validation
#-------------------------------------------------------------------------------

if [ "$XPLATFORM_ANDROID" = "yes" ]; then
if [ "$XPLATFORM_ANDROID" != "no" ]; then
if [ -z "$CFG_DEFAULT_ANDROID_NDK_HOST" ]; then
case $PLATFORM in
linux-*)
Expand Down Expand Up @@ -1336,7 +1339,7 @@ if [ "$OPT_SHADOW" = "yes" ]; then
mkdir -p "$outpath/mkspecs"
fi

if [ "$XPLATFORM_ANDROID" != "yes" ]; then
if [ "$XPLATFORM_ANDROID" = "no" ]; then
TEST_COMPILER=`getXQMakeConf QMAKE_CXX`
GCC_MACHINE_DUMP=
case "$TEST_COMPILER" in *g++) GCC_MACHINE_DUMP=$($TEST_COMPILER -dumpmachine);; esac
Expand Down
12 changes: 6 additions & 6 deletions configure.bat
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,18 @@ if not "%icl.exe%" == "" (
rem This must have a trailing space.
echo QTSRC = %QTSRC% >> Makefile
set tmpl=win32
) else if not "%clang-cl.exe%" == "" (
echo CXX = clang-cl>>Makefile
echo EXTRA_CXXFLAGS = -fms-compatibility-version=19.00.23506 -Wno-microsoft-enum-value>>Makefile
rem This must have a trailing space.
echo QTSRC = %QTSRC% >> Makefile
set tmpl=win32
) else if not "%cl.exe%" == "" (
echo CXX = cl>>Makefile
echo EXTRA_CXXFLAGS =>>Makefile
rem This must have a trailing space.
echo QTSRC = %QTSRC% >> Makefile
set tmpl=win32
) else if not "%clang-cl.exe%" == "" (
echo CXX = clang-cl>>Makefile
echo EXTRA_CXXFLAGS = -fms-compatibility-version=19.00.23506 -Wno-microsoft-enum-value>>Makefile
rem This must have a trailing space.
echo QTSRC = %QTSRC% >> Makefile
set tmpl=win32
) else if not "%g++.exe%" == "" (
echo CXX = g++>>Makefile
echo EXTRA_CXXFLAGS =>>Makefile
Expand Down
11 changes: 0 additions & 11 deletions configure.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,6 @@
"type": "compile",
"test": "unix/stl"
},
"c++11": {
"description": "C++11 support",
"type": "compile",
"test": "common/c++11"
},
"c++14": {
"description": "C++14 support",
"type": "compile",
Expand Down Expand Up @@ -1178,7 +1173,6 @@
},
"c++11": {
"description": "C++11",
"condition": "tests.c++11",
"output": [ "publicQtConfig" ]
},
"c++14": {
Expand Down Expand Up @@ -2330,11 +2324,6 @@ Please apply the patch corresponding to your Standard Library vendor, found in
"type": "error",
"condition": "!features.stl",
"message": "Qt requires a compliant STL library."
},
{
"type": "error",
"condition": "!features.c++11",
"message": "Qt requires a C++11 compiler."
}
],

Expand Down
1 change: 1 addition & 0 deletions doc/global/manifest-meta.qdocconf
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ manifestmeta.thumbnail.names = "QtCore/Contiguous Cache Example" \
"QtHelp/*" \
"QtMultimedia/AudioEngine Example" \
"QtQml/Extending QML*" \
"QtQuick/C++ Extensions: Image Response Provider Example" \
"QtQuick/Qt Quick Examples - Accessibility" \
"QtSensors/Qt Sensors - SensorGesture QML Type example" \
"QtWinExtras/Icon Extractor"
3 changes: 2 additions & 1 deletion examples/corelib/mimetypes/mimetypebrowser/mimetypemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ QString MimetypeModel::formatMimeTypeInfo(const QMimeType &t)

str << "</td></tr>"
<< "<tr><td>Comment:</td><td>" << t.comment() << "</td></tr>"
<< "<tr><td>Icon name:</td><td>" << t.iconName() << "</td></tr>";
<< "<tr><td>Icon name:</td><td>" << t.iconName() << "</td></tr>"
<< "<tr><td>Generic icon name</td><td>" << t.genericIconName() << "</td></tr>";

const QString &filter = t.filterString();
if (!filter.isEmpty())
Expand Down
31 changes: 17 additions & 14 deletions examples/widgets/mainwindows/mainwindow/colorswatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
#include <QDialog>
#include <QDialogButtonBox>
#include <QGridLayout>
#include <QSignalBlocker>
#include <QSpinBox>
#include <QLabel>
#include <QPainterPath>
Expand Down Expand Up @@ -426,20 +427,22 @@ void ColorSwatch::updateContextMenu()
allowBottomAction->setEnabled(area != Qt::BottomDockWidgetArea);
}

leftAction->blockSignals(true);
rightAction->blockSignals(true);
topAction->blockSignals(true);
bottomAction->blockSignals(true);

leftAction->setChecked(area == Qt::LeftDockWidgetArea);
rightAction->setChecked(area == Qt::RightDockWidgetArea);
topAction->setChecked(area == Qt::TopDockWidgetArea);
bottomAction->setChecked(area == Qt::BottomDockWidgetArea);

leftAction->blockSignals(false);
rightAction->blockSignals(false);
topAction->blockSignals(false);
bottomAction->blockSignals(false);
{
const QSignalBlocker blocker(leftAction);
leftAction->setChecked(area == Qt::LeftDockWidgetArea);
}
{
const QSignalBlocker blocker(rightAction);
rightAction->setChecked(area == Qt::RightDockWidgetArea);
}
{
const QSignalBlocker blocker(topAction);
topAction->setChecked(area == Qt::TopDockWidgetArea);
}
{
const QSignalBlocker blocker(bottomAction);
bottomAction->setChecked(area == Qt::BottomDockWidgetArea);
}

if (areaActions->isEnabled()) {
leftAction->setEnabled(areas & Qt::LeftDockWidgetArea);
Expand Down
32 changes: 17 additions & 15 deletions examples/widgets/widgets/charactermap/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,25 +167,27 @@ void MainWindow::findSizes(const QFont &font)
{
QFontDatabase fontDatabase;
QString currentSize = sizeCombo->currentText();
sizeCombo->blockSignals(true);
sizeCombo->clear();

int size;
if(fontDatabase.isSmoothlyScalable(font.family(), fontDatabase.styleString(font))) {
foreach(size, QFontDatabase::standardSizes()) {
sizeCombo->addItem(QVariant(size).toString());
sizeCombo->setEditable(true);
}

} else {
foreach(size, fontDatabase.smoothSizes(font.family(), fontDatabase.styleString(font))) {
sizeCombo->addItem(QVariant(size).toString());
sizeCombo->setEditable(false);
{
const QSignalBlocker blocker(sizeCombo);
// sizeCombo signals are now blocked until end of scope
sizeCombo->clear();

int size;
if (fontDatabase.isSmoothlyScalable(font.family(), fontDatabase.styleString(font))) {
foreach (size, QFontDatabase::standardSizes()) {
sizeCombo->addItem(QVariant(size).toString());
sizeCombo->setEditable(true);
}

} else {
foreach (size, fontDatabase.smoothSizes(font.family(), fontDatabase.styleString(font))) {
sizeCombo->addItem(QVariant(size).toString());
sizeCombo->setEditable(false);
}
}
}

sizeCombo->blockSignals(false);

int sizeIndex = sizeCombo->findText(currentSize);

if(sizeIndex == -1)
Expand Down
32 changes: 32 additions & 0 deletions mkspecs/android-clang/qmake.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# qmake configuration for building with android-g++
MAKEFILE_GENERATOR = UNIX
QMAKE_PLATFORM = android
QMAKE_COMPILER = gcc clang llvm

CONFIG += android_install unversioned_soname unversioned_libname android_deployment_settings

include(../common/linux.conf)
include(../common/clang.conf)
include(../common/android-base-head.conf)

NDK_LLVM_PATH = $$NDK_ROOT/toolchains/llvm/prebuilt/$$NDK_HOST
QMAKE_CC = $$NDK_LLVM_PATH/bin/clang
QMAKE_CXX = $$NDK_LLVM_PATH/bin/clang++
QMAKE_GCC = $$NDK_TOOLCHAIN_PATH/bin/$$NDK_TOOLS_PREFIX-g++

equals(ANDROID_TARGET_ARCH, armeabi-v7a): \
QMAKE_CFLAGS = -target armv7-none-linux-androideabi
else: equals(ANDROID_TARGET_ARCH, armeabi): \
QMAKE_CFLAGS = -target armv5te-none-linux-androideabi
else: equals(ANDROID_TARGET_ARCH, arm64-v8a): \
QMAKE_CFLAGS = -target aarch64-none-linux-android
else: equals(ANDROID_TARGET_ARCH, x86): \
QMAKE_CFLAGS = -target i686-none-linux-android
else: equals(ANDROID_TARGET_ARCH, x86_64): \
QMAKE_CFLAGS = -target x86_64-none-linux-android
else: equals(ANDROID_TARGET_ARCH, mips): \
QMAKE_CFLAGS += -target mipsel-none-linux-android
else: equals(ANDROID_TARGET_ARCH, mips64): \
QMAKE_CFLAGS = -target mips64el-none-linux-android

include(../common/android-base-tail.conf)
Loading

0 comments on commit f6fc342

Please sign in to comment.