forked from qt-creator/qt-creator
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:
@@ -2,22 +2,22 @@ add_subdirectory(3rdparty)
|
|||||||
|
|
||||||
add_subdirectory(advanceddockingsystem)
|
add_subdirectory(advanceddockingsystem)
|
||||||
add_subdirectory(aggregation)
|
add_subdirectory(aggregation)
|
||||||
add_subdirectory(extensionsystem)
|
|
||||||
add_subdirectory(utils)
|
|
||||||
add_subdirectory(languageutils)
|
|
||||||
add_subdirectory(cplusplus)
|
add_subdirectory(cplusplus)
|
||||||
add_subdirectory(modelinglib)
|
add_subdirectory(extensionsystem)
|
||||||
add_subdirectory(nanotrace)
|
|
||||||
add_subdirectory(qmljs)
|
|
||||||
add_subdirectory(qmldebug)
|
|
||||||
add_subdirectory(qmleditorwidgets)
|
|
||||||
add_subdirectory(glsl)
|
add_subdirectory(glsl)
|
||||||
add_subdirectory(languageserverprotocol)
|
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(sqlite)
|
||||||
add_subdirectory(tracing)
|
add_subdirectory(tracing)
|
||||||
add_subdirectory(qmlpuppetcommunication)
|
add_subdirectory(utils)
|
||||||
|
|
||||||
add_subdirectory(qtcreatorcdbext)
|
|
||||||
|
|
||||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/qlitehtml/src/CMakeLists.txt)
|
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/qlitehtml/src/CMakeLists.txt)
|
||||||
option(BUILD_LIBRARY_QLITEHTML "Build library qlitehtml." ${BUILD_LIBRARIES_BY_DEFAULT})
|
option(BUILD_LIBRARY_QLITEHTML "Build library qlitehtml." ${BUILD_LIBRARIES_BY_DEFAULT})
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ Project {
|
|||||||
"qmljs/qmljs.qbs",
|
"qmljs/qmljs.qbs",
|
||||||
"qmldebug/qmldebug.qbs",
|
"qmldebug/qmldebug.qbs",
|
||||||
"qtcreatorcdbext/qtcreatorcdbext.qbs",
|
"qtcreatorcdbext/qtcreatorcdbext.qbs",
|
||||||
|
"solutions/solutions.qbs",
|
||||||
"sqlite/sqlite.qbs",
|
"sqlite/sqlite.qbs",
|
||||||
"tracing/tracing.qbs",
|
"tracing/tracing.qbs",
|
||||||
"utils/process_ctrlc_stub.qbs",
|
"utils/process_ctrlc_stub.qbs",
|
||||||
|
|||||||
1
src/libs/solutions/CMakeLists.txt
Normal file
1
src/libs/solutions/CMakeLists.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
add_subdirectory(tasking)
|
||||||
48
src/libs/solutions/README.md
Normal file
48
src/libs/solutions/README.md
Normal 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).
|
||||||
7
src/libs/solutions/solutions.qbs
Normal file
7
src/libs/solutions/solutions.qbs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
Project {
|
||||||
|
name: "Solutions"
|
||||||
|
|
||||||
|
references: [
|
||||||
|
"tasking/tasking.qbs",
|
||||||
|
].concat(project.additionalLibs)
|
||||||
|
}
|
||||||
9
src/libs/solutions/tasking/CMakeLists.txt
Normal file
9
src/libs/solutions/tasking/CMakeLists.txt
Normal 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
|
||||||
|
)
|
||||||
@@ -3,13 +3,13 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "utils_global.h"
|
#include "tasking_global.h"
|
||||||
|
|
||||||
#include "tasktree.h"
|
#include "tasktree.h"
|
||||||
|
|
||||||
namespace Tasking {
|
namespace Tasking {
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT Barrier final : public QObject
|
class TASKING_EXPORT Barrier final : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ private:
|
|||||||
int m_current = -1;
|
int m_current = -1;
|
||||||
};
|
};
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT BarrierTaskAdapter : public Tasking::TaskAdapter<Barrier>
|
class TASKING_EXPORT BarrierTaskAdapter : public Tasking::TaskAdapter<Barrier>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BarrierTaskAdapter() { connect(task(), &Barrier::done, this, &TaskInterface::done); }
|
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.
|
// alias template deduction only available with C++20.
|
||||||
using SingleBarrier = MultiBarrier<1>;
|
using SingleBarrier = MultiBarrier<1>;
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT WaitForBarrierTask : public BarrierTask
|
class TASKING_EXPORT WaitForBarrierTask : public BarrierTask
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
template <int Limit>
|
template <int Limit>
|
||||||
14
src/libs/solutions/tasking/tasking.qbs
Normal file
14
src/libs/solutions/tasking/tasking.qbs
Normal 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",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
14
src/libs/solutions/tasking/tasking_global.h
Normal file
14
src/libs/solutions/tasking/tasking_global.h
Normal 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
|
||||||
@@ -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
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||||
|
|
||||||
#include "tasktree.h"
|
#include "tasktree.h"
|
||||||
@@ -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
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "utils_global.h"
|
#include "tasking_global.h"
|
||||||
|
|
||||||
#include <QHash>
|
#include <QHash>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
@@ -16,7 +16,7 @@ class TaskContainer;
|
|||||||
class TaskNode;
|
class TaskNode;
|
||||||
class TaskTreePrivate;
|
class TaskTreePrivate;
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT TaskInterface : public QObject
|
class TASKING_EXPORT TaskInterface : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ signals:
|
|||||||
void done(bool success);
|
void done(bool success);
|
||||||
};
|
};
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT TreeStorageBase
|
class TASKING_EXPORT TreeStorageBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool isValid() const;
|
bool isValid() const;
|
||||||
@@ -110,7 +110,7 @@ enum class TaskAction
|
|||||||
StopWithError
|
StopWithError
|
||||||
};
|
};
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT TaskItem
|
class TASKING_EXPORT TaskItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Internal, provided by QTC_DECLARE_CUSTOM_TASK
|
// Internal, provided by QTC_DECLARE_CUSTOM_TASK
|
||||||
@@ -186,32 +186,32 @@ private:
|
|||||||
QList<TaskItem> m_children;
|
QList<TaskItem> m_children;
|
||||||
};
|
};
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT Group : public TaskItem
|
class TASKING_EXPORT Group : public TaskItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Group(const QList<TaskItem> &children) { addChildren(children); }
|
Group(const QList<TaskItem> &children) { addChildren(children); }
|
||||||
Group(std::initializer_list<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:
|
public:
|
||||||
Storage(const TreeStorageBase &storage) : TaskItem(storage) { }
|
Storage(const TreeStorageBase &storage) : TaskItem(storage) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT ParallelLimit : public TaskItem
|
class TASKING_EXPORT ParallelLimit : public TaskItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ParallelLimit(int parallelLimit) : TaskItem(qMax(parallelLimit, 0)) {}
|
ParallelLimit(int parallelLimit) : TaskItem(qMax(parallelLimit, 0)) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT Workflow : public TaskItem
|
class TASKING_EXPORT Workflow : public TaskItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Workflow(WorkflowPolicy policy) : TaskItem(policy) {}
|
Workflow(WorkflowPolicy policy) : TaskItem(policy) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT OnGroupSetup : public TaskItem
|
class TASKING_EXPORT OnGroupSetup : public TaskItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
template <typename SetupFunction>
|
template <typename SetupFunction>
|
||||||
@@ -237,20 +237,20 @@ private:
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT OnGroupDone : public TaskItem
|
class TASKING_EXPORT OnGroupDone : public TaskItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
OnGroupDone(const GroupEndHandler &handler) : TaskItem({{}, handler}) {}
|
OnGroupDone(const GroupEndHandler &handler) : TaskItem({{}, handler}) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT OnGroupError : public TaskItem
|
class TASKING_EXPORT OnGroupError : public TaskItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
OnGroupError(const GroupEndHandler &handler) : TaskItem({{}, {}, handler}) {}
|
OnGroupError(const GroupEndHandler &handler) : TaskItem({{}, {}, handler}) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Synchronous invocation. Similarly to Group - isn't counted as a task inside taskCount()
|
// 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:
|
public:
|
||||||
@@ -276,13 +276,13 @@ private:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
QTCREATOR_UTILS_EXPORT extern ParallelLimit sequential;
|
TASKING_EXPORT extern ParallelLimit sequential;
|
||||||
QTCREATOR_UTILS_EXPORT extern ParallelLimit parallel;
|
TASKING_EXPORT extern ParallelLimit parallel;
|
||||||
QTCREATOR_UTILS_EXPORT extern Workflow stopOnError;
|
TASKING_EXPORT extern Workflow stopOnError;
|
||||||
QTCREATOR_UTILS_EXPORT extern Workflow continueOnError;
|
TASKING_EXPORT extern Workflow continueOnError;
|
||||||
QTCREATOR_UTILS_EXPORT extern Workflow stopOnDone;
|
TASKING_EXPORT extern Workflow stopOnDone;
|
||||||
QTCREATOR_UTILS_EXPORT extern Workflow continueOnDone;
|
TASKING_EXPORT extern Workflow continueOnDone;
|
||||||
QTCREATOR_UTILS_EXPORT extern Workflow optional;
|
TASKING_EXPORT extern Workflow optional;
|
||||||
|
|
||||||
template <typename Task>
|
template <typename Task>
|
||||||
class TaskAdapter : public TaskInterface
|
class TaskAdapter : public TaskInterface
|
||||||
@@ -354,7 +354,7 @@ private:
|
|||||||
|
|
||||||
class TaskTreePrivate;
|
class TaskTreePrivate;
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT TaskTree final : public QObject
|
class TASKING_EXPORT TaskTree final : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@@ -407,7 +407,7 @@ private:
|
|||||||
TaskTreePrivate *d;
|
TaskTreePrivate *d;
|
||||||
};
|
};
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT TaskTreeTaskAdapter : public TaskAdapter<TaskTree>
|
class TASKING_EXPORT TaskTreeTaskAdapter : public TaskAdapter<TaskTree>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TaskTreeTaskAdapter();
|
TaskTreeTaskAdapter();
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
add_qtc_library(Utils
|
add_qtc_library(Utils
|
||||||
DEPENDS Qt::Qml Qt::Xml
|
DEPENDS Tasking Qt::Qml Qt::Xml
|
||||||
PUBLIC_DEPENDS
|
PUBLIC_DEPENDS
|
||||||
Qt::Concurrent Qt::Core Qt::Network Qt::Gui Qt::Widgets
|
Qt::Concurrent Qt::Core Qt::Network Qt::Gui Qt::Widgets
|
||||||
Qt::Core5Compat
|
Qt::Core5Compat
|
||||||
@@ -13,7 +13,6 @@ add_qtc_library(Utils
|
|||||||
archive.cpp archive.h
|
archive.cpp archive.h
|
||||||
aspects.cpp aspects.h
|
aspects.cpp aspects.h
|
||||||
async.cpp async.h
|
async.cpp async.h
|
||||||
barrier.cpp barrier.h
|
|
||||||
basetreeview.cpp basetreeview.h
|
basetreeview.cpp basetreeview.h
|
||||||
benchmarker.cpp benchmarker.h
|
benchmarker.cpp benchmarker.h
|
||||||
buildablehelperlibrary.cpp buildablehelperlibrary.h
|
buildablehelperlibrary.cpp buildablehelperlibrary.h
|
||||||
@@ -171,7 +170,6 @@ add_qtc_library(Utils
|
|||||||
styleanimator.cpp styleanimator.h
|
styleanimator.cpp styleanimator.h
|
||||||
styledbar.cpp styledbar.h
|
styledbar.cpp styledbar.h
|
||||||
stylehelper.cpp stylehelper.h
|
stylehelper.cpp stylehelper.h
|
||||||
tasktree.cpp tasktree.h
|
|
||||||
templateengine.cpp templateengine.h
|
templateengine.cpp templateengine.h
|
||||||
temporarydirectory.cpp temporarydirectory.h
|
temporarydirectory.cpp temporarydirectory.h
|
||||||
temporaryfile.cpp temporaryfile.h
|
temporaryfile.cpp temporaryfile.h
|
||||||
|
|||||||
@@ -7,7 +7,8 @@
|
|||||||
|
|
||||||
#include "futuresynchronizer.h"
|
#include "futuresynchronizer.h"
|
||||||
#include "qtcassert.h"
|
#include "qtcassert.h"
|
||||||
#include "tasktree.h"
|
|
||||||
|
#include <solutions/tasking/tasktree.h>
|
||||||
|
|
||||||
#include <QFutureWatcher>
|
#include <QFutureWatcher>
|
||||||
#include <QtConcurrent>
|
#include <QtConcurrent>
|
||||||
|
|||||||
@@ -4,9 +4,10 @@
|
|||||||
#include "filestreamer.h"
|
#include "filestreamer.h"
|
||||||
|
|
||||||
#include "async.h"
|
#include "async.h"
|
||||||
#include "barrier.h"
|
|
||||||
#include "process.h"
|
#include "process.h"
|
||||||
|
|
||||||
|
#include <solutions/tasking/barrier.h>
|
||||||
|
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
#include <QMutexLocker>
|
#include <QMutexLocker>
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
#include "utils_global.h"
|
#include "utils_global.h"
|
||||||
|
|
||||||
#include "filepath.h"
|
#include "filepath.h"
|
||||||
#include "tasktree.h"
|
|
||||||
|
#include <solutions/tasking/tasktree.h>
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,8 @@
|
|||||||
|
|
||||||
#include "commandline.h"
|
#include "commandline.h"
|
||||||
#include "processenums.h"
|
#include "processenums.h"
|
||||||
#include "tasktree.h"
|
|
||||||
|
#include <solutions/tasking/tasktree.h>
|
||||||
|
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ Project {
|
|||||||
|
|
||||||
Depends { name: "Qt"; submodules: ["concurrent", "core-private", "network", "qml", "widgets", "xml"] }
|
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: "Qt.macextras"; condition: Qt.core.versionMajor < 6 && qbs.targetOS.contains("macos") }
|
||||||
|
Depends { name: "Tasking" }
|
||||||
Depends { name: "app_version_header" }
|
Depends { name: "app_version_header" }
|
||||||
Depends { name: "ptyqt" }
|
Depends { name: "ptyqt" }
|
||||||
|
|
||||||
@@ -51,8 +52,6 @@ Project {
|
|||||||
"aspects.h",
|
"aspects.h",
|
||||||
"async.cpp",
|
"async.cpp",
|
||||||
"async.h",
|
"async.h",
|
||||||
"barrier.cpp",
|
|
||||||
"barrier.h",
|
|
||||||
"basetreeview.cpp",
|
"basetreeview.cpp",
|
||||||
"basetreeview.h",
|
"basetreeview.h",
|
||||||
"benchmarker.cpp",
|
"benchmarker.cpp",
|
||||||
@@ -308,8 +307,6 @@ Project {
|
|||||||
"styledbar.h",
|
"styledbar.h",
|
||||||
"stylehelper.cpp",
|
"stylehelper.cpp",
|
||||||
"stylehelper.h",
|
"stylehelper.h",
|
||||||
"tasktree.cpp",
|
|
||||||
"tasktree.h",
|
|
||||||
"templateengine.cpp",
|
"templateengine.cpp",
|
||||||
"templateengine.h",
|
"templateengine.h",
|
||||||
"temporarydirectory.cpp",
|
"temporarydirectory.cpp",
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
#include <utils/process.h>
|
#include <utils/process.h>
|
||||||
#include <utils/stringutils.h>
|
#include <utils/stringutils.h>
|
||||||
#include <utils/tasktree.h>
|
|
||||||
|
|
||||||
#include <QLoggingCategory>
|
#include <QLoggingCategory>
|
||||||
|
|
||||||
|
|||||||
@@ -21,11 +21,12 @@
|
|||||||
#include <projectexplorer/projectmanager.h>
|
#include <projectexplorer/projectmanager.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
|
|
||||||
|
#include <solutions/tasking/tasktree.h>
|
||||||
|
|
||||||
#include <texteditor/textdocument.h>
|
#include <texteditor/textdocument.h>
|
||||||
#include <texteditor/texteditor.h>
|
#include <texteditor/texteditor.h>
|
||||||
|
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <utils/tasktree.h>
|
|
||||||
|
|
||||||
#include <QLoggingCategory>
|
#include <QLoggingCategory>
|
||||||
#include <QScopeGuard>
|
#include <QScopeGuard>
|
||||||
|
|||||||
@@ -5,10 +5,11 @@
|
|||||||
|
|
||||||
#include <coreplugin/core_global.h>
|
#include <coreplugin/core_global.h>
|
||||||
|
|
||||||
|
#include <solutions/tasking/tasktree.h>
|
||||||
|
|
||||||
#include <utils/filepath.h>
|
#include <utils/filepath.h>
|
||||||
#include <utils/id.h>
|
#include <utils/id.h>
|
||||||
#include <utils/link.h>
|
#include <utils/link.h>
|
||||||
#include <utils/tasktree.h>
|
|
||||||
|
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
#include <QKeySequence>
|
#include <QKeySequence>
|
||||||
|
|||||||
@@ -6,9 +6,10 @@
|
|||||||
#include "futureprogress.h"
|
#include "futureprogress.h"
|
||||||
#include "progressmanager.h"
|
#include "progressmanager.h"
|
||||||
|
|
||||||
|
#include <solutions/tasking/tasktree.h>
|
||||||
|
|
||||||
#include <utils/mathutils.h>
|
#include <utils/mathutils.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <utils/tasktree.h>
|
|
||||||
|
|
||||||
#include <QFutureWatcher>
|
#include <QFutureWatcher>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
#include <utils/processinterface.h>
|
#include <utils/processinterface.h>
|
||||||
#include <utils/progressindicator.h>
|
#include <utils/progressindicator.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <utils/tasktree.h>
|
|
||||||
#include <utils/temporaryfile.h>
|
#include <utils/temporaryfile.h>
|
||||||
|
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
#include "diffeditor_global.h"
|
#include "diffeditor_global.h"
|
||||||
#include "diffutils.h"
|
#include "diffutils.h"
|
||||||
|
|
||||||
#include <utils/tasktree.h>
|
#include <solutions/tasking/tasktree.h>
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,8 @@
|
|||||||
#include <languageserverprotocol/lsptypes.h>
|
#include <languageserverprotocol/lsptypes.h>
|
||||||
#include <languageserverprotocol/lsputils.h>
|
#include <languageserverprotocol/lsputils.h>
|
||||||
#include <languageserverprotocol/workspace.h>
|
#include <languageserverprotocol/workspace.h>
|
||||||
#include <utils/tasktree.h>
|
|
||||||
|
#include <solutions/tasking/tasktree.h>
|
||||||
|
|
||||||
namespace LanguageClient {
|
namespace LanguageClient {
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,8 @@
|
|||||||
|
|
||||||
#include <languageserverprotocol/languagefeatures.h>
|
#include <languageserverprotocol/languagefeatures.h>
|
||||||
#include <languageserverprotocol/lsptypes.h>
|
#include <languageserverprotocol/lsptypes.h>
|
||||||
#include <utils/tasktree.h>
|
|
||||||
|
#include <solutions/tasking/tasktree.h>
|
||||||
|
|
||||||
namespace LanguageClient {
|
namespace LanguageClient {
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,9 @@
|
|||||||
|
|
||||||
#include <projectexplorer/runcontrol.h>
|
#include <projectexplorer/runcontrol.h>
|
||||||
|
|
||||||
|
#include <solutions/tasking/tasktree.h>
|
||||||
|
|
||||||
#include <utils/portlist.h>
|
#include <utils/portlist.h>
|
||||||
#include <utils/tasktree.h>
|
|
||||||
|
|
||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#include "filetransferinterface.h"
|
#include "filetransferinterface.h"
|
||||||
#include "idevicefwd.h"
|
#include "idevicefwd.h"
|
||||||
|
|
||||||
#include <utils/tasktree.h>
|
#include <solutions/tasking/tasktree.h>
|
||||||
|
|
||||||
namespace Utils { class ProcessResultData; }
|
namespace Utils { class ProcessResultData; }
|
||||||
|
|
||||||
|
|||||||
@@ -6,11 +6,12 @@
|
|||||||
#include "../projectexplorer_export.h"
|
#include "../projectexplorer_export.h"
|
||||||
#include "idevicefwd.h"
|
#include "idevicefwd.h"
|
||||||
|
|
||||||
|
#include <solutions/tasking/tasktree.h>
|
||||||
|
|
||||||
#include <utils/id.h>
|
#include <utils/id.h>
|
||||||
#include <utils/expected.h>
|
#include <utils/expected.h>
|
||||||
#include <utils/filepath.h>
|
#include <utils/filepath.h>
|
||||||
#include <utils/hostosinfo.h>
|
#include <utils/hostosinfo.h>
|
||||||
#include <utils/tasktree.h>
|
|
||||||
|
|
||||||
#include <QAbstractSocket>
|
#include <QAbstractSocket>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
#include <utils/environment.h>
|
#include <utils/environment.h>
|
||||||
#include <utils/filepath.h>
|
#include <utils/filepath.h>
|
||||||
#include <utils/tasktree.h>
|
|
||||||
|
|
||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
#include <QHash>
|
#include <QHash>
|
||||||
@@ -25,6 +24,7 @@ class QPromise;
|
|||||||
class QThreadPool;
|
class QThreadPool;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
namespace Tasking { class TaskItem; }
|
||||||
namespace Utils { class Process; }
|
namespace Utils { class Process; }
|
||||||
|
|
||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
|
|||||||
@@ -12,8 +12,9 @@
|
|||||||
#include <projectexplorer/projectexplorerconstants.h>
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
|
|
||||||
|
#include <solutions/tasking/tasktree.h>
|
||||||
|
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <utils/tasktree.h>
|
|
||||||
|
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
#include <utils/process.h>
|
#include <utils/process.h>
|
||||||
#include <utils/processinterface.h>
|
#include <utils/processinterface.h>
|
||||||
#include <utils/tasktree.h>
|
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
using namespace Tasking;
|
using namespace Tasking;
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
|
set(LIBSDIR "${PROJECT_SOURCE_DIR}/src/libs")
|
||||||
set(UTILSDIR "${PROJECT_SOURCE_DIR}/src/libs/utils")
|
set(UTILSDIR "${PROJECT_SOURCE_DIR}/src/libs/utils")
|
||||||
|
|
||||||
add_qtc_executable(qtcreator_processlauncher
|
add_qtc_executable(qtcreator_processlauncher
|
||||||
INCLUDES "${UTILSDIR}"
|
INCLUDES "${LIBSDIR}"
|
||||||
DEPENDS Qt::Core Qt::Network
|
DEPENDS Qt::Core Qt::Network
|
||||||
DEFINES UTILS_STATIC_LIBRARY
|
DEFINES UTILS_STATIC_LIBRARY
|
||||||
SOURCES
|
SOURCES
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||||
|
|
||||||
#include "launchersockethandler.h"
|
#include "launchersockethandler.h"
|
||||||
|
|
||||||
#include "launcherlogging.h"
|
#include "launcherlogging.h"
|
||||||
#include "processreaper.h"
|
|
||||||
#include "processutils.h"
|
#include <utils/processreaper.h>
|
||||||
|
#include <utils/processutils.h>
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QLocalSocket>
|
#include <QLocalSocket>
|
||||||
@@ -280,4 +280,4 @@ void LauncherSocketHandler::removeProcess(quintptr token)
|
|||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Utils
|
} // namespace Utils
|
||||||
|
|
||||||
#include <launchersockethandler.moc>
|
#include "launchersockethandler.moc"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <launcherpackets.h>
|
#include <utils/launcherpackets.h>
|
||||||
|
|
||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
#include <QHash>
|
#include <QHash>
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
|
|
||||||
#include "launcherlogging.h"
|
#include "launcherlogging.h"
|
||||||
#include "launchersockethandler.h"
|
#include "launchersockethandler.h"
|
||||||
#include "singleton.h"
|
|
||||||
|
#include <utils/singleton.h>
|
||||||
|
|
||||||
#include <QtCore/qcoreapplication.h>
|
#include <QtCore/qcoreapplication.h>
|
||||||
#include <QtCore/qscopeguard.h>
|
#include <QtCore/qscopeguard.h>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ QtcTool {
|
|||||||
Depends { name: "Qt.network" }
|
Depends { name: "Qt.network" }
|
||||||
|
|
||||||
cpp.defines: base.concat("UTILS_STATIC_LIBRARY")
|
cpp.defines: base.concat("UTILS_STATIC_LIBRARY")
|
||||||
cpp.includePaths: base.concat(pathToUtils)
|
cpp.includePaths: base.concat(pathToLibs)
|
||||||
|
|
||||||
Properties {
|
Properties {
|
||||||
condition: qbs.targetOS.contains("windows")
|
condition: qbs.targetOS.contains("windows")
|
||||||
@@ -24,6 +24,7 @@ QtcTool {
|
|||||||
"processlauncher-main.cpp",
|
"processlauncher-main.cpp",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
property string pathToLibs: sourceDirectory + "/../../libs"
|
||||||
property string pathToUtils: sourceDirectory + "/../../libs/utils"
|
property string pathToUtils: sourceDirectory + "/../../libs/utils"
|
||||||
Group {
|
Group {
|
||||||
name: "protocol sources"
|
name: "protocol sources"
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ add_subdirectory(profilewriter)
|
|||||||
add_subdirectory(qml)
|
add_subdirectory(qml)
|
||||||
add_subdirectory(runextensions)
|
add_subdirectory(runextensions)
|
||||||
add_subdirectory(sdktool)
|
add_subdirectory(sdktool)
|
||||||
|
add_subdirectory(solutions)
|
||||||
add_subdirectory(toolchaincache)
|
add_subdirectory(toolchaincache)
|
||||||
add_subdirectory(tracing)
|
add_subdirectory(tracing)
|
||||||
add_subdirectory(treeviewfind)
|
add_subdirectory(treeviewfind)
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ Project {
|
|||||||
"qml/qml.qbs",
|
"qml/qml.qbs",
|
||||||
"runextensions/runextensions.qbs",
|
"runextensions/runextensions.qbs",
|
||||||
"sdktool/sdktool.qbs",
|
"sdktool/sdktool.qbs",
|
||||||
|
"solutions/solutions.qbs",
|
||||||
"toolchaincache/toolchaincache.qbs",
|
"toolchaincache/toolchaincache.qbs",
|
||||||
"tracing/tracing.qbs",
|
"tracing/tracing.qbs",
|
||||||
"treeviewfind/treeviewfind.qbs",
|
"treeviewfind/treeviewfind.qbs",
|
||||||
|
|||||||
1
tests/auto/solutions/CMakeLists.txt
Normal file
1
tests/auto/solutions/CMakeLists.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
add_subdirectory(tasking)
|
||||||
8
tests/auto/solutions/solutions.qbs
Normal file
8
tests/auto/solutions/solutions.qbs
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import qbs
|
||||||
|
|
||||||
|
Project {
|
||||||
|
name: "Solutions autotests"
|
||||||
|
references: [
|
||||||
|
"tasking/tasking.qbs",
|
||||||
|
]
|
||||||
|
}
|
||||||
4
tests/auto/solutions/tasking/CMakeLists.txt
Normal file
4
tests/auto/solutions/tasking/CMakeLists.txt
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
add_qtc_test(tst_solutions_tasking
|
||||||
|
DEPENDS Utils
|
||||||
|
SOURCES tst_tasking.cpp
|
||||||
|
)
|
||||||
7
tests/auto/solutions/tasking/tasking.qbs
Normal file
7
tests/auto/solutions/tasking/tasking.qbs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
QtcAutotest {
|
||||||
|
name: "Tasking autotest"
|
||||||
|
|
||||||
|
Depends { name: "Utils" }
|
||||||
|
|
||||||
|
files: "tst_tasking.cpp"
|
||||||
|
}
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
// Copyright (C) 2022 The Qt Company Ltd.
|
// Copyright (C) 2022 The Qt Company Ltd.
|
||||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
// 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/async.h>
|
||||||
#include <utils/barrier.h>
|
|
||||||
|
|
||||||
#include <QtTest>
|
#include <QtTest>
|
||||||
|
|
||||||
@@ -56,7 +57,7 @@ struct TestData {
|
|||||||
OnDone onDone = OnDone::Success;
|
OnDone onDone = OnDone::Success;
|
||||||
};
|
};
|
||||||
|
|
||||||
class tst_TaskTree : public QObject
|
class tst_Tasking : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@@ -72,18 +73,18 @@ private slots:
|
|||||||
void cleanupTestCase();
|
void cleanupTestCase();
|
||||||
};
|
};
|
||||||
|
|
||||||
void tst_TaskTree::initTestCase()
|
void tst_Tasking::initTestCase()
|
||||||
{
|
{
|
||||||
s_futureSynchronizer = new FutureSynchronizer;
|
s_futureSynchronizer = new FutureSynchronizer;
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_TaskTree::cleanupTestCase()
|
void tst_Tasking::cleanupTestCase()
|
||||||
{
|
{
|
||||||
delete s_futureSynchronizer;
|
delete s_futureSynchronizer;
|
||||||
s_futureSynchronizer = nullptr;
|
s_futureSynchronizer = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_TaskTree::validConstructs()
|
void tst_Tasking::validConstructs()
|
||||||
{
|
{
|
||||||
const Group task {
|
const Group task {
|
||||||
parallel,
|
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");
|
QTest::addColumn<TestData>("testData");
|
||||||
|
|
||||||
@@ -1484,7 +1485,7 @@ void tst_TaskTree::testTree_data()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_TaskTree::testTree()
|
void tst_Tasking::testTree()
|
||||||
{
|
{
|
||||||
QFETCH(TestData, testData);
|
QFETCH(TestData, testData);
|
||||||
|
|
||||||
@@ -1536,7 +1537,7 @@ void tst_TaskTree::testTree()
|
|||||||
QCOMPARE(errorCount, expectedErrorCount);
|
QCOMPARE(errorCount, expectedErrorCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_TaskTree::storageOperators()
|
void tst_Tasking::storageOperators()
|
||||||
{
|
{
|
||||||
TreeStorageBase storage1 = TreeStorage<CustomStorage>();
|
TreeStorageBase storage1 = TreeStorage<CustomStorage>();
|
||||||
TreeStorageBase storage2 = 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
|
// 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
|
// while starting the task tree. When running task tree is destructed, the storage done
|
||||||
// handler shouldn't be invoked.
|
// handler shouldn't be invoked.
|
||||||
void tst_TaskTree::storageDestructor()
|
void tst_Tasking::storageDestructor()
|
||||||
{
|
{
|
||||||
bool setupCalled = false;
|
bool setupCalled = false;
|
||||||
const auto setupHandler = [&setupCalled](CustomStorage *) {
|
const auto setupHandler = [&setupCalled](CustomStorage *) {
|
||||||
@@ -1586,6 +1587,6 @@ void tst_TaskTree::storageDestructor()
|
|||||||
QVERIFY(!doneCalled);
|
QVERIFY(!doneCalled);
|
||||||
}
|
}
|
||||||
|
|
||||||
QTEST_GUILESS_MAIN(tst_TaskTree)
|
QTEST_GUILESS_MAIN(tst_Tasking)
|
||||||
|
|
||||||
#include "tst_tasktree.moc"
|
#include "tst_tasking.moc"
|
||||||
@@ -14,7 +14,6 @@ add_subdirectory(persistentsettings)
|
|||||||
add_subdirectory(process)
|
add_subdirectory(process)
|
||||||
add_subdirectory(settings)
|
add_subdirectory(settings)
|
||||||
add_subdirectory(stringutils)
|
add_subdirectory(stringutils)
|
||||||
add_subdirectory(tasktree)
|
|
||||||
add_subdirectory(templateengine)
|
add_subdirectory(templateengine)
|
||||||
add_subdirectory(treemodel)
|
add_subdirectory(treemodel)
|
||||||
add_subdirectory(text)
|
add_subdirectory(text)
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
add_qtc_test(tst_utils_tasktree
|
|
||||||
DEPENDS Utils
|
|
||||||
SOURCES tst_tasktree.cpp
|
|
||||||
)
|
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -19,7 +19,6 @@ Project {
|
|||||||
"process/process.qbs",
|
"process/process.qbs",
|
||||||
"settings/settings.qbs",
|
"settings/settings.qbs",
|
||||||
"stringutils/stringutils.qbs",
|
"stringutils/stringutils.qbs",
|
||||||
"tasktree/tasktree.qbs",
|
|
||||||
"templateengine/templateengine.qbs",
|
"templateengine/templateengine.qbs",
|
||||||
"treemodel/treemodel.qbs",
|
"treemodel/treemodel.qbs",
|
||||||
"unixdevicefileaccess/unixdevicefileaccess.qbs",
|
"unixdevicefileaccess/unixdevicefileaccess.qbs",
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
// Copyright (C) 2022 The Qt Company Ltd.
|
// Copyright (C) 2022 The Qt Company Ltd.
|
||||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
// 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/layoutbuilder.h>
|
||||||
#include <utils/tasktree.h>
|
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user