Solutions: Long live Solutions!

Short live Tasking in Solutions!

Add src/libs/solutions/README.md with the motivation and hints.

Move TaskTree and Barrier from Utils into Tasking object lib,
the first solution in Solutions project.

Tasking: Some more work is still required for adapting auto and
manual tests. Currently they use Async task, which stayed in Utils.
For Qt purposed we most probably need to have a clone of
Async task inside the Tasking namespace that is more Qt-like
(no Utils::FutureSynchronizer, no priority field,
global QThreadPool instead of a custom one for Creator).

Change-Id: I5d10a2d68170ffa467d8c299be5995b9aa4f8f77
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Jarek Kobus
2023-05-10 21:38:41 +02:00
parent 520412d147
commit f84199f8b7
49 changed files with 208 additions and 115 deletions

View File

@@ -2,22 +2,22 @@ add_subdirectory(3rdparty)
add_subdirectory(advanceddockingsystem)
add_subdirectory(aggregation)
add_subdirectory(extensionsystem)
add_subdirectory(utils)
add_subdirectory(languageutils)
add_subdirectory(cplusplus)
add_subdirectory(modelinglib)
add_subdirectory(nanotrace)
add_subdirectory(qmljs)
add_subdirectory(qmldebug)
add_subdirectory(qmleditorwidgets)
add_subdirectory(extensionsystem)
add_subdirectory(glsl)
add_subdirectory(languageserverprotocol)
add_subdirectory(languageutils)
add_subdirectory(modelinglib)
add_subdirectory(nanotrace)
add_subdirectory(qmldebug)
add_subdirectory(qmleditorwidgets)
add_subdirectory(qmljs)
add_subdirectory(qmlpuppetcommunication)
add_subdirectory(qtcreatorcdbext)
add_subdirectory(solutions)
add_subdirectory(sqlite)
add_subdirectory(tracing)
add_subdirectory(qmlpuppetcommunication)
add_subdirectory(qtcreatorcdbext)
add_subdirectory(utils)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/qlitehtml/src/CMakeLists.txt)
option(BUILD_LIBRARY_QLITEHTML "Build library qlitehtml." ${BUILD_LIBRARIES_BY_DEFAULT})

View File

@@ -19,6 +19,7 @@ Project {
"qmljs/qmljs.qbs",
"qmldebug/qmldebug.qbs",
"qtcreatorcdbext/qtcreatorcdbext.qbs",
"solutions/solutions.qbs",
"sqlite/sqlite.qbs",
"tracing/tracing.qbs",
"utils/process_ctrlc_stub.qbs",

View File

@@ -0,0 +1 @@
add_subdirectory(tasking)

View File

@@ -0,0 +1,48 @@
# Solutions project
The Solutions project is designed to contain a collection of
object libraries, independent on any Creator's specific code,
ready to be a part of Qt. Kind of a staging area for possible
inclusions into Qt.
## Motivation and benefits
- Such a separation will ensure no future back dependencies to the Creator
specific code are introduced by mistake during maintenance.
- Easy to compile outside of Creator code.
- General hub of ideas to be considered by foundation team to be integrated
into Qt.
- The more stuff of a general purpose goes into Qt, the less maintenance work
for Creator.
## Conformity of solutions
Each solution:
- Is a separate object lib.
- Is placed in a separate subdirectory.
- Is enclosed within a namespace (namespace name = solution name).
- Should compile independently, i.e. there are no cross-includes
between solutions.
## Dependencies of solution libraries
**Do not add dependencies to non-Qt libraries.**
The only allowed dependencies are to Qt libraries.
Especially, don't add dependencies to any Creator's library
nor to any 3rd party library.
If you can't avoid a dependency to the other Creator's library
in your solution, place it somewhere else (e.g. inside Utils library).
The Utils lib depends on the solution libraries.
## Predictions on possible integration into Qt
The solutions in this project may have a bigger / faster chance to be
integrated into Qt when they:
- Conform to Qt API style.
- Integrate easily with existing classes / types in Qt
(instead of providing own structures / data types).
- Have full docs.
- Have auto tests.
- Have at least one example (however, autotests often play this role, too).

View File

@@ -0,0 +1,7 @@
Project {
name: "Solutions"
references: [
"tasking/tasking.qbs",
].concat(project.additionalLibs)
}

View File

@@ -0,0 +1,9 @@
add_qtc_library(Tasking OBJECT
# Never add dependencies to non-Qt libraries for this library
DEPENDS Qt::Core
PUBLIC_DEFINES TASKING_LIBRARY
SOURCES
barrier.cpp barrier.h
tasking_global.h
tasktree.cpp tasktree.h
)

View File

@@ -3,13 +3,13 @@
#pragma once
#include "utils_global.h"
#include "tasking_global.h"
#include "tasktree.h"
namespace Tasking {
class QTCREATOR_UTILS_EXPORT Barrier final : public QObject
class TASKING_EXPORT Barrier final : public QObject
{
Q_OBJECT
@@ -34,7 +34,7 @@ private:
int m_current = -1;
};
class QTCREATOR_UTILS_EXPORT BarrierTaskAdapter : public Tasking::TaskAdapter<Barrier>
class TASKING_EXPORT BarrierTaskAdapter : public Tasking::TaskAdapter<Barrier>
{
public:
BarrierTaskAdapter() { connect(task(), &Barrier::done, this, &TaskInterface::done); }
@@ -70,7 +70,7 @@ using MultiBarrier = TreeStorage<SharedBarrier<Limit>>;
// alias template deduction only available with C++20.
using SingleBarrier = MultiBarrier<1>;
class QTCREATOR_UTILS_EXPORT WaitForBarrierTask : public BarrierTask
class TASKING_EXPORT WaitForBarrierTask : public BarrierTask
{
public:
template <int Limit>

View File

@@ -0,0 +1,14 @@
QtcLibrary {
name: "Tasking"
Depends { name: "Qt"; submodules: ["core"] }
cpp.defines: base.concat("TASKING_LIBRARY")
files: [
"barrier.cpp",
"barrier.h",
"tasking_global.h",
"tasktree.cpp",
"tasktree.h",
]
}

View File

@@ -0,0 +1,14 @@
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#pragma once
#include <qglobal.h>
#if defined(TASKING_LIBRARY)
# define TASKING_EXPORT Q_DECL_EXPORT
#elif defined(TASKING_STATIC_LIBRARY)
# define TASKING_EXPORT
#else
# define TASKING_EXPORT Q_DECL_IMPORT
#endif

View File

@@ -1,4 +1,4 @@
// Copyright (C) 2022 The Qt Company Ltd.
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "tasktree.h"

View File

@@ -1,9 +1,9 @@
// Copyright (C) 2022 The Qt Company Ltd.
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#pragma once
#include "utils_global.h"
#include "tasking_global.h"
#include <QHash>
#include <QObject>
@@ -16,7 +16,7 @@ class TaskContainer;
class TaskNode;
class TaskTreePrivate;
class QTCREATOR_UTILS_EXPORT TaskInterface : public QObject
class TASKING_EXPORT TaskInterface : public QObject
{
Q_OBJECT
@@ -28,7 +28,7 @@ signals:
void done(bool success);
};
class QTCREATOR_UTILS_EXPORT TreeStorageBase
class TASKING_EXPORT TreeStorageBase
{
public:
bool isValid() const;
@@ -110,7 +110,7 @@ enum class TaskAction
StopWithError
};
class QTCREATOR_UTILS_EXPORT TaskItem
class TASKING_EXPORT TaskItem
{
public:
// Internal, provided by QTC_DECLARE_CUSTOM_TASK
@@ -186,32 +186,32 @@ private:
QList<TaskItem> m_children;
};
class QTCREATOR_UTILS_EXPORT Group : public TaskItem
class TASKING_EXPORT Group : public TaskItem
{
public:
Group(const QList<TaskItem> &children) { addChildren(children); }
Group(std::initializer_list<TaskItem> children) { addChildren(children); }
};
class QTCREATOR_UTILS_EXPORT Storage : public TaskItem
class TASKING_EXPORT Storage : public TaskItem
{
public:
Storage(const TreeStorageBase &storage) : TaskItem(storage) { }
};
class QTCREATOR_UTILS_EXPORT ParallelLimit : public TaskItem
class TASKING_EXPORT ParallelLimit : public TaskItem
{
public:
ParallelLimit(int parallelLimit) : TaskItem(qMax(parallelLimit, 0)) {}
};
class QTCREATOR_UTILS_EXPORT Workflow : public TaskItem
class TASKING_EXPORT Workflow : public TaskItem
{
public:
Workflow(WorkflowPolicy policy) : TaskItem(policy) {}
};
class QTCREATOR_UTILS_EXPORT OnGroupSetup : public TaskItem
class TASKING_EXPORT OnGroupSetup : public TaskItem
{
public:
template <typename SetupFunction>
@@ -237,20 +237,20 @@ private:
};
};
class QTCREATOR_UTILS_EXPORT OnGroupDone : public TaskItem
class TASKING_EXPORT OnGroupDone : public TaskItem
{
public:
OnGroupDone(const GroupEndHandler &handler) : TaskItem({{}, handler}) {}
};
class QTCREATOR_UTILS_EXPORT OnGroupError : public TaskItem
class TASKING_EXPORT OnGroupError : public TaskItem
{
public:
OnGroupError(const GroupEndHandler &handler) : TaskItem({{}, {}, handler}) {}
};
// Synchronous invocation. Similarly to Group - isn't counted as a task inside taskCount()
class QTCREATOR_UTILS_EXPORT Sync : public Group
class TASKING_EXPORT Sync : public Group
{
public:
@@ -276,13 +276,13 @@ private:
};
QTCREATOR_UTILS_EXPORT extern ParallelLimit sequential;
QTCREATOR_UTILS_EXPORT extern ParallelLimit parallel;
QTCREATOR_UTILS_EXPORT extern Workflow stopOnError;
QTCREATOR_UTILS_EXPORT extern Workflow continueOnError;
QTCREATOR_UTILS_EXPORT extern Workflow stopOnDone;
QTCREATOR_UTILS_EXPORT extern Workflow continueOnDone;
QTCREATOR_UTILS_EXPORT extern Workflow optional;
TASKING_EXPORT extern ParallelLimit sequential;
TASKING_EXPORT extern ParallelLimit parallel;
TASKING_EXPORT extern Workflow stopOnError;
TASKING_EXPORT extern Workflow continueOnError;
TASKING_EXPORT extern Workflow stopOnDone;
TASKING_EXPORT extern Workflow continueOnDone;
TASKING_EXPORT extern Workflow optional;
template <typename Task>
class TaskAdapter : public TaskInterface
@@ -354,7 +354,7 @@ private:
class TaskTreePrivate;
class QTCREATOR_UTILS_EXPORT TaskTree final : public QObject
class TASKING_EXPORT TaskTree final : public QObject
{
Q_OBJECT
@@ -407,7 +407,7 @@ private:
TaskTreePrivate *d;
};
class QTCREATOR_UTILS_EXPORT TaskTreeTaskAdapter : public TaskAdapter<TaskTree>
class TASKING_EXPORT TaskTreeTaskAdapter : public TaskAdapter<TaskTree>
{
public:
TaskTreeTaskAdapter();

View File

@@ -1,5 +1,5 @@
add_qtc_library(Utils
DEPENDS Qt::Qml Qt::Xml
DEPENDS Tasking Qt::Qml Qt::Xml
PUBLIC_DEPENDS
Qt::Concurrent Qt::Core Qt::Network Qt::Gui Qt::Widgets
Qt::Core5Compat
@@ -13,7 +13,6 @@ add_qtc_library(Utils
archive.cpp archive.h
aspects.cpp aspects.h
async.cpp async.h
barrier.cpp barrier.h
basetreeview.cpp basetreeview.h
benchmarker.cpp benchmarker.h
buildablehelperlibrary.cpp buildablehelperlibrary.h
@@ -171,7 +170,6 @@ add_qtc_library(Utils
styleanimator.cpp styleanimator.h
styledbar.cpp styledbar.h
stylehelper.cpp stylehelper.h
tasktree.cpp tasktree.h
templateengine.cpp templateengine.h
temporarydirectory.cpp temporarydirectory.h
temporaryfile.cpp temporaryfile.h

View File

@@ -7,7 +7,8 @@
#include "futuresynchronizer.h"
#include "qtcassert.h"
#include "tasktree.h"
#include <solutions/tasking/tasktree.h>
#include <QFutureWatcher>
#include <QtConcurrent>

View File

@@ -4,9 +4,10 @@
#include "filestreamer.h"
#include "async.h"
#include "barrier.h"
#include "process.h"
#include <solutions/tasking/barrier.h>
#include <QFile>
#include <QMutex>
#include <QMutexLocker>

View File

@@ -6,7 +6,8 @@
#include "utils_global.h"
#include "filepath.h"
#include "tasktree.h"
#include <solutions/tasking/tasktree.h>
#include <QObject>

View File

@@ -11,7 +11,8 @@
#include "commandline.h"
#include "processenums.h"
#include "tasktree.h"
#include <solutions/tasking/tasktree.h>
#include <QProcess>

View File

@@ -35,6 +35,7 @@ Project {
Depends { name: "Qt"; submodules: ["concurrent", "core-private", "network", "qml", "widgets", "xml"] }
Depends { name: "Qt.macextras"; condition: Qt.core.versionMajor < 6 && qbs.targetOS.contains("macos") }
Depends { name: "Tasking" }
Depends { name: "app_version_header" }
Depends { name: "ptyqt" }
@@ -51,8 +52,6 @@ Project {
"aspects.h",
"async.cpp",
"async.h",
"barrier.cpp",
"barrier.h",
"basetreeview.cpp",
"basetreeview.h",
"benchmarker.cpp",
@@ -308,8 +307,6 @@ Project {
"styledbar.h",
"stylehelper.cpp",
"stylehelper.h",
"tasktree.cpp",
"tasktree.h",
"templateengine.cpp",
"templateengine.h",
"temporarydirectory.cpp",

View File

@@ -23,7 +23,6 @@
#include <utils/algorithm.h>
#include <utils/process.h>
#include <utils/stringutils.h>
#include <utils/tasktree.h>
#include <QLoggingCategory>

View File

@@ -21,11 +21,12 @@
#include <projectexplorer/projectmanager.h>
#include <projectexplorer/target.h>
#include <solutions/tasking/tasktree.h>
#include <texteditor/textdocument.h>
#include <texteditor/texteditor.h>
#include <utils/qtcassert.h>
#include <utils/tasktree.h>
#include <QLoggingCategory>
#include <QScopeGuard>

View File

@@ -5,10 +5,11 @@
#include <coreplugin/core_global.h>
#include <solutions/tasking/tasktree.h>
#include <utils/filepath.h>
#include <utils/id.h>
#include <utils/link.h>
#include <utils/tasktree.h>
#include <QIcon>
#include <QKeySequence>

View File

@@ -6,9 +6,10 @@
#include "futureprogress.h"
#include "progressmanager.h"
#include <solutions/tasking/tasktree.h>
#include <utils/mathutils.h>
#include <utils/qtcassert.h>
#include <utils/tasktree.h>
#include <QFutureWatcher>
#include <QTimer>

View File

@@ -17,7 +17,6 @@
#include <utils/processinterface.h>
#include <utils/progressindicator.h>
#include <utils/qtcassert.h>
#include <utils/tasktree.h>
#include <utils/temporaryfile.h>
#include <QCheckBox>

View File

@@ -6,7 +6,7 @@
#include "diffeditor_global.h"
#include "diffutils.h"
#include <utils/tasktree.h>
#include <solutions/tasking/tasktree.h>
#include <QObject>

View File

@@ -10,7 +10,8 @@
#include <languageserverprotocol/lsptypes.h>
#include <languageserverprotocol/lsputils.h>
#include <languageserverprotocol/workspace.h>
#include <utils/tasktree.h>
#include <solutions/tasking/tasktree.h>
namespace LanguageClient {

View File

@@ -7,7 +7,8 @@
#include <languageserverprotocol/languagefeatures.h>
#include <languageserverprotocol/lsptypes.h>
#include <utils/tasktree.h>
#include <solutions/tasking/tasktree.h>
namespace LanguageClient {

View File

@@ -7,8 +7,9 @@
#include <projectexplorer/runcontrol.h>
#include <solutions/tasking/tasktree.h>
#include <utils/portlist.h>
#include <utils/tasktree.h>
namespace ProjectExplorer {

View File

@@ -7,7 +7,7 @@
#include "filetransferinterface.h"
#include "idevicefwd.h"
#include <utils/tasktree.h>
#include <solutions/tasking/tasktree.h>
namespace Utils { class ProcessResultData; }

View File

@@ -6,11 +6,12 @@
#include "../projectexplorer_export.h"
#include "idevicefwd.h"
#include <solutions/tasking/tasktree.h>
#include <utils/id.h>
#include <utils/expected.h>
#include <utils/filepath.h>
#include <utils/hostosinfo.h>
#include <utils/tasktree.h>
#include <QAbstractSocket>
#include <QCoreApplication>

View File

@@ -10,7 +10,6 @@
#include <utils/environment.h>
#include <utils/filepath.h>
#include <utils/tasktree.h>
#include <QByteArray>
#include <QHash>
@@ -25,6 +24,7 @@ class QPromise;
class QThreadPool;
QT_END_NAMESPACE
namespace Tasking { class TaskItem; }
namespace Utils { class Process; }
namespace ProjectExplorer {

View File

@@ -12,8 +12,9 @@
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
#include <solutions/tasking/tasktree.h>
#include <utils/qtcassert.h>
#include <utils/tasktree.h>
#include <QDateTime>
#include <QPointer>

View File

@@ -18,7 +18,6 @@
#include <utils/algorithm.h>
#include <utils/process.h>
#include <utils/processinterface.h>
#include <utils/tasktree.h>
using namespace ProjectExplorer;
using namespace Tasking;

View File

@@ -1,7 +1,8 @@
set(LIBSDIR "${PROJECT_SOURCE_DIR}/src/libs")
set(UTILSDIR "${PROJECT_SOURCE_DIR}/src/libs/utils")
add_qtc_executable(qtcreator_processlauncher
INCLUDES "${UTILSDIR}"
INCLUDES "${LIBSDIR}"
DEPENDS Qt::Core Qt::Network
DEFINES UTILS_STATIC_LIBRARY
SOURCES

View File

@@ -2,10 +2,10 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "launchersockethandler.h"
#include "launcherlogging.h"
#include "processreaper.h"
#include "processutils.h"
#include <utils/processreaper.h>
#include <utils/processutils.h>
#include <QCoreApplication>
#include <QLocalSocket>
@@ -280,4 +280,4 @@ void LauncherSocketHandler::removeProcess(quintptr token)
} // namespace Internal
} // namespace Utils
#include <launchersockethandler.moc>
#include "launchersockethandler.moc"

View File

@@ -3,7 +3,7 @@
#pragma once
#include <launcherpackets.h>
#include <utils/launcherpackets.h>
#include <QByteArray>
#include <QHash>

View File

@@ -3,7 +3,8 @@
#include "launcherlogging.h"
#include "launchersockethandler.h"
#include "singleton.h"
#include <utils/singleton.h>
#include <QtCore/qcoreapplication.h>
#include <QtCore/qscopeguard.h>

View File

@@ -7,7 +7,7 @@ QtcTool {
Depends { name: "Qt.network" }
cpp.defines: base.concat("UTILS_STATIC_LIBRARY")
cpp.includePaths: base.concat(pathToUtils)
cpp.includePaths: base.concat(pathToLibs)
Properties {
condition: qbs.targetOS.contains("windows")
@@ -24,6 +24,7 @@ QtcTool {
"processlauncher-main.cpp",
]
property string pathToLibs: sourceDirectory + "/../../libs"
property string pathToUtils: sourceDirectory + "/../../libs/utils"
Group {
name: "protocol sources"

View File

@@ -19,6 +19,7 @@ add_subdirectory(profilewriter)
add_subdirectory(qml)
add_subdirectory(runextensions)
add_subdirectory(sdktool)
add_subdirectory(solutions)
add_subdirectory(toolchaincache)
add_subdirectory(tracing)
add_subdirectory(treeviewfind)

View File

@@ -22,6 +22,7 @@ Project {
"qml/qml.qbs",
"runextensions/runextensions.qbs",
"sdktool/sdktool.qbs",
"solutions/solutions.qbs",
"toolchaincache/toolchaincache.qbs",
"tracing/tracing.qbs",
"treeviewfind/treeviewfind.qbs",

View File

@@ -0,0 +1 @@
add_subdirectory(tasking)

View File

@@ -0,0 +1,8 @@
import qbs
Project {
name: "Solutions autotests"
references: [
"tasking/tasking.qbs",
]
}

View File

@@ -0,0 +1,4 @@
add_qtc_test(tst_solutions_tasking
DEPENDS Utils
SOURCES tst_tasking.cpp
)

View File

@@ -0,0 +1,7 @@
QtcAutotest {
name: "Tasking autotest"
Depends { name: "Utils" }
files: "tst_tasking.cpp"
}

View File

@@ -1,8 +1,9 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <solutions/tasking/barrier.h>
#include <utils/async.h>
#include <utils/barrier.h>
#include <QtTest>
@@ -56,7 +57,7 @@ struct TestData {
OnDone onDone = OnDone::Success;
};
class tst_TaskTree : public QObject
class tst_Tasking : public QObject
{
Q_OBJECT
@@ -72,18 +73,18 @@ private slots:
void cleanupTestCase();
};
void tst_TaskTree::initTestCase()
void tst_Tasking::initTestCase()
{
s_futureSynchronizer = new FutureSynchronizer;
}
void tst_TaskTree::cleanupTestCase()
void tst_Tasking::cleanupTestCase()
{
delete s_futureSynchronizer;
s_futureSynchronizer = nullptr;
}
void tst_TaskTree::validConstructs()
void tst_Tasking::validConstructs()
{
const Group task {
parallel,
@@ -215,7 +216,7 @@ auto setupBarrierAdvance(const TreeStorage<CustomStorage> &storage,
};
}
void tst_TaskTree::testTree_data()
void tst_Tasking::testTree_data()
{
QTest::addColumn<TestData>("testData");
@@ -1484,7 +1485,7 @@ void tst_TaskTree::testTree_data()
}
}
void tst_TaskTree::testTree()
void tst_Tasking::testTree()
{
QFETCH(TestData, testData);
@@ -1536,7 +1537,7 @@ void tst_TaskTree::testTree()
QCOMPARE(errorCount, expectedErrorCount);
}
void tst_TaskTree::storageOperators()
void tst_Tasking::storageOperators()
{
TreeStorageBase storage1 = TreeStorage<CustomStorage>();
TreeStorageBase storage2 = TreeStorage<CustomStorage>();
@@ -1551,7 +1552,7 @@ void tst_TaskTree::storageOperators()
// It also checks whether the destructor of a task tree deletes properly the storage created
// while starting the task tree. When running task tree is destructed, the storage done
// handler shouldn't be invoked.
void tst_TaskTree::storageDestructor()
void tst_Tasking::storageDestructor()
{
bool setupCalled = false;
const auto setupHandler = [&setupCalled](CustomStorage *) {
@@ -1586,6 +1587,6 @@ void tst_TaskTree::storageDestructor()
QVERIFY(!doneCalled);
}
QTEST_GUILESS_MAIN(tst_TaskTree)
QTEST_GUILESS_MAIN(tst_Tasking)
#include "tst_tasktree.moc"
#include "tst_tasking.moc"

View File

@@ -14,7 +14,6 @@ add_subdirectory(persistentsettings)
add_subdirectory(process)
add_subdirectory(settings)
add_subdirectory(stringutils)
add_subdirectory(tasktree)
add_subdirectory(templateengine)
add_subdirectory(treemodel)
add_subdirectory(text)

View File

@@ -1,4 +0,0 @@
add_qtc_test(tst_utils_tasktree
DEPENDS Utils
SOURCES tst_tasktree.cpp
)

View File

@@ -1,26 +0,0 @@
import qbs.FileInfo
Project {
QtcAutotest {
name: "TaskTree autotest"
Depends { name: "Utils" }
Depends { name: "app_version_header" }
files: [
"tst_tasktree.cpp",
]
cpp.defines: {
var defines = base;
if (qbs.targetOS === "windows")
defines.push("_CRT_SECURE_NO_WARNINGS");
var absLibExecPath = FileInfo.joinPaths(qbs.installRoot, qbs.installPrefix,
qtc.ide_libexec_path);
var relLibExecPath = FileInfo.relativePath(destinationDirectory, absLibExecPath);
defines.push('TEST_RELATIVE_LIBEXEC_PATH="' + relLibExecPath + '"');
defines.push('TESTAPP_PATH="'
+ FileInfo.joinPaths(destinationDirectory, "testapp") + '"');
return defines;
}
}
}

View File

@@ -19,7 +19,6 @@ Project {
"process/process.qbs",
"settings/settings.qbs",
"stringutils/stringutils.qbs",
"tasktree/tasktree.qbs",
"templateengine/templateengine.qbs",
"treemodel/treemodel.qbs",
"unixdevicefileaccess/unixdevicefileaccess.qbs",

View File

@@ -1,8 +1,9 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <solutions/tasking/tasktree.h>
#include <utils/layoutbuilder.h>
#include <utils/tasktree.h>
#include <QWidget>