Skip to content

Commit

Permalink
Merge "Merge remote-tracking branch 'origin/5.7' into dev" into refs/…
Browse files Browse the repository at this point in the history
…staging/dev
  • Loading branch information
ediosyncratic authored and The Qt Project committed Jul 22, 2016
2 parents b5f18da + 782ebea commit 601019e
Show file tree
Hide file tree
Showing 161 changed files with 1,821 additions and 946 deletions.
2 changes: 1 addition & 1 deletion doc/global/externalsites/external-resources.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
*/

/*!
\externalpage http://code.google.com/p/angleproject/
\externalpage https://chromium.googlesource.com/angle/angle/+/master/README.md
\title ANGLE
*/

Expand Down
2 changes: 1 addition & 1 deletion examples/network/torrent/connectionmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ QByteArray ConnectionManager::clientId() const
// Generate peer id
qint64 startupTime = QDateTime::currentSecsSinceEpoch();

id += QString::asprintf("-QT%04x-", (QT_VERSION % 0xffff00) >> 8).toLatin1();
id += QString::asprintf("-QT%04x-", QT_VERSION >> 8).toLatin1();
id += QByteArray::number(startupTime, 10);
id += QByteArray(20 - id.size(), '-');
}
Expand Down
2 changes: 1 addition & 1 deletion examples/opengl/qopenglwindow/background_renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ void FragmentToy::draw(const QSize &windowSize)
m_program->enableAttributeArray("vertexCoord");
m_vertex_buffer.release();

m_program->setUniformValue("currentTime", (uint) QDateTime::currentDateTime().toMSecsSinceEpoch());
m_program->setUniformValue("currentTime", (uint) QDateTime::currentMSecsSinceEpoch());
m_program->setUniformValue("windowSize", windowSize);

QOpenGLContext::currentContext()->functions()->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
Expand Down
2 changes: 1 addition & 1 deletion examples/widgets/painting/pathstroke/pathstroke.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ void PathStrokeRenderer::initializePoints()
m_vectors.clear();

QMatrix m;
qreal rot = 360 / count;
qreal rot = 360.0 / count;
QPointF center(width() / 2, height() / 2);
QMatrix vm;
vm.shear(2, -1);
Expand Down
2 changes: 1 addition & 1 deletion mkspecs/common/clang.conf
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ QMAKE_LFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG

# Wrapper tools that understand .o/.a files with LLVM bytecode instead of machine code
QMAKE_AR_LTCG = llvm-ar cqs
QMAKE_NM_LTCG = gcc-nm -P
QMAKE_NM_LTCG = llvm-nm -P
QMAKE_RANLIB_LTCG = true # No need to run, since llvm-ar has "s"
1 change: 1 addition & 0 deletions mkspecs/common/mac.conf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ QMAKE_LIBS_THREAD =

QMAKE_DSYMUTIL = dsymutil
QMAKE_STRIP = strip
QMAKE_STRIPFLAGS_LIB += -S -x

QMAKE_AR = ar cq
QMAKE_RANLIB = ranlib -s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</Properties>

<Dependencies>
<TargetDeviceFamily Name=\"Windows.Universal\" MinVersion=\"10.0.10240.0\" MaxVersionTested=\"10.0.10586.0\" />$${WINRT_MANIFEST.dependencies}
<TargetDeviceFamily Name=\"Windows.Universal\" MinVersion=\"10.0.10586.0\" MaxVersionTested=\"10.0.10586.0\" />$${WINRT_MANIFEST.dependencies}
</Dependencies>

<Resources>
Expand Down
3 changes: 1 addition & 2 deletions mkspecs/features/file_copies.prf
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
isEmpty(COPIES): return()
contains(TEMPLATE, .*subdirs): error("COPIES does not work with TEMPLATE=subdirs")

build_pass:build_all: \
debug_and_release:debug {
build_pass:build_all:!isEqual(BUILD_PASS, $$first(BUILDS)) {
# Avoid that multiple build passes race with each other.
# This will fail to copy anything if the user explicitly invokes
# only the non-primary build. This is unfixable, as at qmake time
Expand Down
2 changes: 1 addition & 1 deletion mkspecs/features/qt.prf
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ for(ever) {
!isEmpty(var_sfx): break()
var_sfx = _PRIVATE
}
!isEmpty(using_privates):!no_private_qt_headers_warning:if(!debug_and_release|!build_pass) {
!isEmpty(using_privates):!no_private_qt_headers_warning:!build_pass {
message("This project is using private headers and will therefore be tied to this specific Qt module build version.")
message("Running this project against other versions of the Qt modules may crash at any arbitrary point.")
message("This is not a bug, but a result of using Qt internals. You have been warned!")
Expand Down
6 changes: 3 additions & 3 deletions mkspecs/features/qt_common.prf
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ warnings_are_errors:warning_clean {
# Work-around for bug https://code.google.com/p/android/issues/detail?id=58135
android: QMAKE_CXXFLAGS_WARN_ON += -Wno-error=literal-suffix
}
} else:msvc {
# enable for MSVC 2012, MSVC 2013
equals(MSVC_VER, "11.0")|equals(MSVC_VER, "12.0"): QMAKE_CXXFLAGS_WARN_ON += -WX
} else:msvc:!intel_icl {
# enable for MSVC 2012, MSVC 2013, MSVC 2015
contains(MSVC_VER, "1[124].0"): QMAKE_CXXFLAGS_WARN_ON += -WX
}
unset(ver)
}
Expand Down
2 changes: 1 addition & 1 deletion mkspecs/features/qt_docs_targets.prf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ contains(TEMPLATE, subdirs) {
for(inst, DOC_TARGETS): \
prepareRecursiveTarget($$inst)
} else {
debug_and_release:!build_pass {
!isEmpty(BUILDS):!build_pass {
sub = $$first(BUILDS)
for(inst, DOC_TARGETS) {
$${inst}.CONFIG = recursive
Expand Down
5 changes: 4 additions & 1 deletion mkspecs/features/qt_functions.prf
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,10 @@ defineReplace(pkgConfigExecutable) {
}

defineTest(packagesExist) {
contains(QT_CONFIG, no-pkg-config):return(false)
contains(QT_CONFIG, no-pkg-config) {
warning("pkg-config disabled, can't check package existence")
return(false)
}

# this can't be done in global scope here because qt_functions is loaded
# before the .pro is parsed, so if the .pro set PKG_CONFIG, we wouldn't know it
Expand Down
2 changes: 1 addition & 1 deletion mkspecs/features/resources.prf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ for(resource, RESOURCES) {

resource_file = $$RCC_DIR/qmake_$${resource}.qrc

!debug_and_release|build_pass {
isEmpty(BUILDS)|build_pass {
# Collection of files, generate qrc file
prefix = $$eval($${resource}.prefix)
isEmpty(prefix): \
Expand Down
3 changes: 3 additions & 0 deletions mkspecs/netbsd-g++/qmake.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ QMAKE_LIBDIR_X11 = /usr/X11R7/lib
QMAKE_INCDIR_OPENGL = /usr/X11R7/include
QMAKE_LIBDIR_OPENGL = /usr/X11R7/lib

# NetBSD requires rpath to be used for all lib dirs, see http://www.netbsd.org/docs/elf.html
QMAKE_RPATHDIR += $$QMAKE_LIBDIR $$QMAKE_LIBDIR_X11

include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
load(qt_config)
17 changes: 17 additions & 0 deletions mkspecs/openbsd-g++/qmake.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,26 @@ QMAKE_LIBDIR_X11 = /usr/X11R6/lib
QMAKE_INCDIR_OPENGL = /usr/X11R6/include
QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib

QMAKE_RPATHDIR += $$QMAKE_LIBDIR_X11

include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)

# System compiler is gcc 4.2.1 up to OpenBSD 6.0.
# For proper C++11 support, we need to use a newer gcc from ports/packages,
# where compiler commands are renamed to egcc/eg++. Therefore, redefine
# mkspecs/common/g++-base.conf compiler commands
QMAKE_CC = egcc

QMAKE_LINK_C = $$QMAKE_CC
QMAKE_LINK_C_SHLIB = $$QMAKE_CC

QMAKE_CXX = eg++

QMAKE_LINK = $$QMAKE_CXX
QMAKE_LINK_SHLIB = $$QMAKE_CXX


# Reset g++-unix.conf's NOUNDEF flags as OpenBSD libc can't handle environ
QMAKE_LFLAGS_NOUNDEF =

Expand Down
13 changes: 9 additions & 4 deletions qmake/library/qmakebuiltins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,11 @@ ProStringList QMakeEvaluator::evaluateBuiltinExpand(
QString rstr = QDir::cleanPath(
QDir(args.count() > 1 ? args.at(1).toQString(m_tmp2) : currentDirectory())
.absoluteFilePath(args.at(0).toQString(m_tmp1)));
ret << (rstr.isSharedWith(m_tmp1) ? args.at(0) : ProString(rstr).setSource(args.at(0)));
ret << (rstr.isSharedWith(m_tmp1)
? args.at(0)
: args.count() > 1 && rstr.isSharedWith(m_tmp2)
? args.at(1)
: ProString(rstr).setSource(args.at(0)));
}
break;
case E_RELATIVE_PATH:
Expand Down Expand Up @@ -1305,7 +1309,8 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional(
return ReturnFalse;
case T_REQUIRES:
#ifdef PROEVALUATOR_FULL
checkRequirements(args);
if (checkRequirements(args) == ReturnError)
return ReturnError;
#endif
return ReturnFalse; // Another qmake breakage
case T_EVAL: {
Expand All @@ -1327,8 +1332,8 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional(
evalError(fL1S("if(condition) requires one argument."));
return ReturnFalse;
}
return returnBool(evaluateConditional(args.at(0).toQStringRef(),
m_current.pro->fileName(), m_current.line));
return evaluateConditional(args.at(0).toQStringRef(),
m_current.pro->fileName(), m_current.line);
}
case T_CONFIG: {
if (args.count() < 1 || args.count() > 2) {
Expand Down
Loading

0 comments on commit 601019e

Please sign in to comment.