forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/13.0'
Conflicts: cmake/QtCreatorIDEBranding.cmake doc/qtcreator/src/projects/creator-only/creator-projects-build-run-tutorial.qdoc qbs/modules/qtc/qtc.qbs Change-Id: I67a2540677a8b5c309c0c81e2a509a61d0a65aa8
This commit is contained in:
BIN
doc/qtcreator/images/qtcreator-configure-project.webp
Normal file
BIN
doc/qtcreator/images/qtcreator-configure-project.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 11 KiB |
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2021 The Qt Company Ltd.
|
// Copyright (C) 2024 The Qt Company Ltd.
|
||||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||||
|
|
||||||
// **********************************************************************
|
// **********************************************************************
|
||||||
@@ -50,10 +50,17 @@
|
|||||||
the \uicontrol \B2Q tag (commercial only) in the search field
|
the \uicontrol \B2Q tag (commercial only) in the search field
|
||||||
(4) to list examples that you can run on \B2Q devices.
|
(4) to list examples that you can run on \B2Q devices.
|
||||||
|
|
||||||
|
\li In \uicontrol {Configure Project}, select
|
||||||
|
\l{glossary-buildandrun-kit}{kits} for building the example for the
|
||||||
|
target platforms.
|
||||||
|
|
||||||
|
\image qtcreator-configure-project.webp {Configure Project view}
|
||||||
|
|
||||||
|
\li Select \uicontrol {Configure Project}.
|
||||||
|
|
||||||
\li To check that you can compile and link the application code for a
|
\li To check that you can compile and link the application code for a
|
||||||
device, click the \uicontrol {Kit Selector} and select a
|
device, click the \uicontrol {Kit Selector} and select the kit for
|
||||||
\l{glossary-buildandrun-kit}{kit} for the
|
the device.
|
||||||
device.
|
|
||||||
|
|
||||||
\image qtcreator-examples-kit-selector.webp {Selecting a kit to build with}
|
\image qtcreator-examples-kit-selector.webp {Selecting a kit to build with}
|
||||||
|
|
||||||
@@ -61,7 +68,7 @@
|
|||||||
automatically detected the installed kit. If you cannot see any kits,
|
automatically detected the installed kit. If you cannot see any kits,
|
||||||
see \l{Add kits}.
|
see \l{Add kits}.
|
||||||
|
|
||||||
\li Click \inlineimage icons/run_small.png
|
\li Select \inlineimage icons/run_small.png
|
||||||
(\uicontrol Run) to build and run the application.
|
(\uicontrol Run) to build and run the application.
|
||||||
|
|
||||||
\li To see the compilation progress, press \key{Alt+4} to open
|
\li To see the compilation progress, press \key{Alt+4} to open
|
||||||
@@ -78,7 +85,7 @@
|
|||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\sa {Add compilers}, {Add kits}, {Add Qt versions},
|
\sa {Manage Kits}{How To: Manage Kits}, {Open projects},
|
||||||
{Developing for Android}, {Developing for iOS},
|
{Developing for Android}, {Developing for iOS},
|
||||||
{Compile Output}, {\B2Q: Documentation}, {Qt Design Studio Manual}
|
{Compile Output}, {\B2Q: Documentation}, {Qt Design Studio Manual}
|
||||||
*/
|
*/
|
||||||
|
@@ -63,15 +63,15 @@
|
|||||||
To re-configure projects:
|
To re-configure projects:
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
\li In the \uicontrol {Configure Project} tab, select
|
\li In \uicontrol {Configure Project}, select
|
||||||
\l{glossary-buildandrun-kit}{kits} for building
|
\l{glossary-buildandrun-kit}{kits} for building
|
||||||
and running your project.
|
and running your project.
|
||||||
\image qtcreator-open-project-kits.png {Configure Project tab}
|
\image qtcreator-configure-project.webp {Configure Project view}
|
||||||
\li Select \uicontrol {Configure Project}.
|
\li Select \uicontrol {Configure Project}.
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
The \uicontrol {Configure Project} tab displays a list of kits that you
|
\uicontrol {Configure Project} shows a list of kits that you
|
||||||
install on the development PC and configure in \preferences > \uicontrol Kits.
|
install on the computer and configure in \preferences > \uicontrol Kits.
|
||||||
|
|
||||||
Even if you do not intend to build the project, the C++ and QML code models
|
Even if you do not intend to build the project, the C++ and QML code models
|
||||||
need a Qt version and compiler to offer code completion. To specify them,
|
need a Qt version and compiler to offer code completion. To specify them,
|
||||||
|
@@ -35,11 +35,29 @@
|
|||||||
Set workspace details in \uicontrol {P4 user}, \uicontrol {P4 client}, and
|
Set workspace details in \uicontrol {P4 user}, \uicontrol {P4 client}, and
|
||||||
\uicontrol {P4 port}.
|
\uicontrol {P4 port}.
|
||||||
|
|
||||||
|
\section1 Using Configuration Files
|
||||||
|
|
||||||
To specify the details individually for several projects, use configuration
|
To specify the details individually for several projects, use configuration
|
||||||
files instead. Create a \c {p4config.txt} configuration file for each
|
files:
|
||||||
project in the top level project directory, and run
|
|
||||||
\c{p4 set P4CONFIG=p4config.txt} once. You must deselect the
|
\list 1
|
||||||
\uicontrol {Environment Variables} check box.
|
\li Create a \c {p4config.txt} configuration file for each project in the
|
||||||
|
top level project directory.
|
||||||
|
\li Go to \preferences > \uicontrol {Version Control} >
|
||||||
|
\uicontrol Perforce.
|
||||||
|
\li Clear \uicontrol {Environment Variables}.
|
||||||
|
\li Run the following command from the command line once:
|
||||||
|
\list
|
||||||
|
\li On Windows:
|
||||||
|
\badcode
|
||||||
|
p4 set P4CONFIG=p4config.txt
|
||||||
|
\endcode
|
||||||
|
\li On Linux
|
||||||
|
\badcode
|
||||||
|
export P4CONFIG=<path-to-p4config.txt>
|
||||||
|
\endcode
|
||||||
|
\endlist
|
||||||
|
\endlist
|
||||||
|
|
||||||
\section1 Editing Files
|
\section1 Editing Files
|
||||||
|
|
||||||
|
@@ -50,8 +50,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn void ExtensionSystem::PluginView::pluginSettingsChanged(ExtensionSystem::PluginSpec *spec)
|
\fn void ExtensionSystem::PluginView::pluginsChanged(const QSet<ExtensionSystem::PluginSpec *> &spec, bool enabled)
|
||||||
The settings for the plugin list entry corresponding to \a spec changed.
|
The value of \a enabled for the plugin list entry corresponding to \a spec
|
||||||
|
changed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
@@ -1416,7 +1416,10 @@ FilePath FilePathAspect::operator()() const
|
|||||||
|
|
||||||
FilePath FilePathAspect::expandedValue() const
|
FilePath FilePathAspect::expandedValue() const
|
||||||
{
|
{
|
||||||
return FilePath::fromUserInput(TypedAspect::value());
|
const auto value = TypedAspect::value();
|
||||||
|
if (!value.isEmpty() && d->m_expanderProvider)
|
||||||
|
return FilePath::fromUserInput(d->m_expanderProvider()->expand(value));
|
||||||
|
return FilePath::fromUserInput(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString FilePathAspect::value() const
|
QString FilePathAspect::value() const
|
||||||
|
@@ -190,8 +190,6 @@ expected_str<qint64> ProcessStubCreator::startStubProcess(const ProcessSetupData
|
|||||||
process->setEnvironment(
|
process->setEnvironment(
|
||||||
setupData.m_environment.appliedToEnvironment(Environment::systemEnvironment()));
|
setupData.m_environment.appliedToEnvironment(Environment::systemEnvironment()));
|
||||||
|
|
||||||
process->setEnvironment(setupData.m_environment);
|
|
||||||
|
|
||||||
process->start();
|
process->start();
|
||||||
process->waitForStarted();
|
process->waitForStarted();
|
||||||
if (process->error() != QProcess::UnknownError) {
|
if (process->error() != QProcess::UnknownError) {
|
||||||
|
@@ -1002,7 +1002,7 @@ QAbstractItemModel *AndroidBuildApkStep::keystoreCertificates()
|
|||||||
Process keytoolProc;
|
Process keytoolProc;
|
||||||
keytoolProc.setCommand({androidConfig().keytoolPath(), params});
|
keytoolProc.setCommand({androidConfig().keytoolPath(), params});
|
||||||
using namespace std::chrono_literals;
|
using namespace std::chrono_literals;
|
||||||
keytoolProc.runBlocking(30s, EventLoopMode::On);
|
keytoolProc.runBlocking(30s);
|
||||||
if (keytoolProc.result() > ProcessResult::FinishedWithError)
|
if (keytoolProc.result() > ProcessResult::FinishedWithError)
|
||||||
QMessageBox::critical(nullptr, Tr::tr("Error"), Tr::tr("Failed to run keytool."));
|
QMessageBox::critical(nullptr, Tr::tr("Error"), Tr::tr("Failed to run keytool."));
|
||||||
else
|
else
|
||||||
|
@@ -275,7 +275,7 @@ void AndroidCreateKeystoreCertificate::buttonBoxAccepted()
|
|||||||
Process genKeyCertProc;
|
Process genKeyCertProc;
|
||||||
genKeyCertProc.setCommand(command);
|
genKeyCertProc.setCommand(command);
|
||||||
using namespace std::chrono_literals;
|
using namespace std::chrono_literals;
|
||||||
genKeyCertProc.runBlocking(15s, EventLoopMode::On);
|
genKeyCertProc.runBlocking(15s);
|
||||||
|
|
||||||
if (genKeyCertProc.result() != ProcessResult::FinishedWithSuccess) {
|
if (genKeyCertProc.result() != ProcessResult::FinishedWithSuccess) {
|
||||||
QMessageBox::critical(this, Tr::tr("Error"),
|
QMessageBox::critical(this, Tr::tr("Error"),
|
||||||
|
@@ -614,7 +614,7 @@ bool checkKeystorePassword(const FilePath &keystorePath, const QString &keystore
|
|||||||
"--storepass", keystorePasswd});
|
"--storepass", keystorePasswd});
|
||||||
Process proc;
|
Process proc;
|
||||||
proc.setCommand(cmd);
|
proc.setCommand(cmd);
|
||||||
proc.runBlocking(10s, EventLoopMode::On);
|
proc.runBlocking(10s);
|
||||||
return proc.result() == ProcessResult::FinishedWithSuccess;
|
return proc.result() == ProcessResult::FinishedWithSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -631,7 +631,7 @@ bool checkCertificatePassword(const FilePath &keystorePath, const QString &keyst
|
|||||||
|
|
||||||
Process proc;
|
Process proc;
|
||||||
proc.setCommand({androidConfig().keytoolPath(), arguments});
|
proc.setCommand({androidConfig().keytoolPath(), arguments});
|
||||||
proc.runBlocking(10s, EventLoopMode::On);
|
proc.runBlocking(10s);
|
||||||
return proc.result() == ProcessResult::FinishedWithSuccess;
|
return proc.result() == ProcessResult::FinishedWithSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -644,7 +644,7 @@ bool checkCertificateExists(const FilePath &keystorePath, const QString &keystor
|
|||||||
|
|
||||||
Process proc;
|
Process proc;
|
||||||
proc.setCommand({androidConfig().keytoolPath(), arguments});
|
proc.setCommand({androidConfig().keytoolPath(), arguments});
|
||||||
proc.runBlocking(10s, EventLoopMode::On);
|
proc.runBlocking(10s);
|
||||||
return proc.result() == ProcessResult::FinishedWithSuccess;
|
return proc.result() == ProcessResult::FinishedWithSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -308,7 +308,8 @@ static CMakeBuildTarget toBuildTarget(const TargetDetails &t,
|
|||||||
|
|
||||||
std::optional<QString> dllName;
|
std::optional<QString> dllName;
|
||||||
if (buildDir.osType() == OsTypeWindows && (f.role == "libraries")) {
|
if (buildDir.osType() == OsTypeWindows && (f.role == "libraries")) {
|
||||||
part = FilePath::fromUserInput(part).fileName();
|
const auto partAsFilePath = FilePath::fromUserInput(part);
|
||||||
|
part = partAsFilePath.fileName();
|
||||||
|
|
||||||
// Skip object libraries on Windows. This case can happen with static qml plugins
|
// Skip object libraries on Windows. This case can happen with static qml plugins
|
||||||
if (part.endsWith(".obj") || part.endsWith(".o"))
|
if (part.endsWith(".obj") || part.endsWith(".o"))
|
||||||
@@ -322,13 +323,16 @@ static CMakeBuildTarget toBuildTarget(const TargetDetails &t,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// MinGW has libQt6Core.a -> Qt6Core.dll
|
// MinGW has libQt6Core.a -> Qt6Core.dll
|
||||||
|
// but libFoo.dll.a was already handled above
|
||||||
const QString mingwPrefix("lib");
|
const QString mingwPrefix("lib");
|
||||||
const QString mingwSuffix(".a");
|
const QString mingwSuffix("a");
|
||||||
if (part.startsWith(mingwPrefix) && part.endsWith(mingwSuffix))
|
const QString completeSuffix = partAsFilePath.completeSuffix();
|
||||||
dllName = part.chopped(mingwSuffix.length())
|
if (part.startsWith(mingwPrefix) && completeSuffix == mingwSuffix) {
|
||||||
|
dllName = part.chopped(mingwSuffix.length() + 1/*the '.'*/)
|
||||||
.sliced(mingwPrefix.length())
|
.sliced(mingwPrefix.length())
|
||||||
.append(".dll");
|
.append(".dll");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!tmp.isEmpty() && tmp.isDir()) {
|
if (!tmp.isEmpty() && tmp.isDir()) {
|
||||||
// f.role is libraryPath or frameworkPath
|
// f.role is libraryPath or frameworkPath
|
||||||
|
@@ -1480,6 +1480,7 @@ bool EditorManagerPrivate::activateEditorForEntry(EditorView *view, DocumentMode
|
|||||||
void EditorManagerPrivate::closeEditorOrDocument(IEditor *editor)
|
void EditorManagerPrivate::closeEditorOrDocument(IEditor *editor)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(editor, return);
|
QTC_ASSERT(editor, return);
|
||||||
|
EditorManager::addCurrentPositionToNavigationHistory();
|
||||||
QList<IEditor *> visible = EditorManager::visibleEditors();
|
QList<IEditor *> visible = EditorManager::visibleEditors();
|
||||||
if (Utils::contains(visible,
|
if (Utils::contains(visible,
|
||||||
[&editor](IEditor *other) {
|
[&editor](IEditor *other) {
|
||||||
@@ -2777,7 +2778,6 @@ void EditorManager::slotCloseCurrentEditorOrDocument()
|
|||||||
{
|
{
|
||||||
if (!d->m_currentEditor)
|
if (!d->m_currentEditor)
|
||||||
return;
|
return;
|
||||||
addCurrentPositionToNavigationHistory();
|
|
||||||
d->closeEditorOrDocument(d->m_currentEditor);
|
d->closeEditorOrDocument(d->m_currentEditor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -30,7 +30,7 @@ using namespace Utils;
|
|||||||
and \uicontrol {Files in File System} where the user provides a directory and file
|
and \uicontrol {Files in File System} where the user provides a directory and file
|
||||||
patterns to search.
|
patterns to search.
|
||||||
|
|
||||||
\image qtcreator-search-filesystem.png
|
\image qtcreator-search-reg-exp.webp {Search Results view with search criteria}
|
||||||
|
|
||||||
To make your find scope available to the user, you need to implement this
|
To make your find scope available to the user, you need to implement this
|
||||||
class, and register an instance of your subclass in the plugin manager.
|
class, and register an instance of your subclass in the plugin manager.
|
||||||
@@ -38,7 +38,7 @@ using namespace Utils;
|
|||||||
A common way to present the search results to the user, is to use the
|
A common way to present the search results to the user, is to use the
|
||||||
shared \uicontrol{Search Results} pane.
|
shared \uicontrol{Search Results} pane.
|
||||||
|
|
||||||
\image qtcreator-search-results.webp {Search Results view}
|
\image qtcreator-search-results-reg-exp.webp {Search Results view with search results}
|
||||||
|
|
||||||
If you want to implement a find filter that is doing a file based text
|
If you want to implement a find filter that is doing a file based text
|
||||||
search, you should use \l Core::BaseTextFind, which already implements all
|
search, you should use \l Core::BaseTextFind, which already implements all
|
||||||
@@ -178,13 +178,13 @@ using namespace Utils;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn void Core::IFindFilter::writeSettings(QSettings *settings)
|
\fn void Core::IFindFilter::writeSettings(Utils::QtcSettings *settings)
|
||||||
Called at shutdown to write the state of the additional options
|
Called at shutdown to write the state of the additional options
|
||||||
for this find filter to the \a settings.
|
for this find filter to the \a settings.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn void Core::IFindFilter::readSettings(QSettings *settings)
|
\fn void Core::IFindFilter::readSettings(Utils::QtcSettings *settings)
|
||||||
Called at startup to read the state of the additional options
|
Called at startup to read the state of the additional options
|
||||||
for this find filter from the \a settings.
|
for this find filter from the \a settings.
|
||||||
*/
|
*/
|
||||||
|
@@ -288,10 +288,13 @@ using namespace Core::Internal;
|
|||||||
This enum type specifies whether the search results should be sorted or
|
This enum type specifies whether the search results should be sorted or
|
||||||
ordered:
|
ordered:
|
||||||
|
|
||||||
\value AddSorted
|
\value AddSortedByContent
|
||||||
The search results are sorted.
|
The search results are sorted alphabetically.
|
||||||
|
\value AddSortedByPosition
|
||||||
|
The search results are sorted by the search results' reported line
|
||||||
|
numbers.
|
||||||
\value AddOrdered
|
\value AddOrdered
|
||||||
The search results are ordered.
|
The search results are ordered as they are reported.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -331,7 +334,7 @@ using namespace Core::Internal;
|
|||||||
\brief The SearchResultWindow class is the implementation of a commonly
|
\brief The SearchResultWindow class is the implementation of a commonly
|
||||||
shared \uicontrol{Search Results} output pane.
|
shared \uicontrol{Search Results} output pane.
|
||||||
|
|
||||||
\image qtcreator-search-results.webp {Search Results view}
|
\image qtcreator-search-results-reg-exp.webp {Search Results view with search results}
|
||||||
|
|
||||||
Whenever you want to show the user a list of search results, or want
|
Whenever you want to show the user a list of search results, or want
|
||||||
to present UI for a global search and replace, use the single instance
|
to present UI for a global search and replace, use the single instance
|
||||||
|
@@ -103,7 +103,7 @@ bool QtDesignerFormClassCodeGenerator::generateCpp(const FormClassWizardParamete
|
|||||||
Utils::writeIncludeFileDirective("QtGui/" + formBaseClass, true, headerStr);
|
Utils::writeIncludeFileDirective("QtGui/" + formBaseClass, true, headerStr);
|
||||||
headerStr << "#endif\n";
|
headerStr << "#endif\n";
|
||||||
} else {
|
} else {
|
||||||
Utils::writeIncludeFileDirective("QtGui/" + formBaseClass, true, headerStr);
|
Utils::writeIncludeFileDirective("QtWidgets/" + formBaseClass, true, headerStr);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Utils::writeIncludeFileDirective(formBaseClass, true, headerStr);
|
Utils::writeIncludeFileDirective(formBaseClass, true, headerStr);
|
||||||
|
@@ -1531,7 +1531,8 @@ private:
|
|||||||
const QString sshCmdLine = ProcessArgs::joinArgs(
|
const QString sshCmdLine = ProcessArgs::joinArgs(
|
||||||
QStringList{SshSettings::sshFilePath().toUserOutput()}
|
QStringList{SshSettings::sshFilePath().toUserOutput()}
|
||||||
<< fullConnectionOptions(), OsTypeLinux);
|
<< fullConnectionOptions(), OsTypeLinux);
|
||||||
QStringList options{"-e", sshCmdLine, m_setup.m_rsyncFlags};
|
QStringList options{"-e", sshCmdLine};
|
||||||
|
options << ProcessArgs::splitArgs(m_setup.m_rsyncFlags, HostOsInfo::hostOs());
|
||||||
|
|
||||||
if (!m_batches.isEmpty()) { // NormalRun
|
if (!m_batches.isEmpty()) { // NormalRun
|
||||||
const auto batchIt = m_batches.begin();
|
const auto batchIt = m_batches.begin();
|
||||||
|
Submodule src/shared/qbs updated: 488fbe40e8...fc4dec2f6a
@@ -48,12 +48,15 @@ def main():
|
|||||||
snooze(1)
|
snooze(1)
|
||||||
type(editor, ">")
|
type(editor, ">")
|
||||||
snooze(1)
|
snooze(1)
|
||||||
|
proposalExists = lambda: object.exists(':popupFrame_TextEditor::GenericProposalWidget')
|
||||||
nativeType("%s" % buttonName[0])
|
nativeType("%s" % buttonName[0])
|
||||||
test.verify(waitFor("object.exists(':popupFrame_TextEditor::GenericProposalWidget')", 1500),
|
if test.verify(waitFor(proposalExists, 4000),
|
||||||
"Verify that GenericProposalWidget is being shown.")
|
"Verify that GenericProposalWidget is being shown."):
|
||||||
nativeType("<Return>")
|
nativeType("<Return>")
|
||||||
test.verify(waitFor('str(lineUnderCursor(editor)).strip() == "ui->%s" % buttonName', 1000),
|
lineCorrect = lambda: str(lineUnderCursor(editor)).strip() == "ui->%s" % buttonName
|
||||||
'Comparing line "%s" to expected "%s"' % (lineUnderCursor(editor), "ui->%s" % buttonName))
|
test.verify(waitFor(lineCorrect, 1000),
|
||||||
|
('Comparing line "%s" to expected "%s"'
|
||||||
|
% (lineUnderCursor(editor), "ui->%s" % buttonName)))
|
||||||
type(editor, "<Shift+Delete>") # Delete line
|
type(editor, "<Shift+Delete>") # Delete line
|
||||||
selectFromLocator("mainwindow.ui")
|
selectFromLocator("mainwindow.ui")
|
||||||
saveAndExit()
|
saveAndExit()
|
||||||
|
Reference in New Issue
Block a user