forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/7.0'
Conflicts: src/plugins/android/androiddevice.cpp src/plugins/docker/dockerdevice.cpp Change-Id: Id16ba0d9993c9f608242622aceae0a2a6691e05e
This commit is contained in:
57
dist/changes-7.0.0.md
vendored
57
dist/changes-7.0.0.md
vendored
@@ -22,6 +22,8 @@ General
|
|||||||
* Added `Tools > Debug Qt Creator > Show Logs` for viewing Qt Creator debug logs
|
* Added `Tools > Debug Qt Creator > Show Logs` for viewing Qt Creator debug logs
|
||||||
* Moved C++ code model and language client inspectors to `Tools > Debug Qt
|
* Moved C++ code model and language client inspectors to `Tools > Debug Qt
|
||||||
Creator`
|
Creator`
|
||||||
|
* Fixed persistence of `Show Folders on Top` in `File System`
|
||||||
|
(QTCREATORBUG-27131)
|
||||||
|
|
||||||
Editing
|
Editing
|
||||||
-------
|
-------
|
||||||
@@ -30,23 +32,33 @@ Editing
|
|||||||
* Added support for choosing external editor as default editor
|
* Added support for choosing external editor as default editor
|
||||||
(QTCREATORBUG-13880)
|
(QTCREATORBUG-13880)
|
||||||
* Fixed copy action in text editing macros (QTCREATORBUG-26363)
|
* Fixed copy action in text editing macros (QTCREATORBUG-26363)
|
||||||
|
* Fixed cursor position after backspace and going up or down
|
||||||
|
(QTCREATORBUG-27035)
|
||||||
|
|
||||||
### C++
|
### C++
|
||||||
|
|
||||||
|
* Switched to LLVM 14 in binary packages
|
||||||
* Switched to Clangd by default (QTCREATORBUG-22917)
|
* Switched to Clangd by default (QTCREATORBUG-22917)
|
||||||
* Fixed that compilation errors appeared below code model errors in `Issues`
|
* Fixed that compilation errors appeared below code model errors in `Issues`
|
||||||
pane (QTCREATORBUG-23655)
|
pane (QTCREATORBUG-23655)
|
||||||
* Fixed that duplication files did not adapt header guard (QTCREATORBUG-26654)
|
* Fixed that duplication files did not adapt header guard (QTCREATORBUG-26654)
|
||||||
* Fixed highlighting and indentation of raw string literals (QTCREATORBUG-26211)
|
* Fixed highlighting and indentation of raw string literals (QTCREATORBUG-26211)
|
||||||
* Fixed performance issue in global indexer (QTCREATORBUG-26841)
|
* Fixed performance issue in global indexer (QTCREATORBUG-26841)
|
||||||
|
* Fixed tiny refactoring icon on HiDPI screens (QTCREATORBUG-26905)
|
||||||
|
* Fixed dot to arrow conversion with extra characters (QTCREATORBUG-27034)
|
||||||
* clang-format
|
* clang-format
|
||||||
* Moved settings to `Code Style` editor
|
* Moved settings to `Code Style` editor
|
||||||
* Added synchronization between `clang-format` settings and custom code style
|
* Added synchronization between `clang-format` settings and custom code style
|
||||||
* Clangd
|
* Clangd
|
||||||
|
* Added support for parse contexts (QTCREATORBUG-27009)
|
||||||
* Added memory usage inspector to language client inspector
|
* Added memory usage inspector to language client inspector
|
||||||
* Added highlighting of `Q_PROPERTY` declarations
|
* Added highlighting of `Q_PROPERTY` declarations
|
||||||
* Improved display of diagnostic messages
|
* Improved display of diagnostic messages
|
||||||
* Fixed access type categorization for functions
|
* Fixed access type categorization for functions
|
||||||
|
* Fixed highlighting issues (QTCREATORBUG-27059, QTCREATORBUG-27111)
|
||||||
|
* Fixed generating `Q_PROPERTY` members (QTCREATORBUG-27063)
|
||||||
|
* Fixed display of outdated diagnostics (QTCREATORBUG-26585)
|
||||||
|
* Fixed that `Unknown argument` diagnostics were shown (QTCREATORBUG-27113)
|
||||||
|
|
||||||
### QML
|
### QML
|
||||||
|
|
||||||
@@ -64,6 +76,7 @@ Editing
|
|||||||
(QTCREATORBUG-26624)
|
(QTCREATORBUG-26624)
|
||||||
* Fixed that outdated diagnostic could be shown (QTCREATORBUG-26585)
|
* Fixed that outdated diagnostic could be shown (QTCREATORBUG-26585)
|
||||||
* Fixed issue with re-highlighting (QTCREATORBUG-26624)
|
* Fixed issue with re-highlighting (QTCREATORBUG-26624)
|
||||||
|
* Fixed crash when rapidly closing documents (QTCREATORBUG-26534)
|
||||||
|
|
||||||
### FakeVim
|
### FakeVim
|
||||||
|
|
||||||
@@ -76,7 +89,11 @@ Projects
|
|||||||
* Added multiple selection to `Issues` pane (QTCREATORBUG-25547,
|
* Added multiple selection to `Issues` pane (QTCREATORBUG-25547,
|
||||||
QTCREATORBUG-26720)
|
QTCREATORBUG-26720)
|
||||||
* Improved automatic (re-)detection of toolchains (QTCREATORBUG-26460)
|
* Improved automatic (re-)detection of toolchains (QTCREATORBUG-26460)
|
||||||
|
* Changed default C++ standard for project wizards to C++17 (QTCREATORBUG-27045)
|
||||||
* Fixed unnecessary toolchain calls at startup
|
* Fixed unnecessary toolchain calls at startup
|
||||||
|
* Fixed warning that file is not part of any project (QTCREATORBUG-26987)
|
||||||
|
* Fixed that leading spaces could break custom output parsers
|
||||||
|
(QTCREATORBUG-26892)
|
||||||
|
|
||||||
### CMake
|
### CMake
|
||||||
|
|
||||||
@@ -92,6 +109,12 @@ Projects
|
|||||||
* Added context menu actions for resolving mismatches between kit, initial and
|
* Added context menu actions for resolving mismatches between kit, initial and
|
||||||
current configuration
|
current configuration
|
||||||
* Added `Help` to context menu for variable names
|
* Added `Help` to context menu for variable names
|
||||||
|
* Fixed that CMake was unnecessarily run after Kit update
|
||||||
|
* Fixed crash when Kit has no toolchain (QTCREATORBUG-26777)
|
||||||
|
|
||||||
|
### Qbs
|
||||||
|
|
||||||
|
* Fixed that `cpp.cFlags` and `cpp.cxxFlags` were not considered for code model
|
||||||
|
|
||||||
### Generic
|
### Generic
|
||||||
|
|
||||||
@@ -101,6 +124,10 @@ Projects
|
|||||||
|
|
||||||
* Fixed parsing of `SUBDIRS`
|
* Fixed parsing of `SUBDIRS`
|
||||||
|
|
||||||
|
### Mercurial
|
||||||
|
|
||||||
|
* Fixed saving of settings (QTCREATORBUG-27091)
|
||||||
|
|
||||||
Debugging
|
Debugging
|
||||||
---------
|
---------
|
||||||
|
|
||||||
@@ -143,11 +170,23 @@ Test Integration
|
|||||||
Platforms
|
Platforms
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
### Windows
|
||||||
|
|
||||||
|
* Fixed auto-detection of MinGW compiler (QTCREATORBUG-27057)
|
||||||
|
* Fixed missing compile `Issues` for MSVC (QTCREATORBUG-27056)
|
||||||
|
* Fixed wrong path separator when using `-client` (QTCREATORBUG-27075)
|
||||||
|
|
||||||
|
### Linux
|
||||||
|
|
||||||
|
* Added Wayland backend (QTCREATORBUG-26867)
|
||||||
|
|
||||||
### macOS
|
### macOS
|
||||||
|
|
||||||
* Fixed that macOS dark mode was not used for dark themes (QTCREATORBUG-22477)
|
* Fixed that macOS dark mode was not used for dark themes (QTCREATORBUG-22477)
|
||||||
* Fixed that user applications inherited access permissions from Qt Creator
|
* Fixed that user applications inherited access permissions from Qt Creator
|
||||||
(QTCREATORBUG-26743)
|
(QTCREATORBUG-26743)
|
||||||
|
* Fixed key repeat (QTCREATORBUG-26925)
|
||||||
|
* Fixed environment when opening `Terminal` with `zsh`
|
||||||
|
|
||||||
### Android
|
### Android
|
||||||
|
|
||||||
@@ -159,10 +198,14 @@ Platforms
|
|||||||
(QTCREATORBUG-26709)
|
(QTCREATORBUG-26709)
|
||||||
* Fixed detection of available NDK platforms for recent NDKs
|
* Fixed detection of available NDK platforms for recent NDKs
|
||||||
(QTCREATORBUG-26772)
|
(QTCREATORBUG-26772)
|
||||||
|
* Fixed naming of devices that are connected via USB and WiFi at the same time
|
||||||
|
* Fixed deployment if Kit fails to determine ABI (QTCREATORBUG-27103)
|
||||||
|
|
||||||
### Remote Linux
|
### Remote Linux
|
||||||
|
|
||||||
* Fixed UI state after stopping remote applications (QTCREATORBUG-26848)
|
* Fixed UI state after stopping remote applications (QTCREATORBUG-26848)
|
||||||
|
* Fixed missing error message in `Application Output` when remote application
|
||||||
|
crashes (QTCREATORBUG-27007)
|
||||||
|
|
||||||
### WebAssembly
|
### WebAssembly
|
||||||
|
|
||||||
@@ -181,20 +224,26 @@ Platforms
|
|||||||
Credits for these changes go to:
|
Credits for these changes go to:
|
||||||
--------------------------------
|
--------------------------------
|
||||||
Aaron Barany
|
Aaron Barany
|
||||||
|
Aleksei German
|
||||||
Alessandro Portale
|
Alessandro Portale
|
||||||
Alexander Drozdov
|
Alexander Drozdov
|
||||||
Allan Sandfeld Jensen
|
Allan Sandfeld Jensen
|
||||||
|
Andre Hartmann
|
||||||
André Pönitz
|
André Pönitz
|
||||||
Anton Alimoff
|
Anton Alimoff
|
||||||
|
Antti Määttä
|
||||||
Artem Sokolovskii
|
Artem Sokolovskii
|
||||||
Assam Boudjelthia
|
Assam Boudjelthia
|
||||||
|
Björn Schäpers
|
||||||
Christiaan Janssen
|
Christiaan Janssen
|
||||||
Christian Kandeler
|
Christian Kandeler
|
||||||
Christian Stenger
|
Christian Stenger
|
||||||
|
Christian Strømme
|
||||||
Cristian Adam
|
Cristian Adam
|
||||||
Cristián Maureira-Fredes
|
Cristián Maureira-Fredes
|
||||||
David Schulz
|
David Schulz
|
||||||
Eike Ziller
|
Eike Ziller
|
||||||
|
Erik Verbruggen
|
||||||
Fawzi Mohamed
|
Fawzi Mohamed
|
||||||
Henning Gruendl
|
Henning Gruendl
|
||||||
Huixiong Cao
|
Huixiong Cao
|
||||||
@@ -209,20 +258,28 @@ Knud Dollereder
|
|||||||
Leena Miettinen
|
Leena Miettinen
|
||||||
Mahmoud Badri
|
Mahmoud Badri
|
||||||
Marco Bubke
|
Marco Bubke
|
||||||
|
Mats Honkamaa
|
||||||
Maximilian Goldstein
|
Maximilian Goldstein
|
||||||
Miikka Heikkinen
|
Miikka Heikkinen
|
||||||
Morten Johan Sørvig
|
Morten Johan Sørvig
|
||||||
Orgad Shaneh
|
Orgad Shaneh
|
||||||
|
Oswald Buddenhagen
|
||||||
Petar Perisin
|
Petar Perisin
|
||||||
Piotr Mikolajczyk
|
Piotr Mikolajczyk
|
||||||
|
Piotr Mućko
|
||||||
|
Rafael Roquetto
|
||||||
Robert Löhning
|
Robert Löhning
|
||||||
Samuel Ghinet
|
Samuel Ghinet
|
||||||
|
Tapani Mattila
|
||||||
Tasuku Suzuki
|
Tasuku Suzuki
|
||||||
|
Thiago Macieira
|
||||||
Thomas Hartmann
|
Thomas Hartmann
|
||||||
Tim Jenssen
|
Tim Jenssen
|
||||||
Tony Leinonen
|
Tony Leinonen
|
||||||
Topi Reinio
|
Topi Reinio
|
||||||
Tor Arne Vestbø
|
Tor Arne Vestbø
|
||||||
|
Tuomo Pelkonen
|
||||||
Ulf Hermann
|
Ulf Hermann
|
||||||
Ville Nummela
|
Ville Nummela
|
||||||
|
Xiaofeng Wang
|
||||||
XutaxKamay
|
XutaxKamay
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 102 KiB |
@@ -34,7 +34,7 @@
|
|||||||
development. In this manual, we indicate which components are supported at
|
development. In this manual, we indicate which components are supported at
|
||||||
the time of writing.
|
the time of writing.
|
||||||
|
|
||||||
To develop for MCUs, \l{Using Project Wizards}{create an MCU project}. Only
|
To develop for MCUs, \l{Creating a Project}{create an MCU project}. Only
|
||||||
the components available on MCUs are displayed in \l Components. Only a
|
the components available on MCUs are displayed in \l Components. Only a
|
||||||
subset of properties is supported for the supported components. The
|
subset of properties is supported for the supported components. The
|
||||||
properties that are not available on MCUs are marked in the \l Properties
|
properties that are not available on MCUs are marked in the \l Properties
|
||||||
|
@@ -37,35 +37,27 @@
|
|||||||
Creating a project enables you to:
|
Creating a project enables you to:
|
||||||
|
|
||||||
\list
|
\list
|
||||||
\li Group files together
|
\li Group files together.
|
||||||
\li Include \l{UI Files}{UI files} (.ui.qml), component files (.qml),
|
\li Include \l{UI Files}{UI files} (.ui.qml), component files (.qml),
|
||||||
and assets files
|
and assets files.
|
||||||
\li Specify settings for previewing UIs
|
\li Specify settings for previewing UIs.
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
Setting up a new project in \QDS is aided by a wizard that guides you
|
Setting up a new project in \QDS is aided by a wizard with a set of
|
||||||
step-by-step through the project creation process. The wizard templates
|
presets that you can choose from. You can adjust project settings and save
|
||||||
prompt you to enter the settings needed for a particular type of project
|
custom presets. When you create a project, all necessary files are created.
|
||||||
and create the necessary files for you.
|
|
||||||
|
|
||||||
To test how well your designs work, you can preview the
|
The following presets are available:
|
||||||
UIs on the desktop, embedded Linux devices, or Android devices. For more
|
|
||||||
information, see \l{Validating with Target Hardware}.
|
|
||||||
|
|
||||||
\image studio-project-wizards.png "A list of project wizards"
|
|
||||||
|
|
||||||
You can export designs from other design tools and import them to projects
|
|
||||||
or create them from scratch using the following wizard presets:
|
|
||||||
|
|
||||||
\table
|
\table
|
||||||
\header
|
\header
|
||||||
\li Category
|
\li Category
|
||||||
\li Wizard Preset
|
\li Preset
|
||||||
\li Purpose
|
\li Purpose
|
||||||
\row
|
\row
|
||||||
\li Recents
|
\li Recents
|
||||||
\li
|
\li
|
||||||
\li Lists the most recent presets that you have used.
|
\li Lists your most recently used presets.
|
||||||
\row
|
\row
|
||||||
\li {1,2} General
|
\li {1,2} General
|
||||||
\li Empty
|
\li Empty
|
||||||
@@ -100,15 +92,30 @@
|
|||||||
\li Launcher
|
\li Launcher
|
||||||
\li Creates a project that uses default components such as rectangles,
|
\li Creates a project that uses default components such as rectangles,
|
||||||
images, and text, and defines a launcher application.
|
images, and text, and defines a launcher application.
|
||||||
|
\row
|
||||||
|
\li Custom
|
||||||
|
\li
|
||||||
|
\li Lists your saved custom presets.
|
||||||
|
\note This tab is not visible if there are no saved custom presets.
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
\section1 Using Project Wizards
|
\image studio-project-wizards.png "The Create Project wizard"
|
||||||
|
|
||||||
To create a new project:
|
To test how well your designs work, you can preview the
|
||||||
|
UIs on the desktop, embedded Linux devices, or Android devices. For more
|
||||||
|
information, see \l{Validating with Target Hardware}.
|
||||||
|
|
||||||
|
You can export designs from other design tools and import them to projects.
|
||||||
|
For more information, see \l{Exporting from Design Tools} and
|
||||||
|
\l{Importing Designs From Other Design Tools}.
|
||||||
|
|
||||||
|
\section1 Creating a Project
|
||||||
|
|
||||||
|
To create a project:
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
\li Select \uicontrol File > \uicontrol {New Project}.
|
\li Select \uicontrol File > \uicontrol {New Project}.
|
||||||
\li In the \uicontrol Presets tab, select a wizard preset.
|
\li In the \uicontrol Presets tab, select a preset.
|
||||||
\li In the \uicontrol Details tab:
|
\li In the \uicontrol Details tab:
|
||||||
\list
|
\list
|
||||||
\li Enter a name for the project. Keep in mind that projects
|
\li Enter a name for the project. Keep in mind that projects
|
||||||
@@ -167,9 +174,24 @@
|
|||||||
\uicontrol Assets > \inlineimage icons/plus.png
|
\uicontrol Assets > \inlineimage icons/plus.png
|
||||||
.
|
.
|
||||||
|
|
||||||
|
\section1 Using Custom Presets
|
||||||
|
|
||||||
|
You can save project settings as custom presets. All saved custom presets
|
||||||
|
are available on the \uicontrol Custom tab in the
|
||||||
|
\uicontrol {Create Project} wizard. You cannot modify custom presets once
|
||||||
|
you have created them.
|
||||||
|
|
||||||
|
To create a custom preset:
|
||||||
|
\list 1
|
||||||
|
\li In the \uicontrol {Create Project} wizard, set the details and style
|
||||||
|
that you want to use.
|
||||||
|
\li Select \uicontrol {Save Custom Preset} and give a name for the custom
|
||||||
|
preset.
|
||||||
|
\endlist
|
||||||
|
|
||||||
\section1 Adding Files to Projects
|
\section1 Adding Files to Projects
|
||||||
|
|
||||||
You can use wizard templates also to add individual files to projects.
|
You can use wizard templates to add individual files to projects.
|
||||||
|
|
||||||
The wizard templates in the \uicontrol {Qt Quick Controls} category create
|
The wizard templates in the \uicontrol {Qt Quick Controls} category create
|
||||||
stylable versions of the components in the \uicontrol {Qt Quick Controls}
|
stylable versions of the components in the \uicontrol {Qt Quick Controls}
|
||||||
|
@@ -130,7 +130,7 @@
|
|||||||
\li \l {Textures}{Texture} (four instances)
|
\li \l {Textures}{Texture} (four instances)
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
We start by creating a \l{Using Project Wizards}{Qt Quick 3D Application}
|
We start by creating a \l{Creating a Project}{Qt Quick 3D Application}
|
||||||
project and adding the assets to it. We then follow the instructions above
|
project and adding the assets to it. We then follow the instructions above
|
||||||
to add the \uicontrol {Particle System} component instance, which provides
|
to add the \uicontrol {Particle System} component instance, which provides
|
||||||
us with our first \uicontrol Emitter, \uicontrol {Sprite Particle}, and
|
us with our first \uicontrol Emitter, \uicontrol {Sprite Particle}, and
|
||||||
|
@@ -37,7 +37,7 @@ View3D {
|
|||||||
function fitToViewPort()
|
function fitToViewPort()
|
||||||
{
|
{
|
||||||
// The magic number is the distance from camera default pos to origin
|
// The magic number is the distance from camera default pos to origin
|
||||||
_generalHelper.calculateNodeBoundsAndFocusCamera(theCamera, importScene, root,
|
_generalHelper.calculateNodeBoundsAndFocusCamera(theCamera, sourceModel, root,
|
||||||
1040);
|
1040);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ View3D {
|
|||||||
|
|
||||||
Model {
|
Model {
|
||||||
id: model
|
id: model
|
||||||
source: sourceModel.source
|
source: _generalHelper.resolveAbsoluteSourceUrl(sourceModel)
|
||||||
geometry: sourceModel.geometry
|
geometry: sourceModel.geometry
|
||||||
|
|
||||||
materials: [
|
materials: [
|
||||||
|
@@ -42,6 +42,7 @@
|
|||||||
#include <QtQuick3DRuntimeRender/private/qssgrendermodel_p.h>
|
#include <QtQuick3DRuntimeRender/private/qssgrendermodel_p.h>
|
||||||
#include <QtQuick3DUtils/private/qssgbounds3_p.h>
|
#include <QtQuick3DUtils/private/qssgbounds3_p.h>
|
||||||
#include <QtQuick3DUtils/private/qssgutils_p.h>
|
#include <QtQuick3DUtils/private/qssgutils_p.h>
|
||||||
|
#include <QtQml/qqml.h>
|
||||||
#include <QtQuick/qquickwindow.h>
|
#include <QtQuick/qquickwindow.h>
|
||||||
#include <QtQuick/qquickitem.h>
|
#include <QtQuick/qquickitem.h>
|
||||||
#include <QtCore/qmath.h>
|
#include <QtCore/qmath.h>
|
||||||
@@ -93,6 +94,26 @@ QString GeneralHelper::generateUniqueName(const QString &nameRoot)
|
|||||||
return QStringLiteral("%1_%2").arg(nameRoot).arg(count);
|
return QStringLiteral("%1_%2").arg(nameRoot).arg(count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Resolves absolute model source path
|
||||||
|
QUrl GeneralHelper::resolveAbsoluteSourceUrl(const QQuick3DModel *sourceModel)
|
||||||
|
{
|
||||||
|
if (!sourceModel)
|
||||||
|
return {};
|
||||||
|
|
||||||
|
const QUrl source = sourceModel->source();
|
||||||
|
if (source.hasFragment()) {
|
||||||
|
// Fragment is part of the url separated by '#', check if it is an index or primitive
|
||||||
|
bool isNumber = false;
|
||||||
|
source.fragment().toInt(&isNumber);
|
||||||
|
// If it wasn't an index, then it was a primitive and we can return it as-is
|
||||||
|
if (!isNumber)
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
|
||||||
|
QQmlContext *context = qmlContext(sourceModel);
|
||||||
|
return context ? context->resolvedUrl(source) : source;
|
||||||
|
}
|
||||||
|
|
||||||
void GeneralHelper::orbitCamera(QQuick3DCamera *camera, const QVector3D &startRotation,
|
void GeneralHelper::orbitCamera(QQuick3DCamera *camera, const QVector3D &startRotation,
|
||||||
const QVector3D &lookAtPoint, const QVector3D &pressPos,
|
const QVector3D &lookAtPoint, const QVector3D &pressPos,
|
||||||
const QVector3D ¤tPos)
|
const QVector3D ¤tPos)
|
||||||
|
@@ -33,6 +33,7 @@
|
|||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
#include <QQuaternion>
|
#include <QQuaternion>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
#include <QUrl>
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
#include <QVector3D>
|
#include <QVector3D>
|
||||||
#include <QtQuick3D/private/qquick3dpickresult_p.h>
|
#include <QtQuick3D/private/qquick3dpickresult_p.h>
|
||||||
@@ -58,6 +59,7 @@ public:
|
|||||||
|
|
||||||
Q_INVOKABLE void requestOverlayUpdate();
|
Q_INVOKABLE void requestOverlayUpdate();
|
||||||
Q_INVOKABLE QString generateUniqueName(const QString &nameRoot);
|
Q_INVOKABLE QString generateUniqueName(const QString &nameRoot);
|
||||||
|
Q_INVOKABLE QUrl resolveAbsoluteSourceUrl(const QQuick3DModel *sourceModel);
|
||||||
|
|
||||||
Q_INVOKABLE void orbitCamera(QQuick3DCamera *camera, const QVector3D &startRotation,
|
Q_INVOKABLE void orbitCamera(QQuick3DCamera *camera, const QVector3D &startRotation,
|
||||||
const QVector3D &lookAtPoint, const QVector3D &pressPos,
|
const QVector3D &lookAtPoint, const QVector3D &pressPos,
|
||||||
|
@@ -1091,9 +1091,15 @@ void Qt5InformationNodeInstanceServer::doRenderModelNode3DImageView()
|
|||||||
m_modelNode3DImageViewData.window->resize(renderSize);
|
m_modelNode3DImageViewData.window->resize(renderSize);
|
||||||
m_modelNode3DImageViewData.rootItem->setSize(renderSize);
|
m_modelNode3DImageViewData.rootItem->setSize(renderSize);
|
||||||
|
|
||||||
QMetaObject::invokeMethod(
|
if (createdFromComponent) {
|
||||||
m_modelNode3DImageViewData.rootItem, "createViewForObject",
|
QMetaObject::invokeMethod(
|
||||||
Q_ARG(QVariant, objectToVariant(instanceObj)));
|
m_modelNode3DImageViewData.rootItem, "createViewForNode",
|
||||||
|
Q_ARG(QVariant, objectToVariant(instanceObj)));
|
||||||
|
} else {
|
||||||
|
QMetaObject::invokeMethod(
|
||||||
|
m_modelNode3DImageViewData.rootItem, "createViewForObject",
|
||||||
|
Q_ARG(QVariant, objectToVariant(instanceObj)));
|
||||||
|
}
|
||||||
|
|
||||||
// Need to render twice, first render updates spatial nodes
|
// Need to render twice, first render updates spatial nodes
|
||||||
for (int i = 0; i < 2; ++i) {
|
for (int i = 0; i < 2; ++i) {
|
||||||
|
@@ -204,11 +204,22 @@ Item {
|
|||||||
font.weight: Font.DemiBold
|
font.weight: Font.DemiBold
|
||||||
font.pixelSize: DialogValues.viewHeaderPixelSize
|
font.pixelSize: DialogValues.viewHeaderPixelSize
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
color: tabBarRow.currIndex === index ? DialogValues.textColorInteraction
|
|
||||||
: DialogValues.textColor
|
color: {
|
||||||
|
var color = tabBarRow.currIndex === index
|
||||||
|
? DialogValues.textColorInteraction
|
||||||
|
: DialogValues.textColor
|
||||||
|
|
||||||
|
return tabItemMouseArea.containsMouse
|
||||||
|
? Qt.darker(color, 1.5)
|
||||||
|
: color
|
||||||
|
}
|
||||||
|
|
||||||
Behavior on color { ColorAnimation { duration: tabBar.animDur } }
|
Behavior on color { ColorAnimation { duration: tabBar.animDur } }
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
id: tabItemMouseArea
|
||||||
|
hoverEnabled: true
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
tabBar.selectTab(index)
|
tabBar.selectTab(index)
|
||||||
|
@@ -286,12 +286,8 @@ Item {
|
|||||||
realStepSize: 10
|
realStepSize: 10
|
||||||
font.pixelSize: DialogValues.defaultPixelSize
|
font.pixelSize: DialogValues.defaultPixelSize
|
||||||
|
|
||||||
onRealValueChanged: {
|
onRealValueChanged: orientationButton.isHorizontal =
|
||||||
if (widthField.realValue >= heightField.realValue)
|
widthField.realValue >= heightField.realValue
|
||||||
orientationButton.setHorizontal()
|
|
||||||
else
|
|
||||||
orientationButton.setVertical()
|
|
||||||
}
|
|
||||||
} // Width Text Field
|
} // Width Text Field
|
||||||
|
|
||||||
Binding {
|
Binding {
|
||||||
@@ -311,12 +307,8 @@ Item {
|
|||||||
realStepSize: 10
|
realStepSize: 10
|
||||||
font.pixelSize: DialogValues.defaultPixelSize
|
font.pixelSize: DialogValues.defaultPixelSize
|
||||||
|
|
||||||
onRealValueChanged: {
|
onRealValueChanged: orientationButton.isHorizontal =
|
||||||
if (widthField.realValue >= heightField.realValue)
|
widthField.realValue >= heightField.realValue
|
||||||
orientationButton.setHorizontal()
|
|
||||||
else
|
|
||||||
orientationButton.setVertical()
|
|
||||||
}
|
|
||||||
} // Height Text Field
|
} // Height Text Field
|
||||||
|
|
||||||
Binding {
|
Binding {
|
||||||
@@ -327,69 +319,69 @@ Item {
|
|||||||
|
|
||||||
Item { Layout.fillWidth: true }
|
Item { Layout.fillWidth: true }
|
||||||
|
|
||||||
Button {
|
Item {
|
||||||
id: orientationButton
|
id: orientationButton
|
||||||
implicitWidth: 100
|
implicitWidth: 100
|
||||||
implicitHeight: 50
|
implicitHeight: 50
|
||||||
checked: false
|
property bool isHorizontal: false
|
||||||
hoverEnabled: false
|
|
||||||
background: Rectangle {
|
|
||||||
width: parent.width
|
|
||||||
height: parent.height
|
|
||||||
color: "transparent"
|
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
Item {
|
spacing: orientationButton.width / 4
|
||||||
width: orientationButton.width / 2
|
|
||||||
height: orientationButton.height
|
function computeColor(barId) {
|
||||||
Rectangle {
|
var color = DialogValues.textColor
|
||||||
id: horizontalBar
|
|
||||||
color: "white"
|
if (barId === horizontalBar) {
|
||||||
width: parent.width
|
color = orientationButton.isHorizontal
|
||||||
height: orientationButton.height / 2
|
? DialogValues.textColorInteraction
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
: DialogValues.textColor
|
||||||
radius: 3
|
} else {
|
||||||
}
|
color = orientationButton.isHorizontal
|
||||||
|
? DialogValues.textColor
|
||||||
|
: DialogValues.textColorInteraction
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
if (orientationButtonMouseArea.containsMouse)
|
||||||
width: orientationButton.width / 4
|
color = Qt.darker(color, 1.5)
|
||||||
height: orientationButton.height
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
return color
|
||||||
id: verticalBar
|
}
|
||||||
width: orientationButton.width / 4
|
|
||||||
height: orientationButton.height
|
Rectangle {
|
||||||
color: "white"
|
id: horizontalBar
|
||||||
radius: 3
|
color: parent.computeColor(horizontalBar)
|
||||||
}
|
width: orientationButton.width / 2
|
||||||
|
height: orientationButton.height / 2
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
radius: 3
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: verticalBar
|
||||||
|
color: parent.computeColor(verticalBar)
|
||||||
|
width: orientationButton.width / 4
|
||||||
|
height: orientationButton.height
|
||||||
|
radius: 3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onClicked: {
|
MouseArea {
|
||||||
if (widthField.realValue && heightField.realValue) {
|
id: orientationButtonMouseArea
|
||||||
[widthField.realValue, heightField.realValue] = [heightField.realValue, widthField.realValue]
|
anchors.fill: parent
|
||||||
orientationButton.checked = !orientationButton.checked
|
hoverEnabled: true
|
||||||
|
|
||||||
if (widthField.realValue === heightField.realValue)
|
onClicked: {
|
||||||
orientationButton.checked ? setVertical() : setHorizontal()
|
if (widthField.realValue && heightField.realValue) {
|
||||||
|
[widthField.realValue, heightField.realValue] = [heightField.realValue, widthField.realValue]
|
||||||
|
|
||||||
|
if (widthField.realValue === heightField.realValue)
|
||||||
|
orientationButton.isHorizontal = !orientationButton.isHorizontal
|
||||||
|
else
|
||||||
|
orientationButton.isHorizontal = widthField.realValue > heightField.realValue
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function setHorizontal() {
|
|
||||||
orientationButton.checked = false
|
|
||||||
horizontalBar.color = DialogValues.textColorInteraction
|
|
||||||
verticalBar.color = "white"
|
|
||||||
}
|
|
||||||
|
|
||||||
function setVertical() {
|
|
||||||
orientationButton.checked = true
|
|
||||||
horizontalBar.color = "white"
|
|
||||||
verticalBar.color = DialogValues.textColorInteraction
|
|
||||||
}
|
|
||||||
} // Orientation button
|
} // Orientation button
|
||||||
|
|
||||||
} // GridLayout: orientation + width + height
|
} // GridLayout: orientation + width + height
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
@@ -507,6 +499,8 @@ Item {
|
|||||||
presetNameTextField.text = text.trim()
|
presetNameTextField.text = text.trim()
|
||||||
presetNameTextField.text = text.replace(/\s+/g, " ")
|
presetNameTextField.text = text.replace(/\s+/g, " ")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onAccepted: savePresetDialog.accept()
|
||||||
}
|
}
|
||||||
|
|
||||||
Binding {
|
Binding {
|
||||||
|
@@ -160,8 +160,17 @@ Item {
|
|||||||
+ 2 * DialogValues.styleImageBorderWidth
|
+ 2 * DialogValues.styleImageBorderWidth
|
||||||
height: DialogValues.styleImageHeight
|
height: DialogValues.styleImageHeight
|
||||||
+ 2 * DialogValues.styleImageBorderWidth
|
+ 2 * DialogValues.styleImageBorderWidth
|
||||||
border.color: index === stylesList.currentIndex ? DialogValues.textColorInteraction : "transparent"
|
|
||||||
border.width: index === stylesList.currentIndex ? DialogValues.styleImageBorderWidth : 0
|
border.color: itemRectMouseArea.containsMouse
|
||||||
|
? DialogValues.textColor
|
||||||
|
: (index === stylesList.currentIndex
|
||||||
|
? DialogValues.textColorInteraction
|
||||||
|
: "transparent")
|
||||||
|
|
||||||
|
border.width: index === stylesList.currentIndex || itemRectMouseArea.containsMouse
|
||||||
|
? DialogValues.styleImageBorderWidth
|
||||||
|
: 0
|
||||||
|
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
@@ -173,6 +182,12 @@ Item {
|
|||||||
asynchronous: false
|
asynchronous: false
|
||||||
source: "image://newprojectdialog_library/" + BackendApi.styleModel.iconId(model.index)
|
source: "image://newprojectdialog_library/" + BackendApi.styleModel.iconId(model.index)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: itemRectMouseArea
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
}
|
||||||
} // Rectangle
|
} // Rectangle
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
cmake_minimum_required(VERSION 3.18)
|
cmake_minimum_required(VERSION 3.18)
|
||||||
|
|
||||||
project(%{ProjectName} LANGUAGES CXX)
|
project(%{ProjectName}App LANGUAGES CXX)
|
||||||
|
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
|
||||||
find_package(Qt6 COMPONENTS Gui Qml Quick)
|
find_package(Qt6 COMPONENTS Gui Qml Quick)
|
||||||
add_executable(%{ProjectExecutableName} src/main.cpp)
|
qt_add_executable(%{ProjectExecutableName} src/main.cpp)
|
||||||
|
|
||||||
qt_add_resources(%{ProjectExecutableName} "configuration"
|
qt_add_resources(%{ProjectExecutableName} "configuration"
|
||||||
PREFIX "/"
|
PREFIX "/"
|
||||||
|
@@ -84,7 +84,7 @@ bool %{CN}::setData(const QModelIndex &index, const QVariant &value, int role)
|
|||||||
{
|
{
|
||||||
if (data(index, role) != value) {
|
if (data(index, role) != value) {
|
||||||
// FIXME: Implement me!
|
// FIXME: Implement me!
|
||||||
emit dataChanged(index, index, QVector<int>() << role);
|
emit dataChanged(index, index, {role});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -95,7 +95,7 @@ Qt::ItemFlags %{CN}::flags(const QModelIndex &index) const
|
|||||||
if (!index.isValid())
|
if (!index.isValid())
|
||||||
return Qt::NoItemFlags;
|
return Qt::NoItemFlags;
|
||||||
|
|
||||||
return Qt::ItemIsEditable; // FIXME: Implement me!
|
return QAbstractItemModel::flags(index) | Qt::ItemIsEditable; // FIXME: Implement me!
|
||||||
}
|
}
|
||||||
@endif
|
@endif
|
||||||
@if %{AddData}
|
@if %{AddData}
|
||||||
@@ -105,6 +105,7 @@ bool %{CN}::insertRows(int row, int count, const QModelIndex &parent)
|
|||||||
beginInsertRows(parent, row, row + count - 1);
|
beginInsertRows(parent, row, row + count - 1);
|
||||||
// FIXME: Implement me!
|
// FIXME: Implement me!
|
||||||
endInsertRows();
|
endInsertRows();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool %{CN}::insertColumns(int column, int count, const QModelIndex &parent)
|
bool %{CN}::insertColumns(int column, int count, const QModelIndex &parent)
|
||||||
@@ -112,6 +113,7 @@ bool %{CN}::insertColumns(int column, int count, const QModelIndex &parent)
|
|||||||
beginInsertColumns(parent, column, column + count - 1);
|
beginInsertColumns(parent, column, column + count - 1);
|
||||||
// FIXME: Implement me!
|
// FIXME: Implement me!
|
||||||
endInsertColumns();
|
endInsertColumns();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
@endif
|
@endif
|
||||||
@if %{RemoveData}
|
@if %{RemoveData}
|
||||||
@@ -121,6 +123,7 @@ bool %{CN}::removeRows(int row, int count, const QModelIndex &parent)
|
|||||||
beginRemoveRows(parent, row, row + count - 1);
|
beginRemoveRows(parent, row, row + count - 1);
|
||||||
// FIXME: Implement me!
|
// FIXME: Implement me!
|
||||||
endRemoveRows();
|
endRemoveRows();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool %{CN}::removeColumns(int column, int count, const QModelIndex &parent)
|
bool %{CN}::removeColumns(int column, int count, const QModelIndex &parent)
|
||||||
@@ -128,6 +131,7 @@ bool %{CN}::removeColumns(int column, int count, const QModelIndex &parent)
|
|||||||
beginRemoveColumns(parent, column, column + count - 1);
|
beginRemoveColumns(parent, column, column + count - 1);
|
||||||
// FIXME: Implement me!
|
// FIXME: Implement me!
|
||||||
endRemoveColumns();
|
endRemoveColumns();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
@endif
|
@endif
|
||||||
%{JS: Cpp.closeNamespaces('%{Class}')}\
|
%{JS: Cpp.closeNamespaces('%{Class}')}\
|
||||||
|
@@ -68,7 +68,7 @@ bool %{CN}::setData(const QModelIndex &index, const QVariant &value, int role)
|
|||||||
{
|
{
|
||||||
if (data(index, role) != value) {
|
if (data(index, role) != value) {
|
||||||
// FIXME: Implement me!
|
// FIXME: Implement me!
|
||||||
emit dataChanged(index, index, QVector<int>() << role);
|
emit dataChanged(index, index, {role});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -79,7 +79,7 @@ Qt::ItemFlags %{CN}::flags(const QModelIndex &index) const
|
|||||||
if (!index.isValid())
|
if (!index.isValid())
|
||||||
return Qt::NoItemFlags;
|
return Qt::NoItemFlags;
|
||||||
|
|
||||||
return Qt::ItemIsEditable; // FIXME: Implement me!
|
return QAbstractItemModel::flags(index) | Qt::ItemIsEditable; // FIXME: Implement me!
|
||||||
}
|
}
|
||||||
@endif
|
@endif
|
||||||
@if %{AddData}
|
@if %{AddData}
|
||||||
@@ -89,6 +89,7 @@ bool %{CN}::insertRows(int row, int count, const QModelIndex &parent)
|
|||||||
beginInsertRows(parent, row, row + count - 1);
|
beginInsertRows(parent, row, row + count - 1);
|
||||||
// FIXME: Implement me!
|
// FIXME: Implement me!
|
||||||
endInsertRows();
|
endInsertRows();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
@endif
|
@endif
|
||||||
@if %{RemoveData}
|
@if %{RemoveData}
|
||||||
@@ -98,6 +99,7 @@ bool %{CN}::removeRows(int row, int count, const QModelIndex &parent)
|
|||||||
beginRemoveRows(parent, row, row + count - 1);
|
beginRemoveRows(parent, row, row + count - 1);
|
||||||
// FIXME: Implement me!
|
// FIXME: Implement me!
|
||||||
endRemoveRows();
|
endRemoveRows();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
@endif
|
@endif
|
||||||
%{JS: Cpp.closeNamespaces('%{Class}')}\
|
%{JS: Cpp.closeNamespaces('%{Class}')}\
|
||||||
|
@@ -75,7 +75,7 @@ bool %{CN}::setData(const QModelIndex &index, const QVariant &value, int role)
|
|||||||
{
|
{
|
||||||
if (data(index, role) != value) {
|
if (data(index, role) != value) {
|
||||||
// FIXME: Implement me!
|
// FIXME: Implement me!
|
||||||
emit dataChanged(index, index, QVector<int>() << role);
|
emit dataChanged(index, index, {role});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -86,7 +86,7 @@ Qt::ItemFlags %{CN}::flags(const QModelIndex &index) const
|
|||||||
if (!index.isValid())
|
if (!index.isValid())
|
||||||
return Qt::NoItemFlags;
|
return Qt::NoItemFlags;
|
||||||
|
|
||||||
return Qt::ItemIsEditable; // FIXME: Implement me!
|
return QAbstractItemModel::flags(index) | Qt::ItemIsEditable; // FIXME: Implement me!
|
||||||
}
|
}
|
||||||
@endif
|
@endif
|
||||||
@if %{AddData}
|
@if %{AddData}
|
||||||
@@ -96,6 +96,7 @@ bool %{CN}::insertRows(int row, int count, const QModelIndex &parent)
|
|||||||
beginInsertRows(parent, row, row + count - 1);
|
beginInsertRows(parent, row, row + count - 1);
|
||||||
// FIXME: Implement me!
|
// FIXME: Implement me!
|
||||||
endInsertRows();
|
endInsertRows();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool %{CN}::insertColumns(int column, int count, const QModelIndex &parent)
|
bool %{CN}::insertColumns(int column, int count, const QModelIndex &parent)
|
||||||
@@ -103,6 +104,7 @@ bool %{CN}::insertColumns(int column, int count, const QModelIndex &parent)
|
|||||||
beginInsertColumns(parent, column, column + count - 1);
|
beginInsertColumns(parent, column, column + count - 1);
|
||||||
// FIXME: Implement me!
|
// FIXME: Implement me!
|
||||||
endInsertColumns();
|
endInsertColumns();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
@endif
|
@endif
|
||||||
@if %{RemoveData}
|
@if %{RemoveData}
|
||||||
@@ -112,6 +114,7 @@ bool %{CN}::removeRows(int row, int count, const QModelIndex &parent)
|
|||||||
beginRemoveRows(parent, row, row + count - 1);
|
beginRemoveRows(parent, row, row + count - 1);
|
||||||
// FIXME: Implement me!
|
// FIXME: Implement me!
|
||||||
endRemoveRows();
|
endRemoveRows();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool %{CN}::removeColumns(int column, int count, const QModelIndex &parent)
|
bool %{CN}::removeColumns(int column, int count, const QModelIndex &parent)
|
||||||
@@ -119,6 +122,7 @@ bool %{CN}::removeColumns(int column, int count, const QModelIndex &parent)
|
|||||||
beginRemoveColumns(parent, column, column + count - 1);
|
beginRemoveColumns(parent, column, column + count - 1);
|
||||||
// FIXME: Implement me!
|
// FIXME: Implement me!
|
||||||
endRemoveColumns();
|
endRemoveColumns();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
@endif
|
@endif
|
||||||
%{JS: Cpp.closeNamespaces('%{Class}')}\
|
%{JS: Cpp.closeNamespaces('%{Class}')}\
|
||||||
|
@@ -281,11 +281,11 @@ Utils::optional<Utils::variant<QString, bool> >
|
|||||||
ServerCapabilities::WorkspaceServerCapabilities::WorkspaceFoldersCapabilities::changeNotifications() const
|
ServerCapabilities::WorkspaceServerCapabilities::WorkspaceFoldersCapabilities::changeNotifications() const
|
||||||
{
|
{
|
||||||
using RetType = Utils::variant<QString, bool>;
|
using RetType = Utils::variant<QString, bool>;
|
||||||
const QJsonValue &provider = value(implementationProviderKey);
|
const QJsonValue &change = value(changeNotificationsKey);
|
||||||
if (provider.isUndefined())
|
if (change.isUndefined())
|
||||||
return Utils::nullopt;
|
return Utils::nullopt;
|
||||||
return Utils::make_optional(provider.isBool() ? RetType(provider.toBool())
|
return Utils::make_optional(change.isBool() ? RetType(change.toBool())
|
||||||
: RetType(provider.toString()));
|
: RetType(change.toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServerCapabilities::WorkspaceServerCapabilities::WorkspaceFoldersCapabilities::setChangeNotifications(
|
void ServerCapabilities::WorkspaceServerCapabilities::WorkspaceFoldersCapabilities::setChangeNotifications(
|
||||||
|
@@ -4,7 +4,13 @@ Project {
|
|||||||
name: "QtcSsh"
|
name: "QtcSsh"
|
||||||
|
|
||||||
QtcLibrary {
|
QtcLibrary {
|
||||||
cpp.defines: base.concat("QTCSSH_LIBRARY")
|
cpp.defines: {
|
||||||
|
var defines = base;
|
||||||
|
defines.push("QTCSSH_LIBRARY");
|
||||||
|
if (project.withAutotests && !defines.contains("WITH_TESTS"))
|
||||||
|
defines.push("WITH_TESTS");
|
||||||
|
return defines;
|
||||||
|
}
|
||||||
cpp.enableExceptions: true
|
cpp.enableExceptions: true
|
||||||
|
|
||||||
Depends { name: "Qt"; submodules: ["widgets", "network" ] }
|
Depends { name: "Qt"; submodules: ["widgets", "network" ] }
|
||||||
|
@@ -404,4 +404,95 @@ SftpTransferPtr SshConnection::setupTransfer(
|
|||||||
d->connectionArgs(SshSettings::sftpFilePath())));
|
d->connectionArgs(SshSettings::sftpFilePath())));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WITH_TESTS
|
||||||
|
namespace SshTest {
|
||||||
|
const QString getHostFromEnvironment()
|
||||||
|
{
|
||||||
|
const QString host = QString::fromLocal8Bit(qgetenv("QTC_SSH_TEST_HOST"));
|
||||||
|
if (host.isEmpty() && qEnvironmentVariableIsSet("QTC_SSH_TEST_DEFAULTS"))
|
||||||
|
return QString("127.0.0.1");
|
||||||
|
return host;
|
||||||
|
}
|
||||||
|
|
||||||
|
quint16 getPortFromEnvironment()
|
||||||
|
{
|
||||||
|
const int port = qEnvironmentVariableIntValue("QTC_SSH_TEST_PORT");
|
||||||
|
return port != 0 ? quint16(port) : 22;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QString getUserFromEnvironment()
|
||||||
|
{
|
||||||
|
return QString::fromLocal8Bit(qgetenv("QTC_SSH_TEST_USER"));
|
||||||
|
}
|
||||||
|
|
||||||
|
const QString getKeyFileFromEnvironment()
|
||||||
|
{
|
||||||
|
const FilePath defaultKeyFile = FileUtils::homePath() / ".ssh/id_rsa";
|
||||||
|
const QString keyFile = QString::fromLocal8Bit(qgetenv("QTC_SSH_TEST_KEYFILE"));
|
||||||
|
if (keyFile.isEmpty()) {
|
||||||
|
if (qEnvironmentVariableIsSet("QTC_SSH_TEST_DEFAULTS"))
|
||||||
|
return defaultKeyFile.toString();
|
||||||
|
}
|
||||||
|
return keyFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QString userAtHost()
|
||||||
|
{
|
||||||
|
QString userMidFix = getUserFromEnvironment();
|
||||||
|
if (!userMidFix.isEmpty())
|
||||||
|
userMidFix.append('@');
|
||||||
|
return userMidFix + getHostFromEnvironment();
|
||||||
|
}
|
||||||
|
|
||||||
|
SshConnectionParameters getParameters()
|
||||||
|
{
|
||||||
|
SshConnectionParameters params;
|
||||||
|
if (!qEnvironmentVariableIsSet("QTC_SSH_TEST_DEFAULTS")) {
|
||||||
|
params.setUserName(getUserFromEnvironment());
|
||||||
|
params.privateKeyFile = Utils::FilePath::fromUserInput(getKeyFileFromEnvironment());
|
||||||
|
}
|
||||||
|
params.setHost(getHostFromEnvironment());
|
||||||
|
params.setPort(getPortFromEnvironment());
|
||||||
|
params.timeout = 10;
|
||||||
|
params.authenticationType = !params.privateKeyFile.isEmpty()
|
||||||
|
? QSsh::SshConnectionParameters::AuthenticationTypeSpecificKey
|
||||||
|
: QSsh::SshConnectionParameters::AuthenticationTypeAll;
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool checkParameters(const QSsh::SshConnectionParameters ¶ms)
|
||||||
|
{
|
||||||
|
if (qEnvironmentVariableIsSet("QTC_SSH_TEST_DEFAULTS"))
|
||||||
|
return true;
|
||||||
|
if (params.host().isEmpty()) {
|
||||||
|
qWarning("No hostname provided. Set QTC_SSH_TEST_HOST.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (params.userName().isEmpty())
|
||||||
|
qWarning("No user name provided - test may fail with empty default. Set QTC_SSH_TEST_USER.");
|
||||||
|
if (params.privateKeyFile.isEmpty()) {
|
||||||
|
qWarning("No key file provided. Set QTC_SSH_TEST_KEYFILE.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void printSetupHelp()
|
||||||
|
{
|
||||||
|
qInfo() << "In order to run this test properly it requires some setup (example for fedora):\n"
|
||||||
|
"1. Run a server on the host to connect to:\n"
|
||||||
|
" systemctl start sshd\n"
|
||||||
|
"2. Create your own ssh key (needed only once). For fedora it needs ecdsa type:\n"
|
||||||
|
" ssh-keygen -t ecdsa\n"
|
||||||
|
"3. Make your public key known to the server (needed only once):\n"
|
||||||
|
" ssh-copy-id -i [full path to your public key] [user@host]\n"
|
||||||
|
"4. Set the env variables before executing test:\n"
|
||||||
|
" QTC_SSH_TEST_HOST=127.0.0.1\n"
|
||||||
|
" QTC_SSH_TEST_KEYFILE=[full path to your private key]\n"
|
||||||
|
" QTC_SSH_TEST_USER=[your user name]\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace SshTest
|
||||||
|
#endif
|
||||||
|
|
||||||
} // namespace QSsh
|
} // namespace QSsh
|
||||||
|
@@ -139,6 +139,19 @@ private:
|
|||||||
SshConnectionPrivate * const d;
|
SshConnectionPrivate * const d;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef WITH_TESTS
|
||||||
|
namespace SshTest {
|
||||||
|
const QString QSSH_EXPORT getHostFromEnvironment();
|
||||||
|
quint16 QSSH_EXPORT getPortFromEnvironment();
|
||||||
|
const QString QSSH_EXPORT getUserFromEnvironment();
|
||||||
|
const QString QSSH_EXPORT getKeyFileFromEnvironment();
|
||||||
|
const QSSH_EXPORT QString userAtHost();
|
||||||
|
SshConnectionParameters QSSH_EXPORT getParameters();
|
||||||
|
bool QSSH_EXPORT checkParameters(const SshConnectionParameters ¶ms);
|
||||||
|
void QSSH_EXPORT printSetupHelp();
|
||||||
|
} // namespace SshTest
|
||||||
|
#endif
|
||||||
|
|
||||||
} // namespace QSsh
|
} // namespace QSsh
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(QSsh::SshConnectionParameters::AuthenticationType)
|
Q_DECLARE_METATYPE(QSsh::SshConnectionParameters::AuthenticationType)
|
||||||
|
@@ -88,7 +88,7 @@ const QMetaObject *TipLabel::metaObject() const
|
|||||||
struct qt_meta_stringdata_Utils_t {
|
struct qt_meta_stringdata_Utils_t {
|
||||||
const uint offsetsAndSize[2];
|
const uint offsetsAndSize[2];
|
||||||
char stringdata0[24];
|
char stringdata0[24];
|
||||||
} qt_meta_stringdata = { 8, sizeof("QTipLabel"), "QTipLabel" };
|
} qt_meta_stringdata = { {8, sizeof("QTipLabel")}, "QTipLabel" };
|
||||||
|
|
||||||
static const QMetaObject tipMetaObject {
|
static const QMetaObject tipMetaObject {
|
||||||
&QLabel::staticMetaObject, // SuperData superdata
|
&QLabel::staticMetaObject, // SuperData superdata
|
||||||
|
@@ -624,7 +624,7 @@ void AndroidDeviceManager::HandleAvdsListChange()
|
|||||||
}
|
}
|
||||||
|
|
||||||
QVector<Id> connectedDevs;
|
QVector<Id> connectedDevs;
|
||||||
for (auto item : m_avdsFutureWatcher.result()) {
|
for (const AndroidDeviceInfo &item : m_avdsFutureWatcher.result()) {
|
||||||
const Utils::Id deviceId = AndroidDevice::idFromDeviceInfo(item);
|
const Utils::Id deviceId = AndroidDevice::idFromDeviceInfo(item);
|
||||||
const QString displayName = AndroidDevice::displayNameFromInfo(item);
|
const QString displayName = AndroidDevice::displayNameFromInfo(item);
|
||||||
IDevice::ConstPtr dev = devMgr->find(deviceId);
|
IDevice::ConstPtr dev = devMgr->find(deviceId);
|
||||||
|
@@ -51,6 +51,7 @@
|
|||||||
#include <utils/environment.h>
|
#include <utils/environment.h>
|
||||||
#include <utils/fileutils.h>
|
#include <utils/fileutils.h>
|
||||||
#include <utils/hostosinfo.h>
|
#include <utils/hostosinfo.h>
|
||||||
|
#include <utils/infolabel.h>
|
||||||
#include <utils/layoutbuilder.h>
|
#include <utils/layoutbuilder.h>
|
||||||
#include <utils/overridecursor.h>
|
#include <utils/overridecursor.h>
|
||||||
#include <utils/pathlisteditor.h>
|
#include <utils/pathlisteditor.h>
|
||||||
@@ -324,13 +325,26 @@ public:
|
|||||||
data.useLocalUidGid = on;
|
data.useLocalUidGid = on;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
m_pathsListLabel = new InfoLabel(tr("Paths to mount:"));
|
||||||
|
// FIXME: 8.0: use
|
||||||
|
//m_pathsListLabel->setToolTip(tr("Source directory list should not be empty"));
|
||||||
|
|
||||||
m_pathsListEdit = new PathListEditor;
|
m_pathsListEdit = new PathListEditor;
|
||||||
|
// FIXME: 8.0: use
|
||||||
|
//m_pathsListEdit->setPlaceholderText(tr("Host directories to mount into the container"));
|
||||||
m_pathsListEdit->setToolTip(tr("Maps paths in this list one-to-one to the "
|
m_pathsListEdit->setToolTip(tr("Maps paths in this list one-to-one to the "
|
||||||
"docker container."));
|
"docker container."));
|
||||||
m_pathsListEdit->setPathList(data.mounts);
|
m_pathsListEdit->setPathList(data.mounts);
|
||||||
|
|
||||||
connect(m_pathsListEdit, &PathListEditor::changed, this, [dockerDevice, this]() {
|
auto markupMounts = [this] {
|
||||||
|
const bool isEmpty = m_pathsListEdit->pathList().isEmpty();
|
||||||
|
m_pathsListLabel->setType(isEmpty ? InfoLabel::Warning : InfoLabel::None);
|
||||||
|
};
|
||||||
|
markupMounts();
|
||||||
|
|
||||||
|
connect(m_pathsListEdit, &PathListEditor::changed, this, [dockerDevice, markupMounts, this] {
|
||||||
dockerDevice->setMounts(m_pathsListEdit->pathList());
|
dockerDevice->setMounts(m_pathsListEdit->pathList());
|
||||||
|
markupMounts();
|
||||||
});
|
});
|
||||||
|
|
||||||
auto logView = new QTextBrowser;
|
auto logView = new QTextBrowser;
|
||||||
@@ -346,6 +360,8 @@ public:
|
|||||||
searchDirsComboBox->addItem(tr("Search in Selected Directories"));
|
searchDirsComboBox->addItem(tr("Search in Selected Directories"));
|
||||||
|
|
||||||
auto searchDirsLineEdit = new FancyLineEdit;
|
auto searchDirsLineEdit = new FancyLineEdit;
|
||||||
|
// FIXME: 8.0: use
|
||||||
|
//searchDirsLineEdit->setPlaceholderText(tr("Semicolon-separated list of directories"));
|
||||||
searchDirsLineEdit->setToolTip(
|
searchDirsLineEdit->setToolTip(
|
||||||
tr("Select the paths in the docker image that should be scanned for kit entries."));
|
tr("Select the paths in the docker image that should be scanned for kit entries."));
|
||||||
searchDirsLineEdit->setHistoryCompleter("DockerMounts", true);
|
searchDirsLineEdit->setHistoryCompleter("DockerMounts", true);
|
||||||
@@ -397,7 +413,7 @@ public:
|
|||||||
daemonStateLabel, m_daemonReset, m_daemonState, Break(),
|
daemonStateLabel, m_daemonReset, m_daemonState, Break(),
|
||||||
m_runAsOutsideUser, Break(),
|
m_runAsOutsideUser, Break(),
|
||||||
Column {
|
Column {
|
||||||
new QLabel(tr("Paths to mount:")),
|
m_pathsListLabel,
|
||||||
m_pathsListEdit,
|
m_pathsListEdit,
|
||||||
}, Break(),
|
}, Break(),
|
||||||
Column {
|
Column {
|
||||||
@@ -437,7 +453,8 @@ private:
|
|||||||
QToolButton *m_daemonReset;
|
QToolButton *m_daemonReset;
|
||||||
QLabel *m_daemonState;
|
QLabel *m_daemonState;
|
||||||
QCheckBox *m_runAsOutsideUser;
|
QCheckBox *m_runAsOutsideUser;
|
||||||
Utils::PathListEditor *m_pathsListEdit;
|
InfoLabel *m_pathsListLabel;
|
||||||
|
PathListEditor *m_pathsListEdit;
|
||||||
|
|
||||||
KitDetector m_kitItemDetector;
|
KitDetector m_kitItemDetector;
|
||||||
};
|
};
|
||||||
@@ -1545,12 +1562,19 @@ public:
|
|||||||
m_log = new QTextBrowser;
|
m_log = new QTextBrowser;
|
||||||
m_log->setVisible(false);
|
m_log->setVisible(false);
|
||||||
|
|
||||||
|
const QString fail = QString{"Docker: "}
|
||||||
|
+ QCoreApplication::translate("Debugger::Internal::GdbEngine",
|
||||||
|
"Process failed to start.");
|
||||||
|
auto errorLabel = new Utils::InfoLabel(fail, Utils::InfoLabel::Error, this);
|
||||||
|
errorLabel->setVisible(false);
|
||||||
|
|
||||||
m_buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
|
m_buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
|
||||||
|
|
||||||
using namespace Layouting;
|
using namespace Layouting;
|
||||||
Column {
|
Column {
|
||||||
m_view,
|
m_view,
|
||||||
m_log,
|
m_log,
|
||||||
|
errorLabel,
|
||||||
m_buttons,
|
m_buttons,
|
||||||
}.attachTo(this);
|
}.attachTo(this);
|
||||||
|
|
||||||
@@ -1588,6 +1612,13 @@ public:
|
|||||||
m_log->append(DockerDevice::tr("Error: %1").arg(out));
|
m_log->append(DockerDevice::tr("Error: %1").arg(out));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
connect(m_process, &Utils::QtcProcess::finished,
|
||||||
|
this, [this, errorLabel]() {
|
||||||
|
if (m_process->exitCode() != 0) {
|
||||||
|
errorLabel->setVisible(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
connect(m_view->selectionModel(), &QItemSelectionModel::selectionChanged, [this] {
|
connect(m_view->selectionModel(), &QItemSelectionModel::selectionChanged, [this] {
|
||||||
const QModelIndexList selectedRows = m_view->selectionModel()->selectedRows();
|
const QModelIndexList selectedRows = m_view->selectionModel()->selectedRows();
|
||||||
QTC_ASSERT(selectedRows.size() == 1, return);
|
QTC_ASSERT(selectedRows.size() == 1, return);
|
||||||
|
@@ -281,4 +281,20 @@ bool NavigatorTreeView::viewportEvent(QEvent *event)
|
|||||||
return QTreeView::viewportEvent(event);
|
return QTreeView::viewportEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NavigatorTreeView::mousePressEvent(QMouseEvent *event)
|
||||||
|
{
|
||||||
|
// Block drag from starting if press was on an item that is not draggable.
|
||||||
|
// This is necessary as it is the selected items that are dragged and the pressed item may not
|
||||||
|
// be a selected item, e.g. when pressing on locked item, leading to unexpected drags.
|
||||||
|
m_dragAllowed = model()->flags(indexAt(event->pos())) & Qt::ItemIsDragEnabled;
|
||||||
|
|
||||||
|
QTreeView::mousePressEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
void NavigatorTreeView::startDrag(Qt::DropActions supportedActions)
|
||||||
|
{
|
||||||
|
if (m_dragAllowed)
|
||||||
|
QTreeView::startDrag(supportedActions);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -40,8 +40,13 @@ public:
|
|||||||
static void drawSelectionBackground(QPainter *painter, const QStyleOption &option);
|
static void drawSelectionBackground(QPainter *painter, const QStyleOption &option);
|
||||||
bool viewportEvent(QEvent *event) override;
|
bool viewportEvent(QEvent *event) override;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void mousePressEvent(QMouseEvent *event) override;
|
||||||
|
void startDrag(Qt::DropActions supportedActions) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PreviewToolTip *m_previewToolTip = nullptr;
|
PreviewToolTip *m_previewToolTip = nullptr;
|
||||||
qint32 m_previewToolTipNodeId = -1;
|
qint32 m_previewToolTipNodeId = -1;
|
||||||
|
bool m_dragAllowed = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -32,9 +32,9 @@
|
|||||||
#include <coreplugin/messagebox.h>
|
#include <coreplugin/messagebox.h>
|
||||||
#include "pluginmanager/widgetpluginmanager.h"
|
#include "pluginmanager/widgetpluginmanager.h"
|
||||||
|
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
#include <QMutex>
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
debug = false
|
debug = false
|
||||||
@@ -107,6 +107,7 @@ void MetaInfoPrivate::parseItemLibraryDescriptions()
|
|||||||
using QmlDesigner::Internal::MetaInfoPrivate;
|
using QmlDesigner::Internal::MetaInfoPrivate;
|
||||||
|
|
||||||
MetaInfo MetaInfo::s_global;
|
MetaInfo MetaInfo::s_global;
|
||||||
|
QMutex s_lock;
|
||||||
QStringList MetaInfo::s_pluginDirs;
|
QStringList MetaInfo::s_pluginDirs;
|
||||||
|
|
||||||
|
|
||||||
@@ -157,6 +158,8 @@ ItemLibraryInfo *MetaInfo::itemLibraryInfo() const
|
|||||||
*/
|
*/
|
||||||
MetaInfo MetaInfo::global()
|
MetaInfo MetaInfo::global()
|
||||||
{
|
{
|
||||||
|
QMutexLocker locker(&s_lock);
|
||||||
|
|
||||||
if (!s_global.m_p->m_isInitialized) {
|
if (!s_global.m_p->m_isInitialized) {
|
||||||
s_global.m_p = QSharedPointer<MetaInfoPrivate>(new MetaInfoPrivate(&s_global));
|
s_global.m_p = QSharedPointer<MetaInfoPrivate>(new MetaInfoPrivate(&s_global));
|
||||||
s_global.m_p->initialize();
|
s_global.m_p->initialize();
|
||||||
|
@@ -42,27 +42,48 @@ enum FoundLicense {
|
|||||||
enterprise
|
enterprise
|
||||||
};
|
};
|
||||||
|
|
||||||
FoundLicense checkLicense() {
|
namespace Internal {
|
||||||
|
ExtensionSystem::IPlugin *licenseCheckerPlugin()
|
||||||
|
{
|
||||||
const ExtensionSystem::PluginSpec *pluginSpec = Utils::findOrDefault(
|
const ExtensionSystem::PluginSpec *pluginSpec = Utils::findOrDefault(
|
||||||
ExtensionSystem::PluginManager::plugins(),
|
ExtensionSystem::PluginManager::plugins(),
|
||||||
Utils::equal(&ExtensionSystem::PluginSpec::name, QString("LicenseChecker")));
|
Utils::equal(&ExtensionSystem::PluginSpec::name, QString("LicenseChecker")));
|
||||||
|
|
||||||
if (!pluginSpec)
|
if (pluginSpec)
|
||||||
return community;
|
return pluginSpec->plugin();
|
||||||
|
return nullptr;
|
||||||
ExtensionSystem::IPlugin *plugin = pluginSpec->plugin();
|
|
||||||
|
|
||||||
if (!plugin)
|
|
||||||
return community;
|
|
||||||
|
|
||||||
bool retVal = false;
|
|
||||||
bool success = QMetaObject::invokeMethod(plugin,
|
|
||||||
"qdsEnterpriseLicense",
|
|
||||||
Qt::DirectConnection,
|
|
||||||
Q_RETURN_ARG(bool, retVal));
|
|
||||||
if (success && retVal)
|
|
||||||
return enterprise;
|
|
||||||
|
|
||||||
return professional;
|
|
||||||
}
|
}
|
||||||
|
} // namespace Internal
|
||||||
|
|
||||||
|
|
||||||
|
FoundLicense checkLicense()
|
||||||
|
{
|
||||||
|
if (auto plugin = Internal::licenseCheckerPlugin()) {
|
||||||
|
bool retVal = false;
|
||||||
|
bool success = QMetaObject::invokeMethod(plugin,
|
||||||
|
"qdsEnterpriseLicense",
|
||||||
|
Qt::DirectConnection,
|
||||||
|
Q_RETURN_ARG(bool, retVal));
|
||||||
|
if (success && retVal)
|
||||||
|
return enterprise;
|
||||||
|
else
|
||||||
|
return professional;
|
||||||
|
}
|
||||||
|
return community;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString licensee()
|
||||||
|
{
|
||||||
|
if (auto plugin = Internal::licenseCheckerPlugin()) {
|
||||||
|
QString retVal;
|
||||||
|
bool success = QMetaObject::invokeMethod(plugin,
|
||||||
|
"licensee",
|
||||||
|
Qt::DirectConnection,
|
||||||
|
Q_RETURN_ARG(QString, retVal));
|
||||||
|
if (success)
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Utils
|
} // namespace Utils
|
||||||
|
@@ -35,6 +35,7 @@
|
|||||||
#include "qmldesignerconstants.h"
|
#include "qmldesignerconstants.h"
|
||||||
#include "qmldesignerprojectmanager.h"
|
#include "qmldesignerprojectmanager.h"
|
||||||
#include "settingspage.h"
|
#include "settingspage.h"
|
||||||
|
#include "dynamiclicensecheck.h"
|
||||||
|
|
||||||
#include <metainfo.h>
|
#include <metainfo.h>
|
||||||
#include <connectionview.h>
|
#include <connectionview.h>
|
||||||
@@ -312,14 +313,24 @@ bool QmlDesignerPlugin::delayedInitialize()
|
|||||||
d->viewManager.registerFormEditorTool(std::make_unique<QmlDesigner::TransitionTool>());
|
d->viewManager.registerFormEditorTool(std::make_unique<QmlDesigner::TransitionTool>());
|
||||||
|
|
||||||
if (QmlProjectManager::QmlProject::isQtDesignStudio()) {
|
if (QmlProjectManager::QmlProject::isQtDesignStudio()) {
|
||||||
|
d->mainWidget.initialize();
|
||||||
|
|
||||||
emitUsageStatistics("StandaloneMode");
|
emitUsageStatistics("StandaloneMode");
|
||||||
if (QmlProjectManager::QmlProject::isQtDesignStudioStartedFromQtC())
|
if (QmlProjectManager::QmlProject::isQtDesignStudioStartedFromQtC())
|
||||||
emitUsageStatistics("QDSlaunchedFromQtC");
|
emitUsageStatistics("QDSlaunchedFromQtC");
|
||||||
emitUsageStatistics("QDSstartupCount");
|
emitUsageStatistics("QDSstartupCount");
|
||||||
|
|
||||||
|
FoundLicense license = checkLicense();
|
||||||
|
if (license == FoundLicense::enterprise)
|
||||||
|
Core::ICore::appendAboutInformation(tr("License: Enterprise"));
|
||||||
|
else if (license == FoundLicense::professional)
|
||||||
|
Core::ICore::appendAboutInformation(tr("License: Professional"));
|
||||||
|
|
||||||
|
if (!licensee().isEmpty())
|
||||||
|
Core::ICore::appendAboutInformation(tr("Licensee: %1").arg(licensee()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (QmlProjectManager::QmlProject::isQtDesignStudio())
|
MetaInfo::global();
|
||||||
d->mainWidget.initialize();
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -210,7 +210,7 @@ bool QmlProjectPlugin::initialize(const QStringList &, QString *errorMessage)
|
|||||||
QmlJS::ModelManagerInterface *modelManager
|
QmlJS::ModelManagerInterface *modelManager
|
||||||
= QmlJS::ModelManagerInterface::instance();
|
= QmlJS::ModelManagerInterface::instance();
|
||||||
|
|
||||||
if (!editor)
|
if (!editor || !modelManager)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (d->lastMessageBox)
|
if (d->lastMessageBox)
|
||||||
|
@@ -41,10 +41,12 @@ using namespace Utils;
|
|||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
static const char TEST_IP[] = "127.0.0.1";
|
|
||||||
static const char TEST_DIR[] = "/tmp/testdir";
|
static const char TEST_DIR[] = "/tmp/testdir";
|
||||||
static const FilePath baseFilePath = FilePath::fromString("ssh://" + QString(TEST_IP)
|
|
||||||
+ QString(TEST_DIR));
|
static const FilePath baseFilePath()
|
||||||
|
{
|
||||||
|
return FilePath::fromString("ssh://" + QSsh::SshTest::userAtHost() + QString(TEST_DIR));
|
||||||
|
}
|
||||||
|
|
||||||
TestLinuxDeviceFactory::TestLinuxDeviceFactory()
|
TestLinuxDeviceFactory::TestLinuxDeviceFactory()
|
||||||
: IDeviceFactory("test")
|
: IDeviceFactory("test")
|
||||||
@@ -54,11 +56,9 @@ TestLinuxDeviceFactory::TestLinuxDeviceFactory()
|
|||||||
setConstructionFunction(&LinuxDevice::create);
|
setConstructionFunction(&LinuxDevice::create);
|
||||||
setCreator([] {
|
setCreator([] {
|
||||||
LinuxDevice::Ptr newDev = LinuxDevice::create();
|
LinuxDevice::Ptr newDev = LinuxDevice::create();
|
||||||
qDebug() << "device : " << newDev->type();
|
|
||||||
newDev->setType("test");
|
newDev->setType("test");
|
||||||
QSsh::SshConnectionParameters sshParams = newDev->sshParameters();
|
qDebug() << "device : " << newDev->type();
|
||||||
sshParams.setHost(TEST_IP);
|
QSsh::SshConnectionParameters sshParams = QSsh::SshTest::getParameters();
|
||||||
sshParams.setPort(22);
|
|
||||||
newDev->setSshParameters(sshParams);
|
newDev->setSshParameters(sshParams);
|
||||||
return newDev;
|
return newDev;
|
||||||
});
|
});
|
||||||
@@ -66,15 +66,28 @@ TestLinuxDeviceFactory::TestLinuxDeviceFactory()
|
|||||||
|
|
||||||
FilePath createFile(const QString &name)
|
FilePath createFile(const QString &name)
|
||||||
{
|
{
|
||||||
FilePath testFilePath = baseFilePath / name;
|
FilePath testFilePath = baseFilePath() / name;
|
||||||
FilePath dummyFilePath = FilePath::fromString("ssh://" + QString(TEST_IP) + "/dev/null");
|
FilePath dummyFilePath = FilePath::fromString("ssh://" + QSsh::SshTest::userAtHost() + "/dev/null");
|
||||||
dummyFilePath.copyFile(testFilePath);
|
dummyFilePath.copyFile(testFilePath);
|
||||||
return testFilePath;
|
return testFilePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileSystemAccessTest::initTestCase()
|
void FileSystemAccessTest::initTestCase()
|
||||||
{
|
{
|
||||||
FilePath filePath = baseFilePath;
|
const QSsh::SshConnectionParameters params = QSsh::SshTest::getParameters();
|
||||||
|
qDebug() << "Using following SSH parameter:"
|
||||||
|
<< "\nHost:" << params.host()
|
||||||
|
<< "\nPort:" << params.port()
|
||||||
|
<< "\nUser:" << params.userName()
|
||||||
|
<< "\nSSHKey:" << params.privateKeyFile;
|
||||||
|
if (!QSsh::SshTest::checkParameters(params)) {
|
||||||
|
m_skippedAtWhole = true;
|
||||||
|
QSsh::SshTest::printSetupHelp();
|
||||||
|
QSKIP("Ensure you have added your default ssh public key to your own authorized keys and "
|
||||||
|
"environment QTC_REMOTELINUX_SSH_DEFAULTS set or follow setup help above.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
FilePath filePath = baseFilePath();
|
||||||
|
|
||||||
if (DeviceManager::deviceForPath(filePath) == nullptr) {
|
if (DeviceManager::deviceForPath(filePath) == nullptr) {
|
||||||
DeviceManager *const devMgr = DeviceManager::instance();
|
DeviceManager *const devMgr = DeviceManager::instance();
|
||||||
@@ -87,13 +100,15 @@ void FileSystemAccessTest::initTestCase()
|
|||||||
|
|
||||||
void FileSystemAccessTest::cleanupTestCase()
|
void FileSystemAccessTest::cleanupTestCase()
|
||||||
{
|
{
|
||||||
QVERIFY(baseFilePath.exists());
|
if (m_skippedAtWhole) // no need to clean up either
|
||||||
QVERIFY(baseFilePath.removeRecursively());
|
return;
|
||||||
|
QVERIFY(baseFilePath().exists());
|
||||||
|
QVERIFY(baseFilePath().removeRecursively());
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileSystemAccessTest::testDirStatuses()
|
void FileSystemAccessTest::testDirStatuses()
|
||||||
{
|
{
|
||||||
FilePath filePath = baseFilePath;
|
FilePath filePath = baseFilePath();
|
||||||
QVERIFY(filePath.exists());
|
QVERIFY(filePath.exists());
|
||||||
QVERIFY(filePath.isDir());
|
QVERIFY(filePath.isDir());
|
||||||
QVERIFY(filePath.isWritableDir());
|
QVERIFY(filePath.isWritableDir());
|
||||||
@@ -120,7 +135,7 @@ void FileSystemAccessTest::testDirStatuses()
|
|||||||
|
|
||||||
void FileSystemAccessTest::testBytesAvailable()
|
void FileSystemAccessTest::testBytesAvailable()
|
||||||
{
|
{
|
||||||
FilePath testFilePath = FilePath::fromString("ssh://" + QString(TEST_IP) + "/tmp");
|
FilePath testFilePath = FilePath::fromString("ssh://" + QSsh::SshTest::userAtHost() + "/tmp");
|
||||||
QVERIFY(testFilePath.exists());
|
QVERIFY(testFilePath.exists());
|
||||||
QVERIFY(testFilePath.bytesAvailable() > 0);
|
QVERIFY(testFilePath.bytesAvailable() > 0);
|
||||||
}
|
}
|
||||||
@@ -143,9 +158,9 @@ void FileSystemAccessTest::testFileActions()
|
|||||||
// ToDo: remove ".contains", make fileContents exact equal content
|
// ToDo: remove ".contains", make fileContents exact equal content
|
||||||
QVERIFY(testFilePath.fileContents().contains(content));
|
QVERIFY(testFilePath.fileContents().contains(content));
|
||||||
|
|
||||||
QVERIFY(testFilePath.renameFile(baseFilePath / "test1"));
|
QVERIFY(testFilePath.renameFile(baseFilePath() / "test1"));
|
||||||
// It is Ok that FilePath doesn't change itself after rename.
|
// It is Ok that FilePath doesn't change itself after rename.
|
||||||
FilePath newTestFilePath = baseFilePath / "test1";
|
FilePath newTestFilePath = baseFilePath() / "test1";
|
||||||
QVERIFY(newTestFilePath.exists());
|
QVERIFY(newTestFilePath.exists());
|
||||||
QVERIFY(!testFilePath.removeFile());
|
QVERIFY(!testFilePath.removeFile());
|
||||||
QVERIFY(newTestFilePath.exists());
|
QVERIFY(newTestFilePath.exists());
|
||||||
|
@@ -53,6 +53,7 @@ private slots:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
TestLinuxDeviceFactory m_testLinuxDeviceFactory;
|
TestLinuxDeviceFactory m_testLinuxDeviceFactory;
|
||||||
|
bool m_skippedAtWhole = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // Internal
|
} // Internal
|
||||||
|
@@ -61,4 +61,9 @@ void SnippetEditorWidget::focusOutEvent(QFocusEvent *event)
|
|||||||
TextEditorWidget::focusOutEvent(event);
|
TextEditorWidget::focusOutEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SnippetEditorWidget::contextMenuEvent(QContextMenuEvent *e)
|
||||||
|
{
|
||||||
|
QPlainTextEdit::contextMenuEvent(e);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
@@ -42,6 +42,7 @@ signals:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
void focusOutEvent(QFocusEvent *event) override;
|
void focusOutEvent(QFocusEvent *event) override;
|
||||||
|
void contextMenuEvent(QContextMenuEvent *e) override;
|
||||||
|
|
||||||
int extraAreaWidth(int * /* markWidthPtr */ = nullptr) const override { return 0; }
|
int extraAreaWidth(int * /* markWidthPtr */ = nullptr) const override { return 0; }
|
||||||
};
|
};
|
||||||
|
@@ -3,6 +3,7 @@ file(RELATIVE_PATH TEST_RELATIVE_LIBEXEC_PATH "/${RELATIVE_TEST_PATH}" "/${IDE_L
|
|||||||
|
|
||||||
add_qtc_test(tst_ssh
|
add_qtc_test(tst_ssh
|
||||||
DEFINES "TEST_RELATIVE_LIBEXEC_PATH=\"${TEST_RELATIVE_LIBEXEC_PATH}\""
|
DEFINES "TEST_RELATIVE_LIBEXEC_PATH=\"${TEST_RELATIVE_LIBEXEC_PATH}\""
|
||||||
|
WITH_TESTS
|
||||||
DEPENDS Utils QtcSsh
|
DEPENDS Utils QtcSsh
|
||||||
SOURCES tst_ssh.cpp
|
SOURCES tst_ssh.cpp
|
||||||
)
|
)
|
||||||
|
@@ -11,6 +11,7 @@ QtcAutotest {
|
|||||||
qtc.ide_libexec_path);
|
qtc.ide_libexec_path);
|
||||||
var relLibExecPath = FileInfo.relativePath(destinationDirectory, absLibExecPath);
|
var relLibExecPath = FileInfo.relativePath(destinationDirectory, absLibExecPath);
|
||||||
defines.push('TEST_RELATIVE_LIBEXEC_PATH="' + relLibExecPath + '"');
|
defines.push('TEST_RELATIVE_LIBEXEC_PATH="' + relLibExecPath + '"');
|
||||||
|
defines.push("WITH_TESTS");
|
||||||
return defines;
|
return defines;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -47,73 +47,8 @@
|
|||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
/*
|
|
||||||
In order to run this test properly it requires some setup (example for fedora):
|
|
||||||
1. Run a server:
|
|
||||||
systemctl start sshd
|
|
||||||
2. Create your own ssh key (needed only once). For fedora it needs ecdsa type:
|
|
||||||
ssh-keygen -t ecdsa
|
|
||||||
3. Make your public key known to the server (needed only once):
|
|
||||||
ssh-copy-id -i [full path to your public key]
|
|
||||||
4. Set the env variables before executing test:
|
|
||||||
QTC_SSH_TEST_HOST=127.0.0.1
|
|
||||||
QTC_SSH_TEST_KEYFILE=[full path to your private key]
|
|
||||||
QTC_SSH_TEST_USER=[your user name]
|
|
||||||
*/
|
|
||||||
using namespace QSsh;
|
using namespace QSsh;
|
||||||
|
|
||||||
static QString getHostFromEnvironment()
|
|
||||||
{
|
|
||||||
return QString::fromLocal8Bit(qgetenv("QTC_SSH_TEST_HOST"));
|
|
||||||
}
|
|
||||||
|
|
||||||
static const char *portVar() { return "QTC_SSH_TEST_PORT"; }
|
|
||||||
static const char *userVar() { return "QTC_SSH_TEST_USER"; }
|
|
||||||
static const char *keyFileVar() { return "QTC_SSH_TEST_KEYFILE"; }
|
|
||||||
|
|
||||||
static quint16 getPortFromEnvironment()
|
|
||||||
{
|
|
||||||
const int port = qEnvironmentVariableIntValue(portVar());
|
|
||||||
return port != 0 ? quint16(port) : 22;
|
|
||||||
}
|
|
||||||
|
|
||||||
static QString getUserFromEnvironment()
|
|
||||||
{
|
|
||||||
return QString::fromLocal8Bit(qgetenv(userVar()));
|
|
||||||
}
|
|
||||||
|
|
||||||
static QString getKeyFileFromEnvironment()
|
|
||||||
{
|
|
||||||
return QString::fromLocal8Bit(qgetenv(keyFileVar()));
|
|
||||||
}
|
|
||||||
|
|
||||||
static SshConnectionParameters getParameters()
|
|
||||||
{
|
|
||||||
SshConnectionParameters params;
|
|
||||||
params.setHost(getHostFromEnvironment());
|
|
||||||
params.setPort(getPortFromEnvironment());
|
|
||||||
params.setUserName(getUserFromEnvironment());
|
|
||||||
params.timeout = 10;
|
|
||||||
params.privateKeyFile = Utils::FilePath::fromUserInput(getKeyFileFromEnvironment());
|
|
||||||
params.authenticationType = !params.privateKeyFile.isEmpty()
|
|
||||||
? SshConnectionParameters::AuthenticationTypeSpecificKey
|
|
||||||
: SshConnectionParameters::AuthenticationTypeAll;
|
|
||||||
return params;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define CHECK_PARAMS(params) \
|
|
||||||
do { \
|
|
||||||
if (params.host().isEmpty()) { \
|
|
||||||
QSKIP("No hostname provided. Set QTC_SSH_TEST_HOST."); \
|
|
||||||
} \
|
|
||||||
if (params.userName().isEmpty()) \
|
|
||||||
QSKIP(qPrintable(QString::fromLatin1("No user name provided. Set %1.") \
|
|
||||||
.arg(QString::fromUtf8(userVar())))); \
|
|
||||||
if (params.privateKeyFile.isEmpty()) \
|
|
||||||
QSKIP(qPrintable(QString::fromLatin1("No key file provided. Set %1.") \
|
|
||||||
.arg(QString::fromUtf8(keyFileVar())))); \
|
|
||||||
} while (false)
|
|
||||||
|
|
||||||
class tst_Ssh : public QObject
|
class tst_Ssh : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@@ -137,6 +72,10 @@ private:
|
|||||||
|
|
||||||
void tst_Ssh::initTestCase()
|
void tst_Ssh::initTestCase()
|
||||||
{
|
{
|
||||||
|
const SshConnectionParameters params = SshTest::getParameters();
|
||||||
|
if (!SshTest::checkParameters(params))
|
||||||
|
SshTest::printSetupHelp();
|
||||||
|
|
||||||
Utils::LauncherInterface::setPathToLauncher(qApp->applicationDirPath() + '/'
|
Utils::LauncherInterface::setPathToLauncher(qApp->applicationDirPath() + '/'
|
||||||
+ QLatin1String(TEST_RELATIVE_LIBEXEC_PATH));
|
+ QLatin1String(TEST_RELATIVE_LIBEXEC_PATH));
|
||||||
Utils::TemporaryDirectory::setMasterTemporaryDirectory(QDir::tempPath()
|
Utils::TemporaryDirectory::setMasterTemporaryDirectory(QDir::tempPath()
|
||||||
@@ -154,10 +93,10 @@ void tst_Ssh::errorHandling_data()
|
|||||||
QTest::newRow("no host")
|
QTest::newRow("no host")
|
||||||
<< QString("hgdfxgfhgxfhxgfchxgcf") << quint16(12345)
|
<< QString("hgdfxgfhgxfhxgfchxgcf") << quint16(12345)
|
||||||
<< SshConnectionParameters::AuthenticationTypeAll << QString("egal") << QString();
|
<< SshConnectionParameters::AuthenticationTypeAll << QString("egal") << QString();
|
||||||
const QString theHost = getHostFromEnvironment();
|
const QString theHost = SshTest::getHostFromEnvironment();
|
||||||
if (theHost.isEmpty())
|
if (theHost.isEmpty())
|
||||||
return;
|
return;
|
||||||
const quint16 thePort = getPortFromEnvironment();
|
const quint16 thePort = SshTest::getPortFromEnvironment();
|
||||||
QTest::newRow("non-existing key file")
|
QTest::newRow("non-existing key file")
|
||||||
<< theHost << thePort << SshConnectionParameters::AuthenticationTypeSpecificKey
|
<< theHost << thePort << SshConnectionParameters::AuthenticationTypeSpecificKey
|
||||||
<< QString("root") << QString("somefilenamethatwedontexpecttocontainavalidkey");
|
<< QString("root") << QString("somefilenamethatwedontexpecttocontainavalidkey");
|
||||||
@@ -228,8 +167,9 @@ void tst_Ssh::remoteProcess_data()
|
|||||||
|
|
||||||
void tst_Ssh::remoteProcess()
|
void tst_Ssh::remoteProcess()
|
||||||
{
|
{
|
||||||
const SshConnectionParameters params = getParameters();
|
const SshConnectionParameters params = SshTest::getParameters();
|
||||||
CHECK_PARAMS(params);
|
if (!SshTest::checkParameters(params))
|
||||||
|
QSKIP("Insufficient setup - set QTC_SSH_TEST_* variables.");
|
||||||
|
|
||||||
QFETCH(QByteArray, commandLine);
|
QFETCH(QByteArray, commandLine);
|
||||||
QFETCH(bool, isBlocking);
|
QFETCH(bool, isBlocking);
|
||||||
@@ -287,8 +227,9 @@ void tst_Ssh::remoteProcess()
|
|||||||
|
|
||||||
void tst_Ssh::remoteProcessChannels()
|
void tst_Ssh::remoteProcessChannels()
|
||||||
{
|
{
|
||||||
const SshConnectionParameters params = getParameters();
|
const SshConnectionParameters params = SshTest::getParameters();
|
||||||
CHECK_PARAMS(params);
|
if (!SshTest::checkParameters(params))
|
||||||
|
QSKIP("Insufficient setup - set QTC_SSH_TEST_* variables.");
|
||||||
SshConnection connection(params);
|
SshConnection connection(params);
|
||||||
QVERIFY(waitForConnection(connection));
|
QVERIFY(waitForConnection(connection));
|
||||||
|
|
||||||
@@ -325,8 +266,9 @@ void tst_Ssh::remoteProcessChannels()
|
|||||||
|
|
||||||
void tst_Ssh::remoteProcessInput()
|
void tst_Ssh::remoteProcessInput()
|
||||||
{
|
{
|
||||||
const SshConnectionParameters params = getParameters();
|
const SshConnectionParameters params = SshTest::getParameters();
|
||||||
CHECK_PARAMS(params);
|
if (!SshTest::checkParameters(params))
|
||||||
|
QSKIP("Insufficient setup - set QTC_SSH_TEST_* variables.");
|
||||||
SshConnection connection(params);
|
SshConnection connection(params);
|
||||||
QVERIFY(waitForConnection(connection));
|
QVERIFY(waitForConnection(connection));
|
||||||
|
|
||||||
@@ -369,8 +311,9 @@ void tst_Ssh::remoteProcessInput()
|
|||||||
void tst_Ssh::sftp()
|
void tst_Ssh::sftp()
|
||||||
{
|
{
|
||||||
// Connect to server
|
// Connect to server
|
||||||
const SshConnectionParameters params = getParameters();
|
const SshConnectionParameters params = SshTest::getParameters();
|
||||||
CHECK_PARAMS(params);
|
if (!SshTest::checkParameters(params))
|
||||||
|
QSKIP("Insufficient setup - set QTC_SSH_TEST_* variables.");
|
||||||
SshConnection connection(params);
|
SshConnection connection(params);
|
||||||
QVERIFY(waitForConnection(connection));
|
QVERIFY(waitForConnection(connection));
|
||||||
|
|
||||||
|
@@ -28,9 +28,15 @@
|
|||||||
uid=$(id -u)
|
uid=$(id -u)
|
||||||
gid=$(id -g)
|
gid=$(id -g)
|
||||||
|
|
||||||
|
repo=b2qt-qemuarm64
|
||||||
|
tag=6.0.0
|
||||||
|
tcdir=/opt/toolchain
|
||||||
|
envfile=environment-setup-skylake-64-poky-linux
|
||||||
|
qtcconf=configure-qtcreator.sh
|
||||||
|
|
||||||
if [ ! -e toolchain.sh ]; then
|
if [ ! -e toolchain.sh ]; then
|
||||||
host=http://ci-files02-hki.intra.qt.io
|
host=http://ci-files02-hki.intra.qt.io
|
||||||
dir=/packages/jenkins/enterprise/b2qt/yocto/6.2/
|
dir=/packages/jenkins/enterprise/b2qt/yocto/dev/intel-skylake-64
|
||||||
file=b2qt-x86_64-meta-toolchain-b2qt-embedded-qt6-sdk-intel-skylake-64.sh
|
file=b2qt-x86_64-meta-toolchain-b2qt-embedded-qt6-sdk-intel-skylake-64.sh
|
||||||
curl $host/$dir/$file -o $file || exit 1
|
curl $host/$dir/$file -o $file || exit 1
|
||||||
ln -s $file toolchain.sh
|
ln -s $file toolchain.sh
|
||||||
@@ -38,4 +44,118 @@ fi
|
|||||||
|
|
||||||
sed -e "s/<UID>/${uid}/" -e "s/<GID>/${gid}/" Dockerfile.in > Dockerfile
|
sed -e "s/<UID>/${uid}/" -e "s/<GID>/${gid}/" Dockerfile.in > Dockerfile
|
||||||
|
|
||||||
docker build -f Dockerfile . -t b2qt-qemuarm64:6.0.0
|
docker build -f Dockerfile . -t $repo:$tag
|
||||||
|
|
||||||
|
|
||||||
|
ABI="x86-linux-poky-elf-64bit"
|
||||||
|
|
||||||
|
OECORE_NATIVE_SYSROOT=/opt/toolchain/sysroots/x86_64-pokysdk-linux
|
||||||
|
PREFIX="docker://$repo:$tag/opt/toolchain/sysroots/x86_64-pokysdk-linux"
|
||||||
|
|
||||||
|
CC="${PREFIX}/usr/bin/x86_64-poky-linux/x86_64-poky-linux-gcc"
|
||||||
|
CXX="${PREFIX}/usr/bin/x86_64-poky-linux/x86_64-poky-linux-g++"
|
||||||
|
GDB="${PREFIX}/usr/bin/x86_64-poky-linux/x86_64-poky-linux-gdb"
|
||||||
|
QMAKE="${PREFIX}/usr/bin/qmake"
|
||||||
|
CMAKE="${PREFIX}/usr/bin/cmake"
|
||||||
|
|
||||||
|
SDKTOOL="../../../../libexec/qtcreator/sdktool"
|
||||||
|
|
||||||
|
MACHINE="intel-skylake-64"
|
||||||
|
|
||||||
|
if [ ! -x ${SDKTOOL} ]; then
|
||||||
|
echo "Cannot find 'sdktool' from QtCreator"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#MKSPEC=$(qmake -query QMAKE_XSPEC)
|
||||||
|
MKSPEC=linux-oe-g++
|
||||||
|
|
||||||
|
#RELEASE=$(qmake -query QT_VERSION)
|
||||||
|
RELEASE=$tag
|
||||||
|
|
||||||
|
NAME=${NAME:-"Custom Qt ${RELEASE} ${MACHINE}"}
|
||||||
|
BASEID="byos.${RELEASE}.${MACHINE}"
|
||||||
|
|
||||||
|
${SDKTOOL} rmKit --id ${BASEID}.kit 2>/dev/null || true
|
||||||
|
${SDKTOOL} rmQt --id ${BASEID}.qt || true
|
||||||
|
${SDKTOOL} rmTC --id ProjectExplorer.ToolChain.Gcc:${BASEID}.gcc || true
|
||||||
|
${SDKTOOL} rmTC --id ProjectExplorer.ToolChain.Gcc:${BASEID}.g++ || true
|
||||||
|
${SDKTOOL} rmDebugger --id ${BASEID}.gdb 2>/dev/null || true
|
||||||
|
${SDKTOOL} rmCMake --id ${BASEID}.cmake 2>/dev/null || true
|
||||||
|
${SDKTOOL} rmDev --id "$repo:$tag" 2>/dev/null || true
|
||||||
|
|
||||||
|
if [ -n "${REMOVEONLY}" ]; then
|
||||||
|
echo "Kit removed: ${NAME}"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
${SDKTOOL} addAbiFlavor \
|
||||||
|
--flavor poky \
|
||||||
|
--oses linux 2>/dev/null || true
|
||||||
|
|
||||||
|
${SDKTOOL} addDev \
|
||||||
|
--id "$repo:$tag" \
|
||||||
|
--type 1 \
|
||||||
|
--name "Docker $repo:$tag" \
|
||||||
|
--dockerRepo $repo \
|
||||||
|
--dockerTag $tag \
|
||||||
|
--dockerMappedPaths '/data' \
|
||||||
|
--osType DockerDeviceType
|
||||||
|
|
||||||
|
${SDKTOOL} addTC \
|
||||||
|
--id "ProjectExplorer.ToolChain.Gcc:${BASEID}.gcc" \
|
||||||
|
--name "GCC ${NAME}" \
|
||||||
|
--path "${CC}" \
|
||||||
|
--abi "${ABI}" \
|
||||||
|
--language C
|
||||||
|
|
||||||
|
${SDKTOOL} addTC \
|
||||||
|
--id "ProjectExplorer.ToolChain.Gcc:${BASEID}.g++" \
|
||||||
|
--name "G++ ${NAME}" \
|
||||||
|
--path "${CXX}" \
|
||||||
|
--abi "${ABI}" \
|
||||||
|
--language Cxx
|
||||||
|
|
||||||
|
${SDKTOOL} addDebugger \
|
||||||
|
--id "${BASEID}.gdb" \
|
||||||
|
--name "GDB ${NAME}" \
|
||||||
|
--engine 1 \
|
||||||
|
--binary "${GDB}" \
|
||||||
|
--abis "${ABI}"
|
||||||
|
|
||||||
|
${SDKTOOL} addQt \
|
||||||
|
--id "${BASEID}.qt" \
|
||||||
|
--name "${NAME}" \
|
||||||
|
--type "Qdb.EmbeddedLinuxQt" \
|
||||||
|
--qmake ${QMAKE} \
|
||||||
|
--abis "${ABI}"
|
||||||
|
|
||||||
|
${SDKTOOL} addCMake \
|
||||||
|
--id "${BASEID}.cmake" \
|
||||||
|
--name "CMake ${NAME}" \
|
||||||
|
--path ${CMAKE}
|
||||||
|
|
||||||
|
${SDKTOOL} addKit \
|
||||||
|
--id "${BASEID}.kit" \
|
||||||
|
--name "${NAME}" \
|
||||||
|
--qt "${BASEID}.qt" \
|
||||||
|
--debuggerid "${BASEID}.gdb" \
|
||||||
|
--sysroot "docker://$repo:$tag/opt/toolchain/sysroots/skylake-64-poky-linux" \
|
||||||
|
--devicetype "DockerDeviceType" \
|
||||||
|
--device "$repo:$tag" \
|
||||||
|
--builddevice "$repo:$tag" \
|
||||||
|
--Ctoolchain "ProjectExplorer.ToolChain.Gcc:${BASEID}.gcc" \
|
||||||
|
--Cxxtoolchain "ProjectExplorer.ToolChain.Gcc:${BASEID}.g++" \
|
||||||
|
--icon ":/boot2qt/images/B2Qt_QtC_icon.png" \
|
||||||
|
--mkspec "" \
|
||||||
|
--cmake "${BASEID}.cmake" \
|
||||||
|
--cmake-config "CMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx}" \
|
||||||
|
--cmake-config "CMAKE_C_COMPILER:STRING=%{Compiler:Executable:C}" \
|
||||||
|
--cmake-config "CMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX}" \
|
||||||
|
--cmake-config "QT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable}" \
|
||||||
|
--cmake-config "CMAKE_TOOLCHAIN_FILE:FILEPATH=${OECORE_NATIVE_SYSROOT}/usr/lib/cmake/Qt6/qt.toolchain.cmake" \
|
||||||
|
--cmake-config "CMAKE_MAKE_PROGRAM:FILEPATH=ninja" \
|
||||||
|
--cmake-generator "Ninja"
|
||||||
|
|
||||||
|
echo "Configured Qt Creator with new kit: ${NAME}"
|
||||||
|
@@ -22,7 +22,6 @@
|
|||||||
:Add Bookmark_BookmarkDialog {name='BookmarkDialog' type='BookmarkDialog' visible='1' windowTitle='Add Bookmark'}
|
:Add Bookmark_BookmarkDialog {name='BookmarkDialog' type='BookmarkDialog' visible='1' windowTitle='Add Bookmark'}
|
||||||
:Add to Version Control.No_QPushButton {text='No' type='QPushButton' unnamed='1' visible='1' window=':Add to Version Control_QMessageBox'}
|
:Add to Version Control.No_QPushButton {text='No' type='QPushButton' unnamed='1' visible='1' window=':Add to Version Control_QMessageBox'}
|
||||||
:Add to Version Control_QMessageBox {text~='Add the file.*to version control (.*)?' type='QMessageBox' unnamed='1' visible='1'}
|
:Add to Version Control_QMessageBox {text~='Add the file.*to version control (.*)?' type='QMessageBox' unnamed='1' visible='1'}
|
||||||
:Additional arguments:_QWidget {buddy=':Qt Creator.Additional arguments:_QLabel' type='QWidget' unnamed='1' visible='1'}
|
|
||||||
:Analyzer Toolbar.AnalyzerManagerToolBox_QComboBox {container=':DebugModeWidget.Toolbar_QDockWidget' name='PerspectiveChooser' type='QComboBox' visible='1'}
|
:Analyzer Toolbar.AnalyzerManagerToolBox_QComboBox {container=':DebugModeWidget.Toolbar_QDockWidget' name='PerspectiveChooser' type='QComboBox' visible='1'}
|
||||||
:Analyzer Toolbar.Clear_QToolButton {container=':DebugModeWidget.Toolbar_QDockWidget' toolTip='Discard data' type='QToolButton' unnamed='1' visible='1'}
|
:Analyzer Toolbar.Clear_QToolButton {container=':DebugModeWidget.Toolbar_QDockWidget' toolTip='Discard data' type='QToolButton' unnamed='1' visible='1'}
|
||||||
:Analyzer Toolbar.Elapsed:_QLabel {container=':DebugModeWidget.Toolbar_QDockWidget' text~='Elapsed: \\\\d+.\\\\d s' type='QLabel' unnamed='1' visible='1'}
|
:Analyzer Toolbar.Elapsed:_QLabel {container=':DebugModeWidget.Toolbar_QDockWidget' text~='Elapsed: \\\\d+.\\\\d s' type='QLabel' unnamed='1' visible='1'}
|
||||||
@@ -118,15 +117,12 @@
|
|||||||
:QML Debugging.No_QPushButton {text='No' type='QPushButton' unnamed='1' visible='1' window=':QML Debugging_QMessageBox'}
|
:QML Debugging.No_QPushButton {text='No' type='QPushButton' unnamed='1' visible='1' window=':QML Debugging_QMessageBox'}
|
||||||
:QML Debugging_QMessageBox {text='The option will only take effect if the project is recompiled. Do you want to recompile now?' type='QMessageBox' unnamed='1' visible='1'}
|
:QML Debugging_QMessageBox {text='The option will only take effect if the project is recompiled. Do you want to recompile now?' type='QMessageBox' unnamed='1' visible='1'}
|
||||||
:Qt Creator.Add Bookmark_QToolButton {text='Add Bookmark' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
:Qt Creator.Add Bookmark_QToolButton {text='Add Bookmark' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||||
:Qt Creator.Additional arguments:_QLabel {text='Additional arguments:' type='QLabel' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
|
||||||
:Qt Creator.CloseDoc_QToolButton {toolTip?='Close Document *' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
:Qt Creator.CloseDoc_QToolButton {toolTip?='Close Document *' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||||
:Qt Creator.CloseFind_QToolButton {name='close' type='QToolButton' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
:Qt Creator.CloseFind_QToolButton {name='close' type='QToolButton' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||||
:Qt Creator.Compile Output_Core::OutputWindow {type='Core::OutputWindow' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Compile Output'}
|
:Qt Creator.Compile Output_Core::OutputWindow {type='Core::OutputWindow' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Compile Output'}
|
||||||
:Qt Creator.Configure Project_QPushButton {text='Configure Project' type='QPushButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
:Qt Creator.Configure Project_QPushButton {text='Configure Project' type='QPushButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||||
:Qt Creator.DebugModeWidget_QSplitter {name='DebugModeWidget' type='QSplitter' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
:Qt Creator.DebugModeWidget_QSplitter {name='DebugModeWidget' type='QSplitter' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||||
:Qt Creator.DragDoc_QToolButton {toolTip='Drag to drag documents between splits' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
:Qt Creator.DragDoc_QToolButton {toolTip='Drag to drag documents between splits' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||||
:Qt Creator.Effective qmake call:_QLabel {text='Effective qmake call:' type='QLabel' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
|
||||||
:Qt Creator.Effective qmake call:_QTextEdit {aboveWidget=':Additional arguments:_QWidget' leftWidget=':Qt Creator.Effective qmake call:_QLabel' type='QTextEdit' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
|
||||||
:Qt Creator.Events_QDockWidget {name='QmlProfiler.Statistics.DockDockWidget' type='QDockWidget' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
:Qt Creator.Events_QDockWidget {name='QmlProfiler.Statistics.DockDockWidget' type='QDockWidget' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||||
:Qt Creator.Events_QTabBar {aboveWidget=':Qt Creator.Events_QDockWidget' type='QTabBar' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
:Qt Creator.Events_QTabBar {aboveWidget=':Qt Creator.Events_QDockWidget' type='QTabBar' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||||
:Qt Creator.Issues_QListView {type='QListView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Issues'}
|
:Qt Creator.Issues_QListView {type='QListView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Issues'}
|
||||||
|
@@ -163,13 +163,17 @@ def selectBuildConfig(wantedKit, configName, afterSwitchTo=ViewConstants.EDIT):
|
|||||||
test.warning("Don't know where you trying to switch to (%s)" % afterSwitchTo)
|
test.warning("Don't know where you trying to switch to (%s)" % afterSwitchTo)
|
||||||
|
|
||||||
# This will not trigger a rebuild. If needed, caller has to do this.
|
# This will not trigger a rebuild. If needed, caller has to do this.
|
||||||
def verifyBuildConfig(currentTarget, configName, shouldBeDebug=False, enableShadowBuild=False, enableQmlDebug=False):
|
def verifyBuildConfig(currentTarget, configName, shouldBeDebug=False, enableShadowBuild=False,
|
||||||
|
enableQmlDebug=False, buildSystem=None):
|
||||||
selectBuildConfig(currentTarget, configName, None)
|
selectBuildConfig(currentTarget, configName, None)
|
||||||
ensureChecked(waitForObject(":scrollArea.Details_Utils::DetailsButton"))
|
ensureChecked(waitForObject(":scrollArea.Details_Utils::DetailsButton"))
|
||||||
ensureChecked("{leftWidget={text='Shadow build:' type='QLabel' unnamed='1' visible='1' "
|
|
||||||
"window=':Qt Creator_Core::Internal::MainWindow'} "
|
if buildSystem == "qmake":
|
||||||
"type='QCheckBox' unnamed='1' visible='1' "
|
ensureChecked("{leftWidget={text='Shadow build:' type='QLabel' unnamed='1' visible='1' "
|
||||||
"window=':Qt Creator_Core::Internal::MainWindow'}", enableShadowBuild)
|
"window=':Qt Creator_Core::Internal::MainWindow'} "
|
||||||
|
"type='QCheckBox' unnamed='1' visible='1' "
|
||||||
|
"window=':Qt Creator_Core::Internal::MainWindow'}", enableShadowBuild)
|
||||||
|
|
||||||
buildCfCombo = waitForObject("{leftWidget=':scrollArea.Edit build configuration:_QLabel' "
|
buildCfCombo = waitForObject("{leftWidget=':scrollArea.Edit build configuration:_QLabel' "
|
||||||
"type='QComboBox' unnamed='1' visible='1'}")
|
"type='QComboBox' unnamed='1' visible='1'}")
|
||||||
if shouldBeDebug:
|
if shouldBeDebug:
|
||||||
@@ -184,11 +188,15 @@ def verifyBuildConfig(currentTarget, configName, shouldBeDebug=False, enableShad
|
|||||||
pass
|
pass
|
||||||
# Since waitForObject waits for the object to be enabled,
|
# Since waitForObject waits for the object to be enabled,
|
||||||
# it will wait here until compilation of the debug libraries has finished.
|
# it will wait here until compilation of the debug libraries has finished.
|
||||||
|
runCMakeButton = ("{type='QPushButton' text='Run CMake' unnamed='1' "
|
||||||
|
"window=':Qt Creator_Core::Internal::MainWindow'}")
|
||||||
if currentTarget not in (Targets.DESKTOP_4_8_7_DEFAULT, Targets.EMBEDDED_LINUX):
|
if currentTarget not in (Targets.DESKTOP_4_8_7_DEFAULT, Targets.EMBEDDED_LINUX):
|
||||||
qmlDebuggingCombo = findObject(':Qt Creator.QML debugging and profiling:_QComboBox')
|
qmlDebuggingCombo = findObject(':Qt Creator.QML debugging and profiling:_QComboBox')
|
||||||
if selectFromCombo(qmlDebuggingCombo, 'Enable'):
|
if selectFromCombo(qmlDebuggingCombo, 'Enable'):
|
||||||
# Don't rebuild now
|
if buildSystem is None or buildSystem == "CMake": # re-run cmake to apply
|
||||||
clickButton(waitForObject(":QML Debugging.No_QPushButton", 5000))
|
clickButton(waitForObject(runCMakeButton))
|
||||||
|
elif buildSystem == "qmake": # Don't rebuild now
|
||||||
|
clickButton(waitForObject(":QML Debugging.No_QPushButton", 5000))
|
||||||
try:
|
try:
|
||||||
problemFound = waitForObject("{window=':Qt Creator_Core::Internal::MainWindow' "
|
problemFound = waitForObject("{window=':Qt Creator_Core::Internal::MainWindow' "
|
||||||
"type='QLabel' name='problemLabel' visible='1'}", 1000)
|
"type='QLabel' name='problemLabel' visible='1'}", 1000)
|
||||||
@@ -201,8 +209,10 @@ def verifyBuildConfig(currentTarget, configName, shouldBeDebug=False, enableShad
|
|||||||
qmlDebuggingCombo = findObject(':Qt Creator.QML debugging and profiling:_QComboBox')
|
qmlDebuggingCombo = findObject(':Qt Creator.QML debugging and profiling:_QComboBox')
|
||||||
if selectFromCombo(qmlDebuggingCombo, "Disable"):
|
if selectFromCombo(qmlDebuggingCombo, "Disable"):
|
||||||
test.log("Qml debugging libraries are available - unchecked qml debugging.")
|
test.log("Qml debugging libraries are available - unchecked qml debugging.")
|
||||||
# Don't rebuild now
|
if buildSystem is None or buildSystem == "CMake": # re-run cmake to apply
|
||||||
clickButton(waitForObject(":QML Debugging.No_QPushButton", 5000))
|
clickButton(waitForObject(runCMakeButton))
|
||||||
|
elif buildSystem == "qmake": # Don't rebuild now
|
||||||
|
clickButton(waitForObject(":QML Debugging.No_QPushButton", 5000))
|
||||||
clickButton(waitForObject(":scrollArea.Details_Utils::DetailsButton"))
|
clickButton(waitForObject(":scrollArea.Details_Utils::DetailsButton"))
|
||||||
switchViewTo(ViewConstants.EDIT)
|
switchViewTo(ViewConstants.EDIT)
|
||||||
|
|
||||||
|
@@ -84,7 +84,7 @@ def setBreakpointsForCurrentProject(filesAndLines):
|
|||||||
editor = getEditorForFileSuffix(curFile, True)
|
editor = getEditorForFileSuffix(curFile, True)
|
||||||
if not placeCursorToLine(editor, curLine, True):
|
if not placeCursorToLine(editor, curLine, True):
|
||||||
return None
|
return None
|
||||||
invokeMenuItem("Debug", "Toggle Breakpoint")
|
invokeMenuItem("Debug", "Enable or Disable Breakpoint")
|
||||||
filePath = str(waitForObjectExists(":Qt Creator_FilenameQComboBox").toolTip)
|
filePath = str(waitForObjectExists(":Qt Creator_FilenameQComboBox").toolTip)
|
||||||
breakPointList.append({filePath:lineNumberWithCursor(editor)})
|
breakPointList.append({filePath:lineNumberWithCursor(editor)})
|
||||||
test.log('Set breakpoint in %s' % curFile, curLine)
|
test.log('Set breakpoint in %s' % curFile, curLine)
|
||||||
@@ -175,8 +175,24 @@ def doSimpleDebugging(currentKit, currentConfigName, expectedBPOrder=[], enableQ
|
|||||||
def isMsvcConfig(currentKit):
|
def isMsvcConfig(currentKit):
|
||||||
switchViewTo(ViewConstants.PROJECTS)
|
switchViewTo(ViewConstants.PROJECTS)
|
||||||
switchToBuildOrRunSettingsFor(currentKit, ProjectSettings.BUILD)
|
switchToBuildOrRunSettingsFor(currentKit, ProjectSettings.BUILD)
|
||||||
clickButton(waitForObject(":scrollArea.Details_Utils::DetailsButton"))
|
|
||||||
isMsvc = " -spec win32-msvc" in str(waitForObject(":Qt Creator.Effective qmake call:_QTextEdit").plainText)
|
waitForObject(":Projects.ProjectNavigationTreeView")
|
||||||
|
bAndRIndex = getQModelIndexStr("text='Build & Run'", ":Projects.ProjectNavigationTreeView")
|
||||||
|
wantedKitName = Targets.getStringForTarget(currentKit)
|
||||||
|
wantedKitIndexString = getQModelIndexStr("text='%s'" % wantedKitName, bAndRIndex)
|
||||||
|
if not test.verify(__kitIsActivated__(findObject(wantedKitIndexString)),
|
||||||
|
"Verifying target '%s' is enabled." % wantedKitName):
|
||||||
|
raise Exception("Kit '%s' is not activated in the project." % wantedKitName)
|
||||||
|
index = waitForObject(wantedKitIndexString)
|
||||||
|
toolTip = str(index.data(Qt.ToolTipRole).toString())
|
||||||
|
compilerPattern = re.compile("<tr><td><b>Compiler:</b></td><td>(?P<compiler>.+)</td></tr>")
|
||||||
|
match = compilerPattern.search(toolTip)
|
||||||
|
if match is None:
|
||||||
|
test.warning("UI seems to have changed - failed to check for compiler.")
|
||||||
|
return False
|
||||||
|
|
||||||
|
compiler = str(match.group("compiler"))
|
||||||
|
isMsvc = compiler.startswith("MSVC") or compiler.startswith("Microsoft Visual C")
|
||||||
switchViewTo(ViewConstants.EDIT)
|
switchViewTo(ViewConstants.EDIT)
|
||||||
return isMsvc
|
return isMsvc
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
#
|
#
|
||||||
# Copyright (C) 2016 The Qt Company Ltd.
|
# Copyright (C) 2022 The Qt Company Ltd.
|
||||||
# Contact: https://www.qt.io/licensing/
|
# Contact: https://www.qt.io/licensing/
|
||||||
#
|
#
|
||||||
# This file is part of Qt Creator.
|
# This file is part of Qt Creator.
|
||||||
@@ -69,10 +69,8 @@ def openCmakeProject(projectPath, buildDir):
|
|||||||
invokeMenuItem("File", "Open File or Project...")
|
invokeMenuItem("File", "Open File or Project...")
|
||||||
selectFromFileDialog(projectPath)
|
selectFromFileDialog(projectPath)
|
||||||
__chooseTargets__([]) # uncheck all
|
__chooseTargets__([]) # uncheck all
|
||||||
targetToChoose = Targets.DESKTOP_4_8_7_DEFAULT # FIXME make the intended target a parameter
|
# FIXME make the intended target a parameter
|
||||||
if not qt4Available:
|
__chooseTargets__([Targets.DESKTOP_5_14_1_DEFAULT], additionalFunc=additionalFunction)
|
||||||
targetToChoose = Targets.DESKTOP_5_14_1_DEFAULT
|
|
||||||
__chooseTargets__([targetToChoose], additionalFunc=additionalFunction)
|
|
||||||
clickButton(waitForObject(":Qt Creator.Configure Project_QPushButton"))
|
clickButton(waitForObject(":Qt Creator.Configure Project_QPushButton"))
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@@ -224,22 +222,31 @@ def __modifyAvailableTargets__(available, requiredQt, asStrings=False):
|
|||||||
if Qt5Path.toVersionTuple(found.group(1)) < Qt5Path.toVersionTuple(requiredQt):
|
if Qt5Path.toVersionTuple(found.group(1)) < Qt5Path.toVersionTuple(requiredQt):
|
||||||
available.discard(currentItem)
|
available.discard(currentItem)
|
||||||
|
|
||||||
|
def __getProjectFileName__(projectName, buildSystem):
|
||||||
|
if buildSystem is None or buildSystem == "CMake":
|
||||||
|
return "CMakeLists.txt"
|
||||||
|
else:
|
||||||
|
return projectName + (".pro" if buildSystem == "qmake" else ".qbs")
|
||||||
|
|
||||||
# Creates a Qt GUI project
|
# Creates a Qt GUI project
|
||||||
# param path specifies where to create the project
|
# param path specifies where to create the project
|
||||||
# param projectName is the name for the new project
|
# param projectName is the name for the new project
|
||||||
# param checks turns tests in the function on if set to True
|
# param checks turns tests in the function on if set to True
|
||||||
def createProject_Qt_GUI(path, projectName, checks = True, addToVersionControl = "<None>"):
|
# param addToVersionControl selects the specified VCS from Creator's wizard
|
||||||
|
# param buildSystem selects the specified build system from Creator's wizard
|
||||||
|
def createProject_Qt_GUI(path, projectName, checks=True, addToVersionControl="<None>",
|
||||||
|
buildSystem=None):
|
||||||
template = "Qt Widgets Application"
|
template = "Qt Widgets Application"
|
||||||
available = __createProjectOrFileSelectType__(" Application (Qt)", template)
|
available = __createProjectOrFileSelectType__(" Application (Qt)", template)
|
||||||
__createProjectSetNameAndPath__(path, projectName, checks)
|
__createProjectSetNameAndPath__(path, projectName, checks)
|
||||||
buildSystem = __handleBuildSystem__(None)
|
buildSystem = __handleBuildSystem__(buildSystem)
|
||||||
|
|
||||||
if checks:
|
if checks:
|
||||||
exp_filename = "mainwindow"
|
exp_filename = "mainwindow"
|
||||||
h_file = exp_filename + ".h"
|
h_file = exp_filename + ".h"
|
||||||
cpp_file = exp_filename + ".cpp"
|
cpp_file = exp_filename + ".cpp"
|
||||||
ui_file = exp_filename + ".ui"
|
ui_file = exp_filename + ".ui"
|
||||||
pro_file = projectName + ".pro"
|
projectFile = __getProjectFileName__(projectName, buildSystem)
|
||||||
|
|
||||||
waitFor("object.exists(':headerFileLineEdit_Utils::FileNameValidatingLineEdit')", 20000)
|
waitFor("object.exists(':headerFileLineEdit_Utils::FileNameValidatingLineEdit')", 20000)
|
||||||
waitFor("object.exists(':sourceFileLineEdit_Utils::FileNameValidatingLineEdit')", 20000)
|
waitFor("object.exists(':sourceFileLineEdit_Utils::FileNameValidatingLineEdit')", 20000)
|
||||||
@@ -259,7 +266,7 @@ def createProject_Qt_GUI(path, projectName, checks = True, addToVersionControl =
|
|||||||
path = os.path.abspath(path)
|
path = os.path.abspath(path)
|
||||||
path = os.path.join(path, projectName)
|
path = os.path.join(path, projectName)
|
||||||
expectedFiles = [path]
|
expectedFiles = [path]
|
||||||
expectedFiles.extend(__sortFilenamesOSDependent__(["main.cpp", cpp_file, h_file, ui_file, pro_file]))
|
expectedFiles.extend(__sortFilenamesOSDependent__(["main.cpp", cpp_file, h_file, ui_file, projectFile]))
|
||||||
__createProjectHandleLastPage__(expectedFiles, addToVersionControl)
|
__createProjectHandleLastPage__(expectedFiles, addToVersionControl)
|
||||||
|
|
||||||
waitForProjectParsing()
|
waitForProjectParsing()
|
||||||
@@ -283,9 +290,9 @@ def createProject_Qt_Console(path, projectName, checks = True, buildSystem = Non
|
|||||||
path = os.path.abspath(path)
|
path = os.path.abspath(path)
|
||||||
path = os.path.join(path, projectName)
|
path = os.path.join(path, projectName)
|
||||||
cpp_file = "main.cpp"
|
cpp_file = "main.cpp"
|
||||||
pro_file = projectName + ".pro"
|
projectFile = __getProjectFileName__(projectName, buildSystem)
|
||||||
expectedFiles = [path]
|
expectedFiles = [path]
|
||||||
expectedFiles.extend(__sortFilenamesOSDependent__([cpp_file, pro_file]))
|
expectedFiles.extend(__sortFilenamesOSDependent__([cpp_file, projectFile]))
|
||||||
__createProjectHandleLastPage__(expectedFiles)
|
__createProjectHandleLastPage__(expectedFiles)
|
||||||
|
|
||||||
waitForProjectParsing()
|
waitForProjectParsing()
|
||||||
@@ -375,7 +382,8 @@ def createNewNonQtProject(workingDir, projectName, target, plainC=False, buildSy
|
|||||||
__createProjectHandleLastPage__()
|
__createProjectHandleLastPage__()
|
||||||
return projectName
|
return projectName
|
||||||
|
|
||||||
def createNewCPPLib(projectDir, projectName, className, target, isStatic):
|
|
||||||
|
def createNewCPPLib(projectDir, projectName, className, target, isStatic, buildSystem=None):
|
||||||
available = __createProjectOrFileSelectType__(" Library", "C++ Library", False, True)
|
available = __createProjectOrFileSelectType__(" Library", "C++ Library", False, True)
|
||||||
if isStatic:
|
if isStatic:
|
||||||
libType = LibType.STATIC
|
libType = LibType.STATIC
|
||||||
@@ -384,7 +392,7 @@ def createNewCPPLib(projectDir, projectName, className, target, isStatic):
|
|||||||
if projectDir == None:
|
if projectDir == None:
|
||||||
projectDir = tempDir()
|
projectDir = tempDir()
|
||||||
projectName = __createProjectSetNameAndPath__(projectDir, projectName, False)
|
projectName = __createProjectSetNameAndPath__(projectDir, projectName, False)
|
||||||
__handleBuildSystem__(None)
|
__handleBuildSystem__(buildSystem)
|
||||||
selectFromCombo(waitForObject("{name='Type' type='QComboBox' visible='1' "
|
selectFromCombo(waitForObject("{name='Type' type='QComboBox' visible='1' "
|
||||||
"window=':New_ProjectExplorer::JsonWizard'}"),
|
"window=':New_ProjectExplorer::JsonWizard'}"),
|
||||||
LibType.getStringForLib(libType))
|
LibType.getStringForLib(libType))
|
||||||
@@ -396,10 +404,12 @@ def createNewCPPLib(projectDir, projectName, className, target, isStatic):
|
|||||||
__createProjectHandleLastPage__()
|
__createProjectHandleLastPage__()
|
||||||
return projectName, className
|
return projectName, className
|
||||||
|
|
||||||
def createNewQtPlugin(projectDir, projectName, className, target, baseClass="QGenericPlugin"):
|
|
||||||
|
def createNewQtPlugin(projectDir, projectName, className, target, baseClass="QGenericPlugin",
|
||||||
|
buildSystem=None):
|
||||||
available = __createProjectOrFileSelectType__(" Library", "C++ Library", False, True)
|
available = __createProjectOrFileSelectType__(" Library", "C++ Library", False, True)
|
||||||
projectName = __createProjectSetNameAndPath__(projectDir, projectName, False)
|
projectName = __createProjectSetNameAndPath__(projectDir, projectName, False)
|
||||||
__handleBuildSystem__(None)
|
__handleBuildSystem__(buildSystem)
|
||||||
selectFromCombo(waitForObject("{name='Type' type='QComboBox' visible='1' "
|
selectFromCombo(waitForObject("{name='Type' type='QComboBox' visible='1' "
|
||||||
"window=':New_ProjectExplorer::JsonWizard'}"),
|
"window=':New_ProjectExplorer::JsonWizard'}"),
|
||||||
LibType.getStringForLib(LibType.QT_PLUGIN))
|
LibType.getStringForLib(LibType.QT_PLUGIN))
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
#
|
#
|
||||||
# Copyright (C) 2016 The Qt Company Ltd.
|
# Copyright (C) 2022 The Qt Company Ltd.
|
||||||
# Contact: https://www.qt.io/licensing/
|
# Contact: https://www.qt.io/licensing/
|
||||||
#
|
#
|
||||||
# This file is part of Qt Creator.
|
# This file is part of Qt Creator.
|
||||||
@@ -31,7 +31,7 @@ def main():
|
|||||||
# warnings from the clang code model in "issues" view
|
# warnings from the clang code model in "issues" view
|
||||||
if not startCreatorVerifyingClang(False):
|
if not startCreatorVerifyingClang(False):
|
||||||
return
|
return
|
||||||
createProject_Qt_GUI(tempDir(), "SampleApp")
|
createProject_Qt_GUI(tempDir(), "SampleApp", buildSystem="qmake")
|
||||||
# run project for debug and release and verify results
|
# run project for debug and release and verify results
|
||||||
runVerify()
|
runVerify()
|
||||||
#close Qt Creator
|
#close Qt Creator
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
#
|
#
|
||||||
# Copyright (C) 2016 The Qt Company Ltd.
|
# Copyright (C) 2022 The Qt Company Ltd.
|
||||||
# Contact: https://www.qt.io/licensing/
|
# Contact: https://www.qt.io/licensing/
|
||||||
#
|
#
|
||||||
# This file is part of Qt Creator.
|
# This file is part of Qt Creator.
|
||||||
@@ -30,7 +30,7 @@ def main():
|
|||||||
startQC()
|
startQC()
|
||||||
if not startedWithoutPluginError():
|
if not startedWithoutPluginError():
|
||||||
return
|
return
|
||||||
createNewQtQuickApplication(tempDir(), "SampleApp")
|
createNewQtQuickApplication(tempDir(), "SampleApp", buildSystem="qmake")
|
||||||
# run project for debug and release and verify results
|
# run project for debug and release and verify results
|
||||||
runVerify()
|
runVerify()
|
||||||
#close Qt Creator
|
#close Qt Creator
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
#
|
#
|
||||||
# Copyright (C) 2016 The Qt Company Ltd.
|
# Copyright (C) 2022 The Qt Company Ltd.
|
||||||
# Contact: https://www.qt.io/licensing/
|
# Contact: https://www.qt.io/licensing/
|
||||||
#
|
#
|
||||||
# This file is part of Qt Creator.
|
# This file is part of Qt Creator.
|
||||||
@@ -65,9 +65,9 @@ def handleInsertVirtualFunctions(expected, toAdd):
|
|||||||
def checkSimpleCppLib(projectName, static):
|
def checkSimpleCppLib(projectName, static):
|
||||||
projectName, className = createNewCPPLib(tempDir(), projectName, "MyClass",
|
projectName, className = createNewCPPLib(tempDir(), projectName, "MyClass",
|
||||||
Targets.desktopTargetClasses(),
|
Targets.desktopTargetClasses(),
|
||||||
static)
|
static, buildSystem="qmake")
|
||||||
for kit, config in iterateBuildConfigs("Release"):
|
for kit, config in iterateBuildConfigs("Release"):
|
||||||
verifyBuildConfig(kit, config, False, True)
|
verifyBuildConfig(kit, config, False, True, buildSystem="qmake")
|
||||||
invokeMenuItem('Build', 'Build Project "%s"' % projectName)
|
invokeMenuItem('Build', 'Build Project "%s"' % projectName)
|
||||||
waitForCompile(10000)
|
waitForCompile(10000)
|
||||||
checkCompile()
|
checkCompile()
|
||||||
@@ -87,10 +87,11 @@ def main():
|
|||||||
checkSimpleCppLib("SampleApp2", True)
|
checkSimpleCppLib("SampleApp2", True)
|
||||||
|
|
||||||
pluginTargets = (Targets.DESKTOP_5_10_1_DEFAULT, Targets.DESKTOP_5_14_1_DEFAULT)
|
pluginTargets = (Targets.DESKTOP_5_10_1_DEFAULT, Targets.DESKTOP_5_14_1_DEFAULT)
|
||||||
projectName, className = createNewQtPlugin(tempDir(), "SampleApp3", "MyPlugin", pluginTargets)
|
projectName, className = createNewQtPlugin(tempDir(), "SampleApp3", "MyPlugin", pluginTargets,
|
||||||
|
buildSystem="qmake")
|
||||||
virtualFunctionsAdded = False
|
virtualFunctionsAdded = False
|
||||||
for kit, config in iterateBuildConfigs("Debug"):
|
for kit, config in iterateBuildConfigs("Debug"):
|
||||||
verifyBuildConfig(kit, config, True, True)
|
verifyBuildConfig(kit, config, True, True, buildSystem="qmake")
|
||||||
invokeMenuItem('Build', 'Build Project "%s"' % projectName)
|
invokeMenuItem('Build', 'Build Project "%s"' % projectName)
|
||||||
waitForCompile(10000)
|
waitForCompile(10000)
|
||||||
if not virtualFunctionsAdded:
|
if not virtualFunctionsAdded:
|
||||||
|
@@ -98,7 +98,7 @@ def __handleAppOutputWaitForDebuggerFinish__():
|
|||||||
def performDebugging(projectName):
|
def performDebugging(projectName):
|
||||||
for kit, config in iterateBuildConfigs("Debug"):
|
for kit, config in iterateBuildConfigs("Debug"):
|
||||||
test.log("Selecting '%s' as build config" % config)
|
test.log("Selecting '%s' as build config" % config)
|
||||||
verifyBuildConfig(kit, config, True, True)
|
verifyBuildConfig(kit, config, True, True, buildSystem="qmake")
|
||||||
waitForObject(":*Qt Creator.Build Project_Core::Internal::FancyToolButton")
|
waitForObject(":*Qt Creator.Build Project_Core::Internal::FancyToolButton")
|
||||||
selectFromLocator("t rebuild", "Rebuild (Rebuild All Projects)")
|
selectFromLocator("t rebuild", "Rebuild (Rebuild All Projects)")
|
||||||
waitForCompile()
|
waitForCompile()
|
||||||
@@ -111,7 +111,7 @@ def performDebugging(projectName):
|
|||||||
editor = waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget")
|
editor = waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget")
|
||||||
placeCursorToLine(editor, "int main.*", True)
|
placeCursorToLine(editor, "int main.*", True)
|
||||||
type(editor, "<Down>")
|
type(editor, "<Down>")
|
||||||
invokeMenuItem("Debug", "Toggle Breakpoint")
|
invokeMenuItem("Debug", "Enable or Disable Breakpoint")
|
||||||
clickButton(waitForObject(":*Qt Creator.Start Debugging_Core::Internal::FancyToolButton"))
|
clickButton(waitForObject(":*Qt Creator.Start Debugging_Core::Internal::FancyToolButton"))
|
||||||
handleDebuggerWarnings(config, isMsvc)
|
handleDebuggerWarnings(config, isMsvc)
|
||||||
clickButton(waitForObject(":*Qt Creator.Continue_Core::Internal::FancyToolButton"))
|
clickButton(waitForObject(":*Qt Creator.Continue_Core::Internal::FancyToolButton"))
|
||||||
|
@@ -44,8 +44,8 @@ def main():
|
|||||||
'onTriggered: console.log("Break here")'])
|
'onTriggered: console.log("Break here")'])
|
||||||
invokeMenuItem("File", "Save All")
|
invokeMenuItem("File", "Save All")
|
||||||
filesAndLines = [
|
filesAndLines = [
|
||||||
{ "%s.Sources.main\\.cpp" % projectName : "QQmlApplicationEngine engine;" },
|
{ "%s.%s.Source Files.main\\.cpp" % (projectName, projectName) : "QQmlApplicationEngine engine;" },
|
||||||
{ "%s.Resources.qml\.qrc./.main\\.qml" % projectName : 'onTriggered.*' }
|
{ "%s.%s.qml\.qrc./.main\\.qml" % (projectName, projectName) : 'onTriggered.*' }
|
||||||
]
|
]
|
||||||
test.log("Setting breakpoints")
|
test.log("Setting breakpoints")
|
||||||
expectedBreakpointsOrder = setBreakpointsForCurrentProject(filesAndLines)
|
expectedBreakpointsOrder = setBreakpointsForCurrentProject(filesAndLines)
|
||||||
|
@@ -41,10 +41,7 @@ def main():
|
|||||||
startQC()
|
startQC()
|
||||||
if not startedWithoutPluginError():
|
if not startedWithoutPluginError():
|
||||||
return
|
return
|
||||||
targetToChoose = Targets.DESKTOP_4_8_7_DEFAULT
|
openQmakeProject(SpeedCrunchPath, [Targets.DESKTOP_5_14_1_DEFAULT])
|
||||||
if not qt4Available:
|
|
||||||
targetToChoose = Targets.DESKTOP_5_14_1_DEFAULT
|
|
||||||
openQmakeProject(SpeedCrunchPath, [targetToChoose])
|
|
||||||
waitForProjectParsing()
|
waitForProjectParsing()
|
||||||
|
|
||||||
fancyToolButton = waitForObject(":*Qt Creator_Core::Internal::FancyToolButton")
|
fancyToolButton = waitForObject(":*Qt Creator_Core::Internal::FancyToolButton")
|
||||||
|
Reference in New Issue
Block a user