mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-05 08:45:25 +08:00
qt 6.5.1 original
This commit is contained in:
34
tests/auto/tools/qmake/CMakeLists.txt
Normal file
34
tests/auto/tools/qmake/CMakeLists.txt
Normal file
@ -0,0 +1,34 @@
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
# Collect test data
|
||||
file(GLOB_RECURSE test_data_glob
|
||||
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
testdata/*)
|
||||
list(APPEND test_data ${test_data_glob})
|
||||
|
||||
qt_internal_add_test(tst_qmake
|
||||
SOURCES
|
||||
testcompiler.cpp testcompiler.h
|
||||
tst_qmake.cpp
|
||||
TESTDATA ${test_data}
|
||||
)
|
||||
|
||||
set(dependencies
|
||||
Qt::moc
|
||||
Qt::qmake
|
||||
)
|
||||
if(TARGET Qt::Gui)
|
||||
list(APPEND dependencies Qt::Gui)
|
||||
endif()
|
||||
if(TARGET Qt::Widgets)
|
||||
list(APPEND dependencies Qt::Widgets)
|
||||
endif()
|
||||
if(TARGET Qt::rcc)
|
||||
list(APPEND dependencies Qt::rcc)
|
||||
endif()
|
||||
if(TARGET Qt::uic)
|
||||
list(APPEND dependencies Qt::uic)
|
||||
endif()
|
||||
# Add dependencies that are implicitly used inside the test
|
||||
add_dependencies(tst_qmake ${dependencies})
|
322
tests/auto/tools/qmake/testcompiler.cpp
Normal file
322
tests/auto/tools/qmake/testcompiler.cpp
Normal file
@ -0,0 +1,322 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "testcompiler.h"
|
||||
|
||||
#include <QProcess>
|
||||
#include <QDir>
|
||||
|
||||
QString TestCompiler::targetName(BuildType buildMode, const QString& target, const QString& version)
|
||||
{
|
||||
Q_UNUSED(version);
|
||||
QString targetName = target;
|
||||
|
||||
#if defined (Q_OS_WIN32)
|
||||
switch (buildMode)
|
||||
{
|
||||
case Exe: // app
|
||||
targetName.append(".exe");
|
||||
break;
|
||||
case Dll: // dll
|
||||
if (!version.isEmpty())
|
||||
targetName.append(version.section(".", 0, 0));
|
||||
targetName.append(".dll");
|
||||
break;
|
||||
case Lib: // lib
|
||||
#ifdef Q_CC_GNU
|
||||
targetName.prepend("lib");
|
||||
targetName.append(".a");
|
||||
#else
|
||||
targetName.append(".lib");
|
||||
#endif
|
||||
break;
|
||||
case Plain:
|
||||
// no conversion
|
||||
break;
|
||||
}
|
||||
#elif defined( Q_OS_MAC )
|
||||
switch (buildMode)
|
||||
{
|
||||
case Exe: // app
|
||||
targetName += ".app/Contents/MacOS/" + target.section('/', -1);
|
||||
break;
|
||||
case Dll: // dll
|
||||
targetName.prepend("lib");
|
||||
if (!version.isEmpty())
|
||||
targetName.append('.' + version);
|
||||
targetName.append(".dylib");
|
||||
break;
|
||||
case Lib: // lib
|
||||
targetName.prepend("lib");
|
||||
targetName.append(".a");
|
||||
break;
|
||||
case Plain:
|
||||
// no conversion
|
||||
break;
|
||||
}
|
||||
#else
|
||||
switch (buildMode)
|
||||
{
|
||||
case Exe: // app
|
||||
break;
|
||||
case Dll: // dll
|
||||
targetName.prepend("lib");
|
||||
#if defined (Q_OS_HPUX) && !defined (__ia64)
|
||||
targetName.append(".sl");
|
||||
#elif defined (Q_OS_AIX)
|
||||
targetName.append(".a");
|
||||
#else
|
||||
targetName.append(".so");
|
||||
#endif
|
||||
break;
|
||||
case Lib: // lib
|
||||
targetName.prepend("lib");
|
||||
targetName.append(".a");
|
||||
break;
|
||||
case Plain:
|
||||
// no conversion
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
return targetName;
|
||||
}
|
||||
|
||||
TestCompiler::TestCompiler()
|
||||
{
|
||||
setBaseCommands( "", "" );
|
||||
}
|
||||
|
||||
TestCompiler::~TestCompiler()
|
||||
{
|
||||
}
|
||||
|
||||
bool TestCompiler::errorOut()
|
||||
{
|
||||
qDebug("%s", qPrintable(testOutput_.join(QStringLiteral("\n"))));
|
||||
return false;
|
||||
}
|
||||
|
||||
// Return the system environment, remove MAKEFLAGS variable in
|
||||
// case the CI uses jom passing flags incompatible to nmake
|
||||
// or vice versa.
|
||||
static inline QStringList systemEnvironment()
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
static QStringList result;
|
||||
if (result.isEmpty()) {
|
||||
foreach (const QString &variable, QProcess::systemEnvironment()) {
|
||||
if (variable.startsWith(QStringLiteral("MAKEFLAGS="), Qt::CaseInsensitive)) {
|
||||
qWarning("Removing environment setting '%s'", qPrintable(variable));
|
||||
} else {
|
||||
result.push_back(variable);
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
static const QStringList result = QProcess::systemEnvironment();
|
||||
#endif // ifdef Q_OS_WIN
|
||||
return result;
|
||||
}
|
||||
|
||||
bool TestCompiler::runCommand(const QString &cmd, const QStringList &args, bool expectFail)
|
||||
{
|
||||
QString dbg = cmd;
|
||||
if (dbg.contains(' '))
|
||||
dbg.prepend('"').append('"');
|
||||
foreach (QString arg, args) {
|
||||
if (arg.contains(' '))
|
||||
arg.prepend('"').append('"');
|
||||
dbg.append(' ').append(arg);
|
||||
}
|
||||
testOutput_.append("Running command: " + dbg);
|
||||
|
||||
QProcess child;
|
||||
child.setEnvironment(systemEnvironment() + environment_);
|
||||
|
||||
child.start(cmd, args);
|
||||
if (!child.waitForStarted(-1)) {
|
||||
testOutput_.append( "Unable to start child process." );
|
||||
return errorOut();
|
||||
}
|
||||
|
||||
child.waitForFinished(-1);
|
||||
bool ok = child.exitStatus() == QProcess::NormalExit && (expectFail ^ (child.exitCode() == 0));
|
||||
|
||||
for (auto channel : { QProcess::StandardOutput, QProcess::StandardError }) {
|
||||
child.setReadChannel(channel);
|
||||
while (!child.atEnd()) {
|
||||
const QString output = QString::fromLocal8Bit(child.readLine());
|
||||
if (output.startsWith("Project MESSAGE: FAILED"))
|
||||
ok = false;
|
||||
testOutput_.append(output);
|
||||
}
|
||||
}
|
||||
|
||||
return ok ? true : errorOut();
|
||||
}
|
||||
|
||||
void TestCompiler::setBaseCommands( QString makeCmd, QString qmakeCmd )
|
||||
{
|
||||
makeCmd_ = makeCmd;
|
||||
qmakeCmd_ = qmakeCmd;
|
||||
}
|
||||
|
||||
void TestCompiler::resetArguments()
|
||||
{
|
||||
makeArgs_.clear();
|
||||
qmakeArgs_.clear();
|
||||
}
|
||||
|
||||
void TestCompiler::setArguments(const QStringList &makeArgs, const QStringList &qmakeArgs)
|
||||
{
|
||||
makeArgs_ = makeArgs;
|
||||
qmakeArgs_ = qmakeArgs;
|
||||
}
|
||||
|
||||
void TestCompiler::resetEnvironment()
|
||||
{
|
||||
environment_.clear();
|
||||
}
|
||||
|
||||
void TestCompiler::addToEnvironment( QString varAssignment )
|
||||
{
|
||||
environment_.push_back(varAssignment);
|
||||
}
|
||||
|
||||
bool TestCompiler::makeClean( const QString &workPath )
|
||||
{
|
||||
QDir D;
|
||||
if (!D.exists(workPath)) {
|
||||
testOutput_.append( "Directory '" + workPath + "' doesn't exist" );
|
||||
return errorOut();
|
||||
}
|
||||
|
||||
D.setCurrent(workPath);
|
||||
QFileInfo Fi( workPath + "/Makefile");
|
||||
if (Fi.exists())
|
||||
// Run make clean
|
||||
return runCommand(makeCmd_, QStringList() << "clean");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TestCompiler::makeDistClean( const QString &workPath )
|
||||
{
|
||||
QDir D;
|
||||
if (!D.exists(workPath)) {
|
||||
testOutput_.append( "Directory '" + workPath + "' doesn't exist" );
|
||||
return errorOut();
|
||||
}
|
||||
|
||||
D.setCurrent(workPath);
|
||||
QFileInfo Fi( workPath + "/Makefile");
|
||||
if (Fi.exists())
|
||||
// Run make distclean
|
||||
return runCommand(makeCmd_, QStringList() << "distclean");
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
bool TestCompiler::qmakeProject( const QString &workDir, const QString &proName )
|
||||
{
|
||||
QDir D;
|
||||
if (!D.exists(workDir)) {
|
||||
testOutput_.append( "Directory '" + workDir + "' doesn't exist" );
|
||||
return errorOut();
|
||||
}
|
||||
D.setCurrent(workDir);
|
||||
|
||||
QString projectFile = proName;
|
||||
if (!projectFile.endsWith(".pro"))
|
||||
projectFile += ".pro";
|
||||
|
||||
return runCommand(qmakeCmd_, QStringList() << "-project" << "-o" << projectFile << "DESTDIR=./");
|
||||
}
|
||||
|
||||
bool TestCompiler::qmake(const QString &workDir, const QString &proName, const QString &buildDir,
|
||||
const QStringList &additionalArguments)
|
||||
{
|
||||
QDir D;
|
||||
D.setCurrent( workDir );
|
||||
|
||||
if (D.exists("Makefile"))
|
||||
D.remove("Makefile");
|
||||
|
||||
QString projectFile = proName;
|
||||
QString makeFile = buildDir;
|
||||
if (!projectFile.endsWith(".pro"))
|
||||
projectFile += ".pro";
|
||||
if (!makeFile.isEmpty() && !makeFile.endsWith('/'))
|
||||
makeFile += '/';
|
||||
makeFile += "Makefile";
|
||||
|
||||
// Now start qmake and generate the makefile
|
||||
return runCommand(qmakeCmd_, QStringList(qmakeArgs_) << projectFile << "-o" << makeFile
|
||||
<< additionalArguments);
|
||||
}
|
||||
|
||||
bool TestCompiler::qmake(const QString &workDir, const QStringList &arguments)
|
||||
{
|
||||
QDir d;
|
||||
d.setCurrent(workDir); // ### runCommand should take a workingDir argument instead
|
||||
return runCommand(qmakeCmd_, arguments);
|
||||
}
|
||||
|
||||
bool TestCompiler::make( const QString &workPath, const QString &target, bool expectFail )
|
||||
{
|
||||
QDir D;
|
||||
D.setCurrent( workPath );
|
||||
|
||||
QStringList args = makeArgs_;
|
||||
if (makeCmd_.contains("nmake", Qt::CaseInsensitive) ||
|
||||
makeCmd_.contains("jom", Qt::CaseInsensitive)) {
|
||||
args << "/NOLOGO";
|
||||
}
|
||||
if (!target.isEmpty())
|
||||
args << target;
|
||||
|
||||
return runCommand(makeCmd_, args, expectFail);
|
||||
}
|
||||
|
||||
bool TestCompiler::exists( const QString &destDir, const QString &exeName, BuildType buildType, const QString &version )
|
||||
{
|
||||
QFileInfo f(destDir + QLatin1Char('/') + targetName(buildType, exeName, version));
|
||||
return f.exists();
|
||||
}
|
||||
|
||||
bool TestCompiler::removeMakefile( const QString &workPath )
|
||||
{
|
||||
return removeFile( workPath, "Makefile" );
|
||||
}
|
||||
|
||||
bool TestCompiler::removeProject( const QString &workPath, const QString &project )
|
||||
{
|
||||
QString projectFile = project;
|
||||
if (!projectFile.endsWith(".pro"))
|
||||
projectFile += ".pro";
|
||||
|
||||
return removeFile( workPath, projectFile );
|
||||
}
|
||||
|
||||
bool TestCompiler::removeFile( const QString &workPath, const QString &fileName )
|
||||
{
|
||||
QDir D;
|
||||
D.setCurrent( workPath );
|
||||
|
||||
return ( D.exists( fileName ) ) ? D.remove( fileName ) : true;
|
||||
}
|
||||
|
||||
QString TestCompiler::commandOutput() const
|
||||
{
|
||||
#ifndef Q_OS_WIN
|
||||
return testOutput_.join("\n");
|
||||
#else
|
||||
return testOutput_.join("\r\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
void TestCompiler::clearCommandOutput()
|
||||
{
|
||||
testOutput_.clear();
|
||||
}
|
73
tests/auto/tools/qmake/testcompiler.h
Normal file
73
tests/auto/tools/qmake/testcompiler.h
Normal file
@ -0,0 +1,73 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
#ifndef TESTCOMPILER_H
|
||||
#define TESTCOMPILER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QStringList>
|
||||
|
||||
enum BuildType { Exe, Dll, Lib, Plain };
|
||||
|
||||
class TestCompiler : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TestCompiler();
|
||||
virtual ~TestCompiler();
|
||||
|
||||
void setBaseCommands( QString makeCmd, QString qmakeCmd );
|
||||
|
||||
void resetArguments();
|
||||
void setArguments(const QStringList &makeArgs, const QStringList &qmakeArgs);
|
||||
|
||||
void resetEnvironment();
|
||||
void addToEnvironment( QString varAssignment );
|
||||
|
||||
static QString targetName(BuildType buildMode, const QString& target, const QString& version);
|
||||
|
||||
// executes a make clean in the specified workPath
|
||||
bool makeClean( const QString &workPath );
|
||||
// executes a make dist clean in the specified workPath
|
||||
bool makeDistClean( const QString &workPath );
|
||||
// executes a qmake -project on the specified workDir
|
||||
bool qmakeProject( const QString &workDir, const QString &proName );
|
||||
// executes a qmake on proName in the specified workDir, output goes to buildDir or workDir if it's null
|
||||
bool qmake(const QString &workDir, const QString &proName, const QString &buildDir = QString(),
|
||||
const QStringList &additionalArguments = QStringList());
|
||||
// executes qmake in workDir with the specified arguments
|
||||
bool qmake(const QString &workDir, const QStringList &arguments);
|
||||
// executes a make in the specified workPath, with an optional target (eg. install)
|
||||
bool make( const QString &workPath, const QString &target = QString(), bool expectFail = false );
|
||||
// checks if the executable exists in destDir
|
||||
bool exists(const QString &destDir, const QString &exeName, BuildType buildType,
|
||||
const QString &version = QString());
|
||||
// removes the makefile
|
||||
bool removeMakefile( const QString &workPath );
|
||||
// removes the project file specified by 'project' on the 'workPath'
|
||||
bool removeProject( const QString &workPath, const QString &project );
|
||||
// removes the file specified by 'fileName' on the 'workPath'
|
||||
bool removeFile( const QString &workPath, const QString &fileName );
|
||||
|
||||
// Returns each line of stdout/stderr of the last commands
|
||||
// separated by platform-specific line endings.
|
||||
QString commandOutput() const;
|
||||
|
||||
// clear the results of storage of stdout for running previous commands
|
||||
void clearCommandOutput();
|
||||
|
||||
bool runCommand(const QString &cmd, const QStringList &args, bool expectFail = false);
|
||||
|
||||
private:
|
||||
bool errorOut();
|
||||
|
||||
QString makeCmd_;
|
||||
QStringList makeArgs_;
|
||||
QString qmakeCmd_;
|
||||
QStringList qmakeArgs_;
|
||||
QStringList environment_;
|
||||
|
||||
QStringList testOutput_;
|
||||
};
|
||||
|
||||
#endif // TESTCOMPILER_H
|
7
tests/auto/tools/qmake/testdata/bundle-spaces/bundle-spaces.pro
vendored
Normal file
7
tests/auto/tools/qmake/testdata/bundle-spaces/bundle-spaces.pro
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
SOURCES += main.cpp
|
||||
|
||||
QWERTY_BUNDLE.version = Bogus.78
|
||||
QWERTY_BUNDLE.files = some-file "existing file" "non-existing file"
|
||||
QWERTY_BUNDLE.path = QwertyData
|
||||
|
||||
QMAKE_BUNDLE_DATA = QWERTY_BUNDLE
|
0
tests/auto/tools/qmake/testdata/bundle-spaces/existing file
vendored
Normal file
0
tests/auto/tools/qmake/testdata/bundle-spaces/existing file
vendored
Normal file
0
tests/auto/tools/qmake/testdata/bundle-spaces/main.cpp
vendored
Normal file
0
tests/auto/tools/qmake/testdata/bundle-spaces/main.cpp
vendored
Normal file
6
tests/auto/tools/qmake/testdata/bundle-spaces/some-file
vendored
Normal file
6
tests/auto/tools/qmake/testdata/bundle-spaces/some-file
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
all:
|
||||
C:\git\qt-kinetic-animations\bin\qmake qdir.pro -o Makefile -spec win32-msvc2008
|
||||
nmake -f Makefile
|
||||
first: all
|
||||
qmake:
|
||||
C:\git\qt-kinetic-animations\bin\qmake qdir.pro -o Makefile -spec win32-msvc2008
|
5
tests/auto/tools/qmake/testdata/conflicting_targets/conflicting_targets.pro
vendored
Normal file
5
tests/auto/tools/qmake/testdata/conflicting_targets/conflicting_targets.pro
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
TEMPLATE = app
|
||||
CONFIG += debug_and_release build_all
|
||||
TARGET = bah
|
||||
DESTDIR = shu
|
||||
SOURCES += main.cpp
|
4
tests/auto/tools/qmake/testdata/conflicting_targets/main.cpp
vendored
Normal file
4
tests/auto/tools/qmake/testdata/conflicting_targets/main.cpp
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
int main(int, char **)
|
||||
{
|
||||
return 0;
|
||||
}
|
7
tests/auto/tools/qmake/testdata/duplicateLibraryEntries/duplib.pro
vendored
Normal file
7
tests/auto/tools/qmake/testdata/duplicateLibraryEntries/duplib.pro
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
LIBS = -lqui -lqtest -lqui
|
||||
CONFIG -= link_prl
|
||||
JOINEDLIBS = $$join(LIBS, "_")
|
||||
|
||||
!contains(JOINEDLIBS, -lqui_-lqtest_-lqui) {
|
||||
message("FAILED: duplibs")
|
||||
}
|
0
tests/auto/tools/qmake/testdata/export_across_file_boundaries/.qmake.cache
vendored
Normal file
0
tests/auto/tools/qmake/testdata/export_across_file_boundaries/.qmake.cache
vendored
Normal file
1
tests/auto/tools/qmake/testdata/export_across_file_boundaries/features/default_post.prf
vendored
Normal file
1
tests/auto/tools/qmake/testdata/export_across_file_boundaries/features/default_post.prf
vendored
Normal file
@ -0,0 +1 @@
|
||||
# This just balances default_pre.prf (which does not daisy-chain to the one from qmake).
|
7
tests/auto/tools/qmake/testdata/export_across_file_boundaries/features/default_pre.prf
vendored
Normal file
7
tests/auto/tools/qmake/testdata/export_across_file_boundaries/features/default_pre.prf
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
defineTest(setVar) {
|
||||
eval($${1}=bar)
|
||||
export($$1)
|
||||
}
|
||||
|
||||
setVar(FOO)
|
||||
|
17
tests/auto/tools/qmake/testdata/export_across_file_boundaries/foo.pro
vendored
Normal file
17
tests/auto/tools/qmake/testdata/export_across_file_boundaries/foo.pro
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
TEMPLATE = aux
|
||||
CONFIG =
|
||||
|
||||
!equals(FOO,bar) {
|
||||
message( "FAILED: export() invisible from default_pre.prf to foo.pro" )
|
||||
}
|
||||
|
||||
O_FOO=$$fromfile(oink.pri,FOO)
|
||||
O_BAR=$$fromfile(oink.pri,BAR)
|
||||
|
||||
!equals(O_BAR,bar) {
|
||||
message( "FAILED: export() invisible from oink.pri through \$$fromfile()" )
|
||||
}
|
||||
|
||||
!equals(O_FOO,bar) {
|
||||
message( "FAILED: export() invisible from default_pre.prf through \$$fromfile()" )
|
||||
}
|
2
tests/auto/tools/qmake/testdata/export_across_file_boundaries/oink.pri
vendored
Normal file
2
tests/auto/tools/qmake/testdata/export_across_file_boundaries/oink.pri
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
load(default_pre)
|
||||
setVar(BAR)
|
15
tests/auto/tools/qmake/testdata/findDeps/findDeps.pro
vendored
Normal file
15
tests/auto/tools/qmake/testdata/findDeps/findDeps.pro
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
DESTDIR = ./
|
||||
gcc: QMAKE_CXXFLAGS += -Wno-comment
|
||||
|
||||
HEADERS += object1.h \
|
||||
object2.h \
|
||||
object3.h \
|
||||
object4.h \
|
||||
object5.h \
|
||||
object6.h \
|
||||
object7.h \
|
||||
object8.h \
|
||||
object9.h \
|
||||
objecta.h \
|
||||
objectf.h
|
||||
SOURCES += main.cpp needed.cpp
|
60
tests/auto/tools/qmake/testdata/findDeps/main.cpp
vendored
Normal file
60
tests/auto/tools/qmake/testdata/findDeps/main.cpp
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#define spurious \
|
||||
/ #include "needed.cpp"
|
||||
// if not ignored, symbol needed() won't be available ...
|
||||
|
||||
// Check we're not confused by string juxtaposition:
|
||||
static const char text[] = "lorem ""ipsum /*";
|
||||
|
||||
#include <moc_object1.cpp>
|
||||
/**/ #include "\
|
||||
moc_object2.cpp\
|
||||
"
|
||||
/**//**/ #include <moc_\
|
||||
o\
|
||||
b\
|
||||
j\
|
||||
e\
|
||||
c\
|
||||
t\
|
||||
3\
|
||||
.cpp>
|
||||
/*'"*/ #include <moc_object4.cpp>
|
||||
/*"'
|
||||
*/ #include <moc_object5.cpp> /*
|
||||
#include "missing.cpp"
|
||||
*/// a backslash newline does make the next line part of this comment \
|
||||
/* so this text is in last line's C++-style comment, not a C-comment !
|
||||
#include <moc_object6.cpp>
|
||||
#if 0
|
||||
#pragma "ignore me" '&' L"me"
|
||||
#line 4321 "main.cpp" more /* preprocessing */ tokens
|
||||
#endif
|
||||
|
||||
static void function1();
|
||||
#include/* every comment
|
||||
gets replaced (in phase 3) by a single
|
||||
space */<moc_object7.cpp>
|
||||
static void function2(); /**/
|
||||
#include \
|
||||
<moc_object8.cpp>
|
||||
static void function3(); //
|
||||
#include <moc_object9.cpp>
|
||||
/* backslash-newline elimination happens in phase 2 *\
|
||||
/ # /* and that's valid here, too. *\
|
||||
/ include/* and, of course, here *\
|
||||
/<moc_objecta.cpp>// while we're here, ... \
|
||||
#include "needed.cpp"
|
||||
|
||||
int main () {
|
||||
extern int needed(void);
|
||||
return needed();
|
||||
}
|
||||
|
||||
/*
|
||||
Deliberately end file in a #include, with nothing after it but the mandatory
|
||||
(unescaped) newline at the end of every source file.
|
||||
*/
|
||||
#include "moc_objectf.cpp"
|
1
tests/auto/tools/qmake/testdata/findDeps/needed.cpp
vendored
Normal file
1
tests/auto/tools/qmake/testdata/findDeps/needed.cpp
vendored
Normal file
@ -0,0 +1 @@
|
||||
extern int needed(void) { return 1; }
|
11
tests/auto/tools/qmake/testdata/findDeps/object1.h
vendored
Normal file
11
tests/auto/tools/qmake/testdata/findDeps/object1.h
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class Object1 : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
};
|
||||
|
11
tests/auto/tools/qmake/testdata/findDeps/object2.h
vendored
Normal file
11
tests/auto/tools/qmake/testdata/findDeps/object2.h
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class Object2 : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
};
|
||||
|
11
tests/auto/tools/qmake/testdata/findDeps/object3.h
vendored
Normal file
11
tests/auto/tools/qmake/testdata/findDeps/object3.h
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class Object3 : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
};
|
||||
|
11
tests/auto/tools/qmake/testdata/findDeps/object4.h
vendored
Normal file
11
tests/auto/tools/qmake/testdata/findDeps/object4.h
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class Object4 : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
};
|
||||
|
11
tests/auto/tools/qmake/testdata/findDeps/object5.h
vendored
Normal file
11
tests/auto/tools/qmake/testdata/findDeps/object5.h
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class Object5 : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
};
|
||||
|
11
tests/auto/tools/qmake/testdata/findDeps/object6.h
vendored
Normal file
11
tests/auto/tools/qmake/testdata/findDeps/object6.h
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class Object6 : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
};
|
||||
|
11
tests/auto/tools/qmake/testdata/findDeps/object7.h
vendored
Normal file
11
tests/auto/tools/qmake/testdata/findDeps/object7.h
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class Object7 : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
};
|
||||
|
11
tests/auto/tools/qmake/testdata/findDeps/object8.h
vendored
Normal file
11
tests/auto/tools/qmake/testdata/findDeps/object8.h
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class Object8 : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
};
|
||||
|
11
tests/auto/tools/qmake/testdata/findDeps/object9.h
vendored
Normal file
11
tests/auto/tools/qmake/testdata/findDeps/object9.h
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class Object9 : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
};
|
||||
|
11
tests/auto/tools/qmake/testdata/findDeps/objecta.h
vendored
Normal file
11
tests/auto/tools/qmake/testdata/findDeps/objecta.h
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class ObjectA : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
};
|
||||
|
11
tests/auto/tools/qmake/testdata/findDeps/objectf.h
vendored
Normal file
11
tests/auto/tools/qmake/testdata/findDeps/objectf.h
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class ObjectF : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
};
|
||||
|
8
tests/auto/tools/qmake/testdata/findMocs/digitseparated.h
vendored
Normal file
8
tests/auto/tools/qmake/testdata/findMocs/digitseparated.h
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
#include <QObject>
|
||||
|
||||
class AfterDigitSeparator : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AfterDigitSeparator() : QObject(nullptr) {}
|
||||
};
|
6
tests/auto/tools/qmake/testdata/findMocs/findMocs.pro
vendored
Normal file
6
tests/auto/tools/qmake/testdata/findMocs/findMocs.pro
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
DESTDIR = ./
|
||||
|
||||
HEADERS += object1.h object2.h object3.h object4.h \
|
||||
object5.h object6.h object7.h object8.h object9.h \
|
||||
digitseparated.h
|
||||
SOURCES += main.cpp
|
19
tests/auto/tools/qmake/testdata/findMocs/main.cpp
vendored
Normal file
19
tests/auto/tools/qmake/testdata/findMocs/main.cpp
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include <moc_object1.cpp>
|
||||
#include <moc_object2.cpp>
|
||||
#include <moc_object3.cpp>
|
||||
#include "object4.h"
|
||||
#include <moc_object5.cpp>
|
||||
#include <moc_object6.cpp>
|
||||
#include <moc_object7.cpp>
|
||||
#include "object8.h"
|
||||
#include <moc_object9.cpp>
|
||||
|
||||
int main() { return 0'000; }
|
||||
/* Included *after* the use of a numeric literal with an *odd* number of digit
|
||||
separator tick marks in it (and no subsequent apostrophe to end the
|
||||
"single-quoted character literal" that the old parser though it was thus left
|
||||
in). */
|
||||
#include <moc_digitseparated.cpp>
|
12
tests/auto/tools/qmake/testdata/findMocs/object1.h
vendored
Normal file
12
tests/auto/tools/qmake/testdata/findMocs/object1.h
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
/**//*'*/
|
||||
#include <QObject>
|
||||
|
||||
class Object1 : public QObject
|
||||
{
|
||||
Q\
|
||||
_OBJECT
|
||||
};
|
11
tests/auto/tools/qmake/testdata/findMocs/object2.h
vendored
Normal file
11
tests/auto/tools/qmake/testdata/findMocs/object2.h
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
/**//*"*/
|
||||
#include <QObject>
|
||||
|
||||
class Object2 : public QObject
|
||||
{
|
||||
Q_\
|
||||
OBJECT
|
||||
};
|
12
tests/auto/tools/qmake/testdata/findMocs/object3.h
vendored
Normal file
12
tests/auto/tools/qmake/testdata/findMocs/object3.h
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
/*
|
||||
*/
|
||||
#include <QObject>
|
||||
|
||||
class Object3 : public QObject
|
||||
{
|
||||
Q_OBJ\
|
||||
ECT
|
||||
};
|
22
tests/auto/tools/qmake/testdata/findMocs/object4.h
vendored
Normal file
22
tests/auto/tools/qmake/testdata/findMocs/object4.h
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
#include <QObject>
|
||||
|
||||
/*/ <-- Inside a comment
|
||||
|
||||
class Object4 : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
};
|
||||
|
||||
Comment ends there --> /*/
|
||||
|
||||
// Now we poison moc, just to make sure this doesn't get moc'ed :)
|
||||
class NonMocObject4
|
||||
/* : QObject */
|
||||
{
|
||||
/* qmake ignore Q_OBJECT */
|
||||
Q_OBJECT
|
||||
};
|
10
tests/auto/tools/qmake/testdata/findMocs/object5.h
vendored
Normal file
10
tests/auto/tools/qmake/testdata/findMocs/object5.h
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class Object5 : public QObject
|
||||
{
|
||||
/**/Q_OBJECT
|
||||
};
|
||||
|
12
tests/auto/tools/qmake/testdata/findMocs/object6.h
vendored
Normal file
12
tests/auto/tools/qmake/testdata/findMocs/object6.h
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
/**//*'*/
|
||||
#include <QObject>
|
||||
|
||||
class Object6 : public QObject
|
||||
{
|
||||
/**//*
|
||||
*/Q_OBJECT
|
||||
};
|
||||
|
13
tests/auto/tools/qmake/testdata/findMocs/object7.h
vendored
Normal file
13
tests/auto/tools/qmake/testdata/findMocs/object7.h
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
/**//*'*/
|
||||
#include <QObject>
|
||||
#define bogon /"/*"
|
||||
|
||||
class Object7 : public QObject
|
||||
{
|
||||
//
|
||||
Q_OBJECT
|
||||
};
|
||||
|
20
tests/auto/tools/qmake/testdata/findMocs/object8.h
vendored
Normal file
20
tests/auto/tools/qmake/testdata/findMocs/object8.h
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
#include <QObject>
|
||||
#define Q_OBJECTOID_THING // empty
|
||||
|
||||
class Object8 : public QObject
|
||||
{
|
||||
Q_OBJECT\
|
||||
OID_THING
|
||||
};
|
||||
|
||||
// Now we poison moc, just to make sure this doesn't get moc'ed :)
|
||||
class NonMocObject8
|
||||
/* : QObject */
|
||||
{
|
||||
/* qmake ignore Q_OBJECT */
|
||||
Q_OBJECT
|
||||
};
|
11
tests/auto/tools/qmake/testdata/findMocs/object9.h
vendored
Normal file
11
tests/auto/tools/qmake/testdata/findMocs/object9.h
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
#include <QObject>
|
||||
#define juxtaposed "lorem ""ipsum /*"
|
||||
|
||||
class Object9 : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
};
|
11
tests/auto/tools/qmake/testdata/include_dir/foo.pro
vendored
Normal file
11
tests/auto/tools/qmake/testdata/include_dir/foo.pro
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
UI_DIR =
|
||||
MOC_DIR=
|
||||
TEMPLATE=app
|
||||
TARGET=foo
|
||||
FORMS=untitled.ui
|
||||
HEADERS=test_file.h
|
||||
SOURCES=\
|
||||
test_file.cpp\
|
||||
main.cpp
|
||||
CONFIG -= debug_and_release_target
|
||||
QT += widgets
|
13
tests/auto/tools/qmake/testdata/include_dir/main.cpp
vendored
Normal file
13
tests/auto/tools/qmake/testdata/include_dir/main.cpp
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
#include "test_file.h"
|
||||
#include <qapplication.h>
|
||||
|
||||
int main( int argc, char **argv )
|
||||
{
|
||||
QApplication a( argc, argv );
|
||||
SomeObject sc;
|
||||
return a.exec();
|
||||
}
|
10
tests/auto/tools/qmake/testdata/include_dir/test_file.cpp
vendored
Normal file
10
tests/auto/tools/qmake/testdata/include_dir/test_file.cpp
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
#include "test_file.h"
|
||||
|
||||
SomeObject::SomeObject() : QWidget()
|
||||
{
|
||||
setupUi( this );
|
||||
}
|
14
tests/auto/tools/qmake/testdata/include_dir/test_file.h
vendored
Normal file
14
tests/auto/tools/qmake/testdata/include_dir/test_file.h
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
#include <qwidget.h>
|
||||
|
||||
#include "ui_untitled.h"
|
||||
|
||||
class SomeObject : public QWidget, public Ui_Form
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SomeObject();
|
||||
signals:
|
||||
void someSignal();
|
||||
};
|
22
tests/auto/tools/qmake/testdata/include_dir/untitled.ui
vendored
Normal file
22
tests/auto/tools/qmake/testdata/include_dir/untitled.ui
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
<ui version="4.0" >
|
||||
<author></author>
|
||||
<comment></comment>
|
||||
<exportmacro></exportmacro>
|
||||
<class>Form</class>
|
||||
<widget class="QWidget" name="Form" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>Form</string>
|
||||
</property>
|
||||
</widget>
|
||||
<pixmapfunction></pixmapfunction>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
1
tests/auto/tools/qmake/testdata/include_dir_build/README
vendored
Normal file
1
tests/auto/tools/qmake/testdata/include_dir_build/README
vendored
Normal file
@ -0,0 +1 @@
|
||||
Here to ensure include_dir_build exists
|
2
tests/auto/tools/qmake/testdata/include_pwd/anotherheader.h
vendored
Normal file
2
tests/auto/tools/qmake/testdata/include_pwd/anotherheader.h
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
/* This file should be included indirectly through main.cpp */
|
4
tests/auto/tools/qmake/testdata/include_pwd/include_pwd.pro
vendored
Normal file
4
tests/auto/tools/qmake/testdata/include_pwd/include_pwd.pro
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
TEMPLATE = app
|
||||
SOURCES = main.cpp
|
||||
CONFIG -= debug_and_release_target
|
||||
INCLUDEPATH += somedirectory
|
6
tests/auto/tools/qmake/testdata/include_pwd/main.cpp
vendored
Normal file
6
tests/auto/tools/qmake/testdata/include_pwd/main.cpp
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
#include "someheader.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
return 0;
|
||||
}
|
1
tests/auto/tools/qmake/testdata/include_pwd/somedirectory/someheader.h
vendored
Normal file
1
tests/auto/tools/qmake/testdata/include_pwd/somedirectory/someheader.h
vendored
Normal file
@ -0,0 +1 @@
|
||||
#include "anotherheader.h"
|
20
tests/auto/tools/qmake/testdata/install_depends/foo.pro
vendored
Normal file
20
tests/auto/tools/qmake/testdata/install_depends/foo.pro
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
TEMPLATE=app
|
||||
TARGET=foo
|
||||
CONFIG -= debug_and_release_target
|
||||
|
||||
HEADERS=test_file.h
|
||||
SOURCES=\
|
||||
test_file.cpp\
|
||||
main.cpp
|
||||
|
||||
test1.files=test1
|
||||
test1.path=dist
|
||||
INSTALLS+=test1
|
||||
|
||||
test2.files=test2
|
||||
test2.path=dist
|
||||
INSTALLS+=test2
|
||||
|
||||
target.path=dist
|
||||
target.depends=install_test1 install_test2
|
||||
INSTALLS+=target
|
13
tests/auto/tools/qmake/testdata/install_depends/main.cpp
vendored
Normal file
13
tests/auto/tools/qmake/testdata/install_depends/main.cpp
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
#include "test_file.h"
|
||||
#include <qguiapplication.h>
|
||||
|
||||
int main( int argc, char **argv )
|
||||
{
|
||||
QGuiApplication a( argc, argv );
|
||||
SomeObject sc;
|
||||
return a.exec();
|
||||
}
|
0
tests/auto/tools/qmake/testdata/install_depends/test1
vendored
Normal file
0
tests/auto/tools/qmake/testdata/install_depends/test1
vendored
Normal file
0
tests/auto/tools/qmake/testdata/install_depends/test2
vendored
Normal file
0
tests/auto/tools/qmake/testdata/install_depends/test2
vendored
Normal file
9
tests/auto/tools/qmake/testdata/install_depends/test_file.cpp
vendored
Normal file
9
tests/auto/tools/qmake/testdata/install_depends/test_file.cpp
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
#include "test_file.h"
|
||||
|
||||
SomeObject::SomeObject() : QObject()
|
||||
{
|
||||
}
|
12
tests/auto/tools/qmake/testdata/install_depends/test_file.h
vendored
Normal file
12
tests/auto/tools/qmake/testdata/install_depends/test_file.h
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
#include <qobject.h>
|
||||
|
||||
class SomeObject : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SomeObject();
|
||||
signals:
|
||||
void someSignal();
|
||||
};
|
12
tests/auto/tools/qmake/testdata/one_space/main.cpp
vendored
Normal file
12
tests/auto/tools/qmake/testdata/one_space/main.cpp
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
|
||||
#include <qguiapplication.h>
|
||||
|
||||
int main( int argc, char **argv )
|
||||
{
|
||||
QGuiApplication a( argc, argv );
|
||||
return a.exec();
|
||||
}
|
4
tests/auto/tools/qmake/testdata/one_space/one_space.pro
vendored
Normal file
4
tests/auto/tools/qmake/testdata/one_space/one_space.pro
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
TEMPLATE = app
|
||||
SOURCES = main.cpp
|
||||
TARGET = "one space"
|
||||
DESTDIR = ./
|
19
tests/auto/tools/qmake/testdata/pro_file_cache/pro_file_cache.pro
vendored
Normal file
19
tests/auto/tools/qmake/testdata/pro_file_cache/pro_file_cache.pro
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
TEMPLATE = app
|
||||
CONFIG -= debug_and_release_target
|
||||
|
||||
SOURCES =
|
||||
|
||||
content = ""
|
||||
write_file("include.pri", content)
|
||||
include(include.pri)
|
||||
|
||||
content = "SOURCES = main.cpp"
|
||||
write_file("include.pri", content)
|
||||
include(include.pri)
|
||||
|
||||
# Make sure that including the .pri file a second time will reload it properly
|
||||
# off disk with the new content.
|
||||
isEmpty(SOURCES): error(No sources defined)
|
||||
|
||||
# Empty it again to silence qmake about non-existance sources
|
||||
SOURCES =
|
12
tests/auto/tools/qmake/testdata/project/main.cpp
vendored
Normal file
12
tests/auto/tools/qmake/testdata/project/main.cpp
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "test_file.h"
|
||||
#include <qguiapplication.h>
|
||||
|
||||
int main( int argc, char **argv )
|
||||
{
|
||||
QGuiApplication a(argc, argv);
|
||||
SomeObject sc;
|
||||
return a.exec();
|
||||
}
|
5
tests/auto/tools/qmake/testdata/project/test.qrc
vendored
Normal file
5
tests/auto/tools/qmake/testdata/project/test.qrc
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>test.qrc</file>
|
||||
</qresource>
|
||||
</RCC>
|
8
tests/auto/tools/qmake/testdata/project/test_file.cpp
vendored
Normal file
8
tests/auto/tools/qmake/testdata/project/test_file.cpp
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "test_file.h"
|
||||
|
||||
SomeObject::SomeObject() : QObject()
|
||||
{
|
||||
}
|
13
tests/auto/tools/qmake/testdata/project/test_file.h
vendored
Normal file
13
tests/auto/tools/qmake/testdata/project/test_file.h
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include <qobject.h>
|
||||
|
||||
class SomeObject : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SomeObject();
|
||||
signals:
|
||||
void someSignal();
|
||||
};
|
1
tests/auto/tools/qmake/testdata/prompt/prompt.pro
vendored
Normal file
1
tests/auto/tools/qmake/testdata/prompt/prompt.pro
vendored
Normal file
@ -0,0 +1 @@
|
||||
# a = $$prompt(Prompteroo)
|
1
tests/auto/tools/qmake/testdata/quotedfilenames/include folder/header.h
vendored
Normal file
1
tests/auto/tools/qmake/testdata/quotedfilenames/include folder/header.h
vendored
Normal file
@ -0,0 +1 @@
|
||||
/* a random header file */
|
13
tests/auto/tools/qmake/testdata/quotedfilenames/main.cpp
vendored
Normal file
13
tests/auto/tools/qmake/testdata/quotedfilenames/main.cpp
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include <header.h>
|
||||
|
||||
#include <qguiapplication.h>
|
||||
|
||||
int main( int argc, char **argv )
|
||||
{
|
||||
QGuiApplication a( argc, argv );
|
||||
return a.exec();
|
||||
}
|
||||
|
24
tests/auto/tools/qmake/testdata/quotedfilenames/quotedfilenames.pro
vendored
Normal file
24
tests/auto/tools/qmake/testdata/quotedfilenames/quotedfilenames.pro
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
TEMPLATE = app
|
||||
TARGET = quotedfilenames
|
||||
SOURCES = main.cpp
|
||||
|
||||
CONFIG += no_batch
|
||||
|
||||
INCLUDEPATH += "include folder"
|
||||
|
||||
RCCINPUT = "rc folder/test.qrc"
|
||||
RCCOUTPUT = "cpp folder/test.cpp"
|
||||
|
||||
qtPrepareLibExecTool(QMAKE_RCC, rcc)
|
||||
|
||||
rcc_test.commands = $$QMAKE_RCC -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
|
||||
rcc_test.output = $$RCCOUTPUT
|
||||
rcc_test.input = RCCINPUT
|
||||
rcc_test.variable_out = SOURCES
|
||||
rcc_test.name = RCC_TEST
|
||||
rcc_test.CONFIG += no_link
|
||||
rcc_test.depends = $$QMAKE_RCC_EXE
|
||||
|
||||
QMAKE_EXTRA_COMPILERS += rcc_test
|
||||
|
||||
DESTDIR = ./
|
BIN
tests/auto/tools/qmake/testdata/quotedfilenames/rc folder/logo.png
vendored
Normal file
BIN
tests/auto/tools/qmake/testdata/quotedfilenames/rc folder/logo.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
5
tests/auto/tools/qmake/testdata/quotedfilenames/rc folder/test.qrc
vendored
Normal file
5
tests/auto/tools/qmake/testdata/quotedfilenames/rc folder/test.qrc
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource>
|
||||
<file>logo.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
107
tests/auto/tools/qmake/testdata/rawString/main.cpp
vendored
Normal file
107
tests/auto/tools/qmake/testdata/rawString/main.cpp
vendored
Normal file
@ -0,0 +1,107 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
// macro names that *aren't* string-literal-prefixes:
|
||||
#define Ru8 "rue-it"
|
||||
#define RL "real life"
|
||||
#define Ru "are you ?"
|
||||
#define RU "Are You ?"
|
||||
#define LLR "double-hockey-sticks"
|
||||
#define LUR "Tricky"
|
||||
#define LuR "tricky"
|
||||
#define Lu8R "l'uber"
|
||||
#define UUR "Double-Yew"
|
||||
#define ULR "Eweler"
|
||||
#define UuR "You ... you-are"
|
||||
#define Uu8R "You ... you *ate* our ..."
|
||||
#define uuR "water"
|
||||
#define uLR "eweler"
|
||||
#define uUR "double-Your"
|
||||
#define uu8R "totally uber"
|
||||
#define u8u8R "rubber-you"
|
||||
#define u8LR "Uber left-to-right"
|
||||
#define u8UR "Uber Upper-Right"
|
||||
#define u8uR "Uber upper-right"
|
||||
#define Ru8R "bouncy"
|
||||
#define RLR "Marching"
|
||||
#define RuR "Rossum's general-purpose workers"
|
||||
#define RUR "Rossum's Universal Robots"
|
||||
|
||||
static const char monstrosity[] =
|
||||
Ru8"Ru8("
|
||||
RL"RL("
|
||||
Ru"Ru("
|
||||
RU"RU("
|
||||
LLR"LLR("
|
||||
LUR"LUR("
|
||||
LuR"LuR("
|
||||
Lu8R"Lu8R("
|
||||
UUR"UUR("
|
||||
ULR"ULR("
|
||||
UuR"UuR("
|
||||
Uu8R"Uu8R("
|
||||
uuR"uuR("
|
||||
uLR"uLR("
|
||||
uUR"uUR("
|
||||
uu8R"uu8R("
|
||||
u8u8R"u8u8R("
|
||||
u8LR"u8LR("
|
||||
u8UR"u8UR("
|
||||
u8uR"u8uR("
|
||||
Ru8R"Ru8R("
|
||||
RLR"RLR("
|
||||
RuR"RuR("
|
||||
RUR"RUR("
|
||||
"Finally, some content";
|
||||
|
||||
#include <moc_object2.cpp>
|
||||
|
||||
static const char closure[] =
|
||||
")RUR"
|
||||
")RuR"
|
||||
")RLR"
|
||||
")Ru8R"
|
||||
")u8uR"
|
||||
")u8UR"
|
||||
")u8LR"
|
||||
")u8u8R"
|
||||
")uu8R"
|
||||
")uUR"
|
||||
")uLR"
|
||||
")uuR"
|
||||
")Uu8R"
|
||||
")UuR"
|
||||
")ULR"
|
||||
")UUR"
|
||||
")Lu8R"
|
||||
")LuR"
|
||||
")LUR"
|
||||
")LLR"
|
||||
")RU"
|
||||
")Ru"
|
||||
")RL"
|
||||
")Ru8";
|
||||
// If moc got confused, the confusion should now be over
|
||||
|
||||
// Real raw strings, not actually leaving us inside any comments:
|
||||
static const char raw[] = R"blah(lorem " ipsum /*)blah"\
|
||||
;
|
||||
static const wchar_t wider[] = LR"blah(lorem " ipsum /*)blah"\
|
||||
;
|
||||
static const char32_t UCS4[] = UR"blah(lorem " ipsum /*)blah"\
|
||||
;
|
||||
static const char16_t UCS2[] = uR"blah(lorem " ipsum /*)blah"\
|
||||
;
|
||||
static const char utf8[] = u8R"blah(lorem " ipsum /*)blah"\
|
||||
;
|
||||
#include <moc_object1.cpp>
|
||||
|
||||
/* Avoid unused variable warnings by silly uses of arrays: */
|
||||
#define final(x) x[sizeof(x) - 1] // 0, of course
|
||||
int main () {
|
||||
return final(raw)
|
||||
* (final(wider) - final(UCS4))
|
||||
* (final(UCS2) - final(utf8))
|
||||
* (final(monstrosity) - final(closure));
|
||||
}
|
||||
#undef final
|
10
tests/auto/tools/qmake/testdata/rawString/object1.h
vendored
Normal file
10
tests/auto/tools/qmake/testdata/rawString/object1.h
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#define rawstring R"blah(lorem " ipsum /*)blah";
|
||||
#include <QObject>
|
||||
|
||||
class Object1 : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
};
|
24
tests/auto/tools/qmake/testdata/rawString/object2.h
vendored
Normal file
24
tests/auto/tools/qmake/testdata/rawString/object2.h
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
#ifndef TEST_QMAKE_RAWSTRING_OBJECT2_H
|
||||
#define TEST_QMAKE_RAWSTRING_OBJECT2_H
|
||||
|
||||
#define Lu8UR "land"
|
||||
inline char opener(int i) {
|
||||
const char text[] = Lu8UR"blah( not a raw string; just juxtaposed";
|
||||
return text[i];
|
||||
}
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class Object2 : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
};
|
||||
|
||||
inline char closer(int i) {
|
||||
const char text[] = "pretend to close it, all the same )blah";
|
||||
return text[i];
|
||||
}
|
||||
|
||||
#endif // TEST_QMAKE_RAWSTRING_OBJECT2_H
|
4
tests/auto/tools/qmake/testdata/rawString/rawString.pro
vendored
Normal file
4
tests/auto/tools/qmake/testdata/rawString/rawString.pro
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
DESTDIR = ./
|
||||
|
||||
HEADERS += object1.h object2.h
|
||||
SOURCES += main.cpp
|
12
tests/auto/tools/qmake/testdata/resources/main.cpp
vendored
Normal file
12
tests/auto/tools/qmake/testdata/resources/main.cpp
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
|
||||
#include <qguiapplication.h>
|
||||
|
||||
int main( int argc, char **argv )
|
||||
{
|
||||
QGuiApplication a( argc, argv );
|
||||
return a.exec();
|
||||
}
|
11
tests/auto/tools/qmake/testdata/resources/resources.pro
vendored
Normal file
11
tests/auto/tools/qmake/testdata/resources/resources.pro
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
TEMPLATE = app
|
||||
CONFIG -= debug_and_release
|
||||
SOURCES = main.cpp
|
||||
|
||||
pro_file.files = resources.pro
|
||||
pro_file.prefix = /prefix
|
||||
|
||||
subdir.files = subdir/file.txt
|
||||
subdir.base = subdir
|
||||
|
||||
RESOURCES = test.qrc main.cpp pro_file subdir
|
0
tests/auto/tools/qmake/testdata/resources/subdir/file.txt
vendored
Normal file
0
tests/auto/tools/qmake/testdata/resources/subdir/file.txt
vendored
Normal file
5
tests/auto/tools/qmake/testdata/resources/test.qrc
vendored
Normal file
5
tests/auto/tools/qmake/testdata/resources/test.qrc
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>test.qrc</file>
|
||||
</qresource>
|
||||
</RCC>
|
14
tests/auto/tools/qmake/testdata/shadow_files/foo.pro
vendored
Normal file
14
tests/auto/tools/qmake/testdata/shadow_files/foo.pro
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
TEMPLATE=app
|
||||
CONFIG -= debug_and_release_target
|
||||
TARGET=foo
|
||||
HEADERS=test_file.h
|
||||
SOURCES=\
|
||||
test_file.cpp\
|
||||
main.cpp
|
||||
|
||||
target.path=dist
|
||||
INSTALLS+=target
|
||||
|
||||
test.files=test.txt foo.bar
|
||||
test.path=dist
|
||||
INSTALLS+=test
|
13
tests/auto/tools/qmake/testdata/shadow_files/main.cpp
vendored
Normal file
13
tests/auto/tools/qmake/testdata/shadow_files/main.cpp
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
#include "test_file.h"
|
||||
#include <qguiapplication.h>
|
||||
|
||||
int main( int argc, char **argv )
|
||||
{
|
||||
QGuiApplication a( argc, argv );
|
||||
SomeObject sc;
|
||||
return a.exec();
|
||||
}
|
0
tests/auto/tools/qmake/testdata/shadow_files/test.txt
vendored
Normal file
0
tests/auto/tools/qmake/testdata/shadow_files/test.txt
vendored
Normal file
9
tests/auto/tools/qmake/testdata/shadow_files/test_file.cpp
vendored
Normal file
9
tests/auto/tools/qmake/testdata/shadow_files/test_file.cpp
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
#include "test_file.h"
|
||||
|
||||
SomeObject::SomeObject() : QObject()
|
||||
{
|
||||
}
|
12
tests/auto/tools/qmake/testdata/shadow_files/test_file.h
vendored
Normal file
12
tests/auto/tools/qmake/testdata/shadow_files/test_file.h
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
#include <qobject.h>
|
||||
|
||||
class SomeObject : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SomeObject();
|
||||
signals:
|
||||
void someSignal();
|
||||
};
|
1
tests/auto/tools/qmake/testdata/shadow_files_build/README
vendored
Normal file
1
tests/auto/tools/qmake/testdata/shadow_files_build/README
vendored
Normal file
@ -0,0 +1 @@
|
||||
Here to ensure shadow_files_build exists, used by the shadow_files test.
|
0
tests/auto/tools/qmake/testdata/shadow_files_build/foo.bar
vendored
Normal file
0
tests/auto/tools/qmake/testdata/shadow_files_build/foo.bar
vendored
Normal file
1
tests/auto/tools/qmake/testdata/simple_app/build/README
vendored
Normal file
1
tests/auto/tools/qmake/testdata/simple_app/build/README
vendored
Normal file
@ -0,0 +1 @@
|
||||
Here to ensure build/ exists, used by the simple_app_shadowbuild2 test.
|
14
tests/auto/tools/qmake/testdata/simple_app/main.cpp
vendored
Normal file
14
tests/auto/tools/qmake/testdata/simple_app/main.cpp
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
|
||||
#include "test_file.h"
|
||||
#include <qguiapplication.h>
|
||||
|
||||
int main( int argc, char **argv )
|
||||
{
|
||||
QGuiApplication a( argc, argv );
|
||||
SomeObject sc;
|
||||
return a.exec();
|
||||
}
|
12
tests/auto/tools/qmake/testdata/simple_app/simple_app.pro
vendored
Normal file
12
tests/auto/tools/qmake/testdata/simple_app/simple_app.pro
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
TEMPLATE = app
|
||||
HEADERS = test_file.h
|
||||
SOURCES = test_file.cpp \
|
||||
main.cpp
|
||||
RESOURCES = test.qrc
|
||||
TARGET = "simple app"
|
||||
DESTDIR = "dest dir"
|
||||
|
||||
target.path = $$OUT_PWD/dist
|
||||
INSTALLS += target
|
||||
|
||||
!build_pass:msvc:CONFIG(debug, debug|release):message("check for pdb, please")
|
5
tests/auto/tools/qmake/testdata/simple_app/test.qrc
vendored
Normal file
5
tests/auto/tools/qmake/testdata/simple_app/test.qrc
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>test.qrc</file>
|
||||
</qresource>
|
||||
</RCC>
|
9
tests/auto/tools/qmake/testdata/simple_app/test_file.cpp
vendored
Normal file
9
tests/auto/tools/qmake/testdata/simple_app/test_file.cpp
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
#include "test_file.h"
|
||||
|
||||
SomeObject::SomeObject() : QObject()
|
||||
{
|
||||
}
|
12
tests/auto/tools/qmake/testdata/simple_app/test_file.h
vendored
Normal file
12
tests/auto/tools/qmake/testdata/simple_app/test_file.h
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
#include <qobject.h>
|
||||
|
||||
class SomeObject : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SomeObject();
|
||||
signals:
|
||||
void someSignal();
|
||||
};
|
1
tests/auto/tools/qmake/testdata/simple_app_build/README
vendored
Normal file
1
tests/auto/tools/qmake/testdata/simple_app_build/README
vendored
Normal file
@ -0,0 +1 @@
|
||||
Placeholder file to ensure this directory exists
|
18
tests/auto/tools/qmake/testdata/simple_dll/simple.cpp
vendored
Normal file
18
tests/auto/tools/qmake/testdata/simple_dll/simple.cpp
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
#include "simple.h"
|
||||
|
||||
Simple::Simple()
|
||||
{
|
||||
}
|
||||
|
||||
Simple::~Simple()
|
||||
{
|
||||
}
|
||||
|
||||
QString Simple::test()
|
||||
{
|
||||
return "This is a test";
|
||||
}
|
21
tests/auto/tools/qmake/testdata/simple_dll/simple.h
vendored
Normal file
21
tests/auto/tools/qmake/testdata/simple_dll/simple.h
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
#ifndef SIMPLE_H
|
||||
#define SIMPLE_H
|
||||
|
||||
#include <qstring.h>
|
||||
|
||||
//class SIMPLEDLL_EXPORT Simple
|
||||
class Simple
|
||||
{
|
||||
public:
|
||||
Simple();
|
||||
~Simple();
|
||||
|
||||
QString test();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
14
tests/auto/tools/qmake/testdata/simple_dll/simple_dll.pro
vendored
Normal file
14
tests/auto/tools/qmake/testdata/simple_dll/simple_dll.pro
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
TEMPLATE = lib
|
||||
CONFIG += dll
|
||||
|
||||
win32:DEFINES += SIMPLEDLL_MAKEDLL
|
||||
|
||||
HEADERS = simple.h
|
||||
SOURCES = simple.cpp
|
||||
|
||||
VERSION = 1.0.0
|
||||
INCLUDEPATH += . tmp
|
||||
MOC_DIR = tmp
|
||||
OBJECTS_DIR = tmp
|
||||
TARGET = "simple dll"
|
||||
DESTDIR = "dest dir"
|
18
tests/auto/tools/qmake/testdata/simple_lib/simple.cpp
vendored
Normal file
18
tests/auto/tools/qmake/testdata/simple_lib/simple.cpp
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
#include "simple.h"
|
||||
|
||||
Simple::Simple()
|
||||
{
|
||||
}
|
||||
|
||||
Simple::~Simple()
|
||||
{
|
||||
}
|
||||
|
||||
QString Simple::test()
|
||||
{
|
||||
return "This is a test";
|
||||
}
|
20
tests/auto/tools/qmake/testdata/simple_lib/simple.h
vendored
Normal file
20
tests/auto/tools/qmake/testdata/simple_lib/simple.h
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
#ifndef SIMPLE_H
|
||||
#define SIMPLE_H
|
||||
|
||||
#include <qstring.h>
|
||||
|
||||
class Simple
|
||||
{
|
||||
public:
|
||||
Simple();
|
||||
~Simple();
|
||||
|
||||
QString test();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
13
tests/auto/tools/qmake/testdata/simple_lib/simple_lib.pro
vendored
Normal file
13
tests/auto/tools/qmake/testdata/simple_lib/simple_lib.pro
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
TEMPLATE = lib
|
||||
CONFIG += release staticlib
|
||||
CONFIG -= dll
|
||||
|
||||
HEADERS = simple.h
|
||||
SOURCES = simple.cpp
|
||||
|
||||
VERSION = 1.0.0
|
||||
INCLUDEPATH += . tmp
|
||||
MOC_DIR = tmp
|
||||
OBJECTS_DIR = tmp
|
||||
TARGET = "simple lib"
|
||||
DESTDIR = "dest dir"
|
7
tests/auto/tools/qmake/testdata/subdir_via_pro_file_extra_target/simple/main.cpp
vendored
Normal file
7
tests/auto/tools/qmake/testdata/subdir_via_pro_file_extra_target/simple/main.cpp
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
int main(int,char**)
|
||||
{
|
||||
}
|
5
tests/auto/tools/qmake/testdata/subdir_via_pro_file_extra_target/simple/simple.pro
vendored
Normal file
5
tests/auto/tools/qmake/testdata/subdir_via_pro_file_extra_target/simple/simple.pro
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
TEMPLATE = app
|
||||
SOURCES = main.cpp
|
||||
|
||||
extratarget.commands = @echo extra target worked OK
|
||||
QMAKE_EXTRA_TARGETS += extratarget
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user