Merge remote-tracking branch 'origin/5.0'
Change-Id: I368fffe959c10f5942ccb1bcdb1fed4ac1a7460b
@@ -48,6 +48,7 @@ else()
|
||||
if(dcIndex GREATER_EQUAL 0)
|
||||
find_package(Qt6${possible_private_libs}Private CONFIG QUIET)
|
||||
if(TARGET Qt6::${possible_private_libs}Private)
|
||||
set_property(TARGET Qt6::${possible_private_libs}Private PROPERTY IMPORTED_GLOBAL TRUE)
|
||||
add_library(Qt5::${possible_private_libs} ALIAS Qt6::${possible_private_libs}Private)
|
||||
list(REMOVE_AT Qt5_FIND_COMPONENTS ${dcIndex})
|
||||
endif()
|
||||
|
36
dist/changes-5.0.0.md
vendored
@@ -21,17 +21,20 @@ Editing
|
||||
* Added line ending and indentation to file properties information
|
||||
* Added menu item and shortcut for editing bookmark comments
|
||||
(QTCREATORBUG-25696)
|
||||
* Fixed folding for Markdown (QTCREATORBUG-25882)
|
||||
|
||||
### C++
|
||||
|
||||
* Added experimental support for `clangd` (no code completion yet, requires
|
||||
development build of `clangd`)
|
||||
* Added highlighting option for function parameters (QTCREATORBUG-24880)
|
||||
* Added experimental support for `clangd` for global index (`Find References`,
|
||||
`Rename Symbol`, `Follow Symbol`)
|
||||
* Added template parameters to symbols in Locator
|
||||
* Fixed that project-unrelated files were selected by default when renaming
|
||||
symbols (QTCREATORBUG-8561)
|
||||
* Fixed highlighting of string literals with multi-byte characters
|
||||
(QTCREATORBUG-25715)
|
||||
* Fixed code model for changed but not yet built `.ui` and `.scxml` files
|
||||
(QTCREATORBUG-25937)
|
||||
|
||||
### QML
|
||||
|
||||
@@ -57,10 +60,17 @@ Editing
|
||||
Projects
|
||||
--------
|
||||
|
||||
* Added experimental support for building and running on Docker devices
|
||||
* Added option `Show Source and Header Groups` to project tree
|
||||
(QTCREATORBUG-25313)
|
||||
* Fixed crash when closing project while changing current configuration
|
||||
(QTCREATORBUG-25655)
|
||||
* Fixed that output of custom targets was interpreted as errors
|
||||
(QTCREATORBUG-25677)
|
||||
* Fixed missing update of run configuration environment (QTCREATORBUG-25947)
|
||||
* Fixed that user files were unnecessarily saved with new time stamp
|
||||
(QTCREATORBUG-25921)
|
||||
* Reduced UI freeze after loading projects (QTCREATORBUG-25783)
|
||||
|
||||
### CMake
|
||||
|
||||
@@ -69,6 +79,12 @@ Projects
|
||||
* Added CMake output to right side of `Projects` mode (QTCREATORBUG-25522)
|
||||
* Fixed `Jump to File` for file names with special characters
|
||||
(QTCREATORBUG-25572)
|
||||
* Fixed updating of available targets (QTCREATORBUG-24914, QTCREATORBUG-25906)
|
||||
* Fixed persistence of CMake tool options (QTCREATORBUG-25911)
|
||||
|
||||
### Qbs
|
||||
|
||||
* Improved performance of registering profiles (QTCREATORBUG-25463)
|
||||
|
||||
Debugging
|
||||
---------
|
||||
@@ -87,6 +103,14 @@ Debugging
|
||||
|
||||
* Implemented `Load QML Stack` for LLDB (QTCREATORBUG-25554)
|
||||
|
||||
Analyzer
|
||||
--------
|
||||
|
||||
### Clang
|
||||
|
||||
* Fixed URL for `clang-tidy` checks (QTCREATORBUG-25902)
|
||||
* Fixed application of options to checks (QTCREATORBUG-25827)
|
||||
|
||||
FakeVim
|
||||
-------
|
||||
|
||||
@@ -103,6 +127,11 @@ Platforms
|
||||
|
||||
* Fixed performance issue with registering file watches after loading projects
|
||||
|
||||
### Android
|
||||
|
||||
* Fixed detection of `_prepare_apk_dir` target for CMake projects
|
||||
(QTCREATORBUG-25216)
|
||||
|
||||
### QNX
|
||||
|
||||
* Fixed device configuration
|
||||
@@ -138,6 +167,7 @@ Jaroslaw Kobus
|
||||
Jochen Becher
|
||||
Johanna Vanhatapio
|
||||
Kai Köhne
|
||||
Kama Wójcik
|
||||
Knud Dollereder
|
||||
Leena Miettinen
|
||||
Lukas Holecek
|
||||
@@ -149,6 +179,7 @@ Michael Weghorn
|
||||
Miikka Heikkinen
|
||||
Miina Puuronen
|
||||
Miklós Márton
|
||||
Nodir Temirkhodjaev
|
||||
Oliver Wolff
|
||||
Orgad Shaneh
|
||||
Pekka Kaikkonen
|
||||
@@ -158,4 +189,5 @@ Tim Blechmann
|
||||
Tim Jenssen
|
||||
Tom Praschan
|
||||
Vikas Pachdha
|
||||
Wojciech Smigaj
|
||||
Youri Westerman
|
||||
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 9.3 KiB |
@@ -162,6 +162,10 @@
|
||||
editor, select \uicontrol GDB > \uicontrol {Adjust breakpoint locations}
|
||||
or \uicontrol CDB > \uicontrol {Correct breakpoint location}.
|
||||
|
||||
When using GDB as backend, you can extend the ordinary GDB
|
||||
breakpoint class by using Python. Select \uicontrol GDB >
|
||||
\uicontrol {Use pseudo message tracepoints}.
|
||||
|
||||
When using CDB as backend, you can specify that the debugger should break on
|
||||
specific events, such as C++ exceptions, thread creation or exit, loading or
|
||||
unloading \l{Viewing Modules}{application modules}, or particular output.
|
||||
|
@@ -112,6 +112,10 @@
|
||||
By default, GDB shows AT&T style disassembly. To switch to the Intel style,
|
||||
select the \uicontrol {Use Intel style disassembly} check box.
|
||||
|
||||
To have GDB automatically save a copy of its symbol index in a cache
|
||||
on disk and retrieve it from there when loading the same binary in the
|
||||
future, select the \uicontrol {Use automatic symbol cache} check box.
|
||||
|
||||
To execute GDB commands after GDB has been started, but before the debugged
|
||||
program is started or attached, and before the debugging helpers are
|
||||
initialized, enter them in the \uicontrol {Additional Startup Commands}
|
||||
|
@@ -1540,8 +1540,16 @@
|
||||
|
||||
\section1 Built-in Debugger Is Slow During Startup and Runtime
|
||||
|
||||
The part of the slowness that is related to the loading of debug information
|
||||
is hard to avoid. Another part stems from maintaining breakpoints inside
|
||||
Slowness that is related to the loading of debug information is hard to
|
||||
avoid.
|
||||
|
||||
When using GDB as backend, you can automatically save a copy of
|
||||
its symbol index in a cache on disk and retrieve it from there
|
||||
when loading the same binary in the future. Select \uicontrol Tools
|
||||
> \uicontrol Options > \uicontrol Debugger > \uicontrol GDB >
|
||||
\uicontrol {Use automatic symbol cache}.
|
||||
|
||||
Some slowness stems from maintaining breakpoints inside
|
||||
the debugger (under some circumstances all breakpoints need to be inserted
|
||||
and removed again for each step) and the evaluation of expressions after
|
||||
each step. We recommend that you minimize the number of breakpoints and
|
||||
|
@@ -171,6 +171,9 @@
|
||||
the kit's toolkits and SDKs, and keeps them synchronized when selecting
|
||||
\uicontrol Apply or \uicontrol OK.
|
||||
|
||||
The \uicontrol {MCU dependencies} field displays paths to 3rd party
|
||||
software required for MCU development with the current kit.
|
||||
|
||||
\section1 Running Applications on MCUs
|
||||
|
||||
You can use a wizard to set up a project for developing an application that
|
||||
|
@@ -133,6 +133,9 @@
|
||||
not enabled for the current target,
|
||||
\li \uicontrol {Hide Empty Directories} hides directories that do not
|
||||
contain any files.
|
||||
\li \uicontrol {Show Source and Header Groups} shows source and header
|
||||
files grouped together in the view, regardless of their location in
|
||||
the file system.
|
||||
\endlist
|
||||
|
||||
To stop synchronizing the position in the project tree with the file
|
||||
|
@@ -71,9 +71,7 @@ public:
|
||||
PropertyNameList propertyNameListForWritableProperties(QObject *object,
|
||||
const PropertyName &baseName = PropertyName(),
|
||||
QObjectList *inspectedObjects = nullptr);
|
||||
PropertyNameList allPropertyNames(QObject *object,
|
||||
const PropertyName &baseName = PropertyName(),
|
||||
QObjectList *inspectedObjects = nullptr);
|
||||
PropertyNameList allPropertyNames(QObject *object);
|
||||
bool hasFullImplementedListInterface(const QQmlListReference &list);
|
||||
|
||||
void registerCustomData(QObject *object);
|
||||
|
@@ -68,8 +68,8 @@ static void addToPropertyNameListIfNotBlackListed(
|
||||
}
|
||||
|
||||
PropertyNameList allPropertyNamesInline(QObject *object,
|
||||
const PropertyName &baseName,
|
||||
QObjectList *inspectedObjects,
|
||||
const PropertyName &baseName = {},
|
||||
QObjectList *inspectedObjects = nullptr,
|
||||
int depth = 0)
|
||||
{
|
||||
QQuickDesignerSupport::PropertyNameList propertyNameList;
|
||||
@@ -136,24 +136,20 @@ PropertyNameList allPropertyNamesInline(QObject *object,
|
||||
}
|
||||
#endif
|
||||
|
||||
PropertyNameList allPropertyNames(QObject *object,
|
||||
const PropertyName &baseName,
|
||||
QObjectList *inspectedObjects)
|
||||
PropertyNameList allPropertyNames(QObject *object)
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
return QQuickDesignerSupportProperties::allPropertyNames(object, baseName, inspectedObjects);
|
||||
return QQuickDesignerSupportProperties::allPropertyNames(object);
|
||||
#elif QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
|
||||
return allPropertyNamesInline(object, baseName, inspectedObjects);
|
||||
return allPropertyNamesInline(object);
|
||||
#else
|
||||
return QQuickDesignerSupportProperties::allPropertyNames(object, baseName, inspectedObjects);
|
||||
return QQuickDesignerSupportProperties::allPropertyNames(object);
|
||||
#endif
|
||||
}
|
||||
|
||||
PropertyNameList propertyNameListForWritableProperties(QObject *object,
|
||||
const PropertyName &baseName,
|
||||
QObjectList *inspectedObjects)
|
||||
PropertyNameList propertyNameListForWritableProperties(QObject *object)
|
||||
{
|
||||
return QQuickDesignerSupportProperties::propertyNameListForWritableProperties(object, baseName, inspectedObjects);
|
||||
return QQuickDesignerSupportProperties::propertyNameListForWritableProperties(object);
|
||||
}
|
||||
|
||||
void tweakObjects(QObject *object)
|
||||
|
@@ -92,7 +92,7 @@ struct ResponseHandler
|
||||
using ResponseHandlers = std::function<void(const MessageId &, const QByteArray &, QTextCodec *)>;
|
||||
using MethodHandler = std::function<void(const QString &, const MessageId &, const IContent *)>;
|
||||
|
||||
inline uint qHash(const LanguageServerProtocol::MessageId &id)
|
||||
inline auto qHash(const LanguageServerProtocol::MessageId &id)
|
||||
{
|
||||
if (Utils::holds_alternative<int>(id))
|
||||
return QT_PREPEND_NAMESPACE(qHash(Utils::get<int>(id)));
|
||||
|
@@ -55,7 +55,7 @@ private:
|
||||
QUuid m_uuid;
|
||||
};
|
||||
|
||||
inline uint qHash(const Uid &uid)
|
||||
inline auto qHash(const Uid &uid)
|
||||
{
|
||||
return qHash(uid.get());
|
||||
}
|
||||
|
@@ -151,15 +151,15 @@ private:
|
||||
QColor m_color;
|
||||
};
|
||||
|
||||
inline uint qHash(CustomRelation::Relationship relationship) {
|
||||
inline auto qHash(CustomRelation::Relationship relationship) {
|
||||
return ::qHash(static_cast<int>(relationship));
|
||||
}
|
||||
|
||||
inline uint qHash(CustomRelation::ShaftPattern pattern) {
|
||||
inline auto qHash(CustomRelation::ShaftPattern pattern) {
|
||||
return ::qHash(static_cast<int>(pattern));
|
||||
}
|
||||
|
||||
inline uint qHash(CustomRelation::Head head) {
|
||||
inline auto qHash(CustomRelation::Head head) {
|
||||
return ::qHash(static_cast<int>(head));
|
||||
}
|
||||
|
||||
|
@@ -77,7 +77,7 @@ bool operator==(const IconKey &lhs, const IconKey &rhs) {
|
||||
&& lhs.m_lineWidth == rhs.m_lineWidth;
|
||||
}
|
||||
|
||||
uint qHash(const IconKey &key) {
|
||||
auto qHash(const IconKey &key) {
|
||||
return ::qHash(key.m_element) + qHash(key.m_stereotypes) + qHash(key.m_defaultIconPath)
|
||||
+ qHash(key.m_styleUid) + ::qHash(key.m_size.width()) + ::qHash(key.m_size.height());
|
||||
}
|
||||
|
@@ -302,7 +302,7 @@ public:
|
||||
return datastream;
|
||||
}
|
||||
|
||||
friend uint qHash(const Utf8String &utf8String)
|
||||
friend auto qHash(const Utf8String &utf8String)
|
||||
{
|
||||
return qHash(utf8String.byteArray);
|
||||
}
|
||||
|
@@ -1378,15 +1378,25 @@ FilePath FilePath::onDevice(const FilePath &deviceTemplate) const
|
||||
assert(fullPath == FilePath::fromUrl("docker://123/usr/bin/make"))
|
||||
\endcode
|
||||
*/
|
||||
FilePath FilePath::onDeviceSearchInPath() const
|
||||
FilePath FilePath::onDeviceSearchInPath(const FilePaths &additionalDirs) const
|
||||
{
|
||||
if (needsDevice()) {
|
||||
QTC_ASSERT(s_deviceHooks.searchInPath, return {});
|
||||
return s_deviceHooks.searchInPath(*this);
|
||||
return s_deviceHooks.searchInPath(*this, additionalDirs);
|
||||
}
|
||||
return Environment::systemEnvironment().searchInPath(path());
|
||||
return Environment::systemEnvironment().searchInPath(path(), additionalDirs);
|
||||
}
|
||||
|
||||
Environment FilePath::deviceEnvironment() const
|
||||
{
|
||||
if (needsDevice()) {
|
||||
QTC_ASSERT(s_deviceHooks.environment, return {});
|
||||
return s_deviceHooks.environment(*this);
|
||||
}
|
||||
return Environment::systemEnvironment();
|
||||
}
|
||||
|
||||
|
||||
FilePath FilePath::pathAppended(const QString &path) const
|
||||
{
|
||||
FilePath fn = *this;
|
||||
|
@@ -40,7 +40,10 @@
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
namespace Utils { class FilePath; }
|
||||
namespace Utils {
|
||||
class Environment;
|
||||
class FilePath;
|
||||
} // Utils
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QDataStream;
|
||||
@@ -82,7 +85,7 @@ public:
|
||||
std::function<bool(const FilePath &)> removeRecursively;
|
||||
std::function<bool(const FilePath &, const FilePath &)> copyFile;
|
||||
std::function<bool(const FilePath &, const FilePath &)> renameFile;
|
||||
std::function<FilePath(const FilePath &)> searchInPath;
|
||||
std::function<FilePath(const FilePath &, const QList<FilePath> &)> searchInPath;
|
||||
std::function<FilePath(const FilePath &)> symLinkTarget;
|
||||
std::function<QList<FilePath>(const FilePath &, const QStringList &,
|
||||
QDir::Filters, QDir::SortFlags)> dirEntries;
|
||||
@@ -91,6 +94,7 @@ public:
|
||||
std::function<QDateTime(const FilePath &)> lastModified;
|
||||
std::function<QFile::Permissions(const FilePath &)> permissions;
|
||||
std::function<OsType(const FilePath &)> osType;
|
||||
std::function<Environment(const FilePath &)> environment;
|
||||
};
|
||||
|
||||
class QTCREATOR_UTILS_EXPORT FilePath
|
||||
@@ -212,7 +216,8 @@ public:
|
||||
|
||||
static void setDeviceFileHooks(const DeviceFileHooks &hooks);
|
||||
|
||||
FilePath onDeviceSearchInPath() const;
|
||||
FilePath onDeviceSearchInPath(const QList<FilePath> &additionalDirs = {}) const;
|
||||
Environment deviceEnvironment() const;
|
||||
|
||||
private:
|
||||
friend class ::tst_fileutils;
|
||||
|
@@ -120,7 +120,7 @@ protected:
|
||||
QExplicitlySharedDataPointer<Internal::MimeTypePrivate> d;
|
||||
};
|
||||
|
||||
inline uint qHash(const MimeType &mime) { return qHash(mime.name()); }
|
||||
inline auto qHash(const MimeType &mime) { return qHash(mime.name()); }
|
||||
|
||||
} // Utils
|
||||
|
||||
|
@@ -155,7 +155,7 @@ namespace std {
|
||||
template<> struct hash<Utils::SmallString>
|
||||
{
|
||||
using argument_type = Utils::SmallString;
|
||||
using result_type = uint;
|
||||
using result_type = std::size_t;
|
||||
result_type operator()(const argument_type& string) const
|
||||
{
|
||||
return qHashBits(string.data(), string.size());
|
||||
|
@@ -37,6 +37,7 @@ namespace Autotest {
|
||||
|
||||
using LookupInfo = QPair<QString, QString>;
|
||||
static QHash<LookupInfo, bool> s_pchLookupCache;
|
||||
Q_GLOBAL_STATIC(QMutex, s_cacheMutex);
|
||||
|
||||
CppParser::CppParser(ITestFramework *framework)
|
||||
: ITestParser(framework)
|
||||
@@ -96,6 +97,7 @@ bool precompiledHeaderContains(const CPlusPlus::Snapshot &snapshot,
|
||||
}
|
||||
return it.value();
|
||||
};
|
||||
QMutexLocker l(s_cacheMutex());
|
||||
return Utils::anyOf(precompiledHeaders, headerContains);
|
||||
}
|
||||
|
||||
@@ -127,6 +129,7 @@ void CppParser::release()
|
||||
{
|
||||
m_cppSnapshot = CPlusPlus::Snapshot();
|
||||
m_workingCopy = CppTools::WorkingCopy();
|
||||
QMutexLocker l(s_cacheMutex());
|
||||
s_pchLookupCache.clear();
|
||||
}
|
||||
|
||||
|
@@ -75,7 +75,7 @@ enum class ResultType {
|
||||
LAST_TYPE = Invalid
|
||||
};
|
||||
|
||||
inline uint qHash(const ResultType &result)
|
||||
inline auto qHash(const ResultType &result)
|
||||
{
|
||||
return QT_PREPEND_NAMESPACE(qHash(int(result)));
|
||||
}
|
||||
|
@@ -30,6 +30,7 @@
|
||||
#include "debugserverproviderchooser.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <QFormLayout>
|
||||
|
||||
|
@@ -29,6 +29,8 @@
|
||||
#include "baremetaldeviceconfigurationwizard.h"
|
||||
#include "baremetaldeviceconfigurationwizardpages.h"
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
namespace BareMetal {
|
||||
namespace Internal {
|
||||
|
||||
|
@@ -30,6 +30,7 @@
|
||||
#include "debugserverproviderchooser.h"
|
||||
|
||||
#include <utils/variablechooser.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <projectexplorer/devicesupport/idevice.h>
|
||||
|
||||
#include <QFormLayout>
|
||||
|
@@ -46,7 +46,7 @@ public:
|
||||
inline const QString &name() const { return m_name; }
|
||||
inline const QString &type() const { return m_type; }
|
||||
inline int iconType() const { return m_iconType; }
|
||||
inline uint hash() const { return m_hash; }
|
||||
inline auto hash() const { return m_hash; }
|
||||
inline bool operator==(const SymbolInformation &other) const
|
||||
{
|
||||
return hash() == other.hash() && iconType() == other.iconType() && name() == other.name()
|
||||
@@ -64,7 +64,7 @@ private:
|
||||
};
|
||||
|
||||
//! qHash overload for QHash/QSet
|
||||
inline uint qHash(const SymbolInformation &information)
|
||||
inline auto qHash(const SymbolInformation &information)
|
||||
{
|
||||
return information.hash();
|
||||
}
|
||||
|
@@ -55,7 +55,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
inline uint qHash(SearchResultColor::Style style)
|
||||
inline auto qHash(SearchResultColor::Style style)
|
||||
{
|
||||
return QT_PREPEND_NAMESPACE(qHash(int(style)));
|
||||
}
|
||||
|
@@ -49,6 +49,7 @@
|
||||
#include <cpptools/cppcanonicalsymbol.h>
|
||||
#include <cpptools/cppchecksymbols.h>
|
||||
#include <cpptools/cppcodeformatter.h>
|
||||
#include <cpptools/cppcodemodelsettings.h>
|
||||
#include <cpptools/cppcompletionassistprovider.h>
|
||||
#include <cpptools/cppeditoroutline.h>
|
||||
#include <cpptools/cppmodelmanager.h>
|
||||
@@ -114,11 +115,15 @@ class CppEditorWidgetPrivate
|
||||
public:
|
||||
CppEditorWidgetPrivate(CppEditorWidget *q);
|
||||
|
||||
bool shouldOfferOutline() const { return CppModelManager::supportsOutline(m_cppEditorDocument); }
|
||||
|
||||
public:
|
||||
QPointer<CppModelManager> m_modelManager;
|
||||
|
||||
CppEditorDocument *m_cppEditorDocument;
|
||||
CppEditorOutline *m_cppEditorOutline = nullptr;
|
||||
QAction *m_outlineAction = nullptr;
|
||||
QTimer m_outlineTimer;
|
||||
|
||||
QTimer m_updateFunctionDeclDefLinkTimer;
|
||||
SemanticInfo m_lastSemanticInfo;
|
||||
@@ -159,11 +164,11 @@ void CppEditorWidget::finalizeInitialization()
|
||||
|
||||
// clang-format off
|
||||
// function combo box sorting
|
||||
if (CppModelManager::supportsOutline(d->m_cppEditorDocument)) {
|
||||
d->m_cppEditorOutline = new CppEditorOutline(this);
|
||||
|
||||
// TODO: Nobody emits this signal... Remove?
|
||||
connect(CppEditorPlugin::instance(), &CppEditorPlugin::outlineSortingChanged,
|
||||
outline(), &CppEditorOutline::setSorted);
|
||||
}
|
||||
|
||||
connect(d->m_cppEditorDocument, &CppEditorDocument::codeWarningsUpdated,
|
||||
this, &CppEditorWidget::onCodeWarningsUpdated);
|
||||
@@ -197,10 +202,10 @@ void CppEditorWidget::finalizeInitialization()
|
||||
});
|
||||
connect(&d->m_localRenaming, &CppLocalRenaming::processKeyPressNormally,
|
||||
this, &CppEditorWidget::processKeyNormally);
|
||||
if (d->m_cppEditorOutline) {
|
||||
connect(this, &QPlainTextEdit::cursorPositionChanged,
|
||||
d->m_cppEditorOutline, &CppEditorOutline::updateIndex);
|
||||
}
|
||||
connect(this, &QPlainTextEdit::cursorPositionChanged, this, [this] {
|
||||
if (d->shouldOfferOutline())
|
||||
d->m_cppEditorOutline->updateIndex();
|
||||
});
|
||||
|
||||
connect(cppEditorDocument(), &CppEditorDocument::preprocessorSettingsChanged, this,
|
||||
[this](bool customSettings) {
|
||||
@@ -236,8 +241,8 @@ void CppEditorWidget::finalizeInitialization()
|
||||
});
|
||||
|
||||
// Toolbar: Outline/Overview combo box
|
||||
if (d->m_cppEditorOutline)
|
||||
insertExtraToolBarWidget(TextEditorWidget::Left, d->m_cppEditorOutline->widget());
|
||||
d->m_outlineAction = insertExtraToolBarWidget(TextEditorWidget::Left,
|
||||
d->m_cppEditorOutline->widget());
|
||||
|
||||
// clang-format on
|
||||
// Toolbar: '#' Button
|
||||
@@ -261,6 +266,20 @@ void CppEditorWidget::finalizeInitialization()
|
||||
});
|
||||
connect(&cppEditorDocument()->minimizableInfoBars(), &MinimizableInfoBars::showAction,
|
||||
this, &CppEditorWidget::onShowInfoBarAction);
|
||||
|
||||
d->m_outlineTimer.setInterval(5000);
|
||||
d->m_outlineTimer.setSingleShot(true);
|
||||
connect(&d->m_outlineTimer, &QTimer::timeout, this, [this] {
|
||||
d->m_outlineAction->setVisible(d->shouldOfferOutline());
|
||||
if (d->m_outlineAction->isVisible()) {
|
||||
d->m_cppEditorOutline->update();
|
||||
d->m_cppEditorOutline->updateIndex();
|
||||
}
|
||||
});
|
||||
connect(&ClangdSettings::instance(), &ClangdSettings::changed,
|
||||
&d->m_outlineTimer, qOverload<>(&QTimer::start));
|
||||
connect(d->m_cppEditorDocument, &CppEditorDocument::changed,
|
||||
&d->m_outlineTimer, qOverload<>(&QTimer::start));
|
||||
}
|
||||
|
||||
void CppEditorWidget::finalizeInitializationAfterDuplication(TextEditorWidget *other)
|
||||
@@ -271,7 +290,7 @@ void CppEditorWidget::finalizeInitializationAfterDuplication(TextEditorWidget *o
|
||||
|
||||
if (cppEditorWidget->isSemanticInfoValidExceptLocalUses())
|
||||
updateSemanticInfo(cppEditorWidget->semanticInfo());
|
||||
if (d->m_cppEditorOutline)
|
||||
if (d->shouldOfferOutline())
|
||||
d->m_cppEditorOutline->update();
|
||||
const Id selectionKind = CodeWarningsSelection;
|
||||
setExtraSelections(selectionKind, cppEditorWidget->extraSelections(selectionKind));
|
||||
@@ -331,7 +350,7 @@ void CppEditorWidget::selectAll()
|
||||
|
||||
void CppEditorWidget::onCppDocumentUpdated()
|
||||
{
|
||||
if (d->m_cppEditorOutline)
|
||||
if (d->shouldOfferOutline())
|
||||
d->m_cppEditorOutline->update();
|
||||
}
|
||||
|
||||
|
@@ -223,9 +223,9 @@ using SubBreakpoints = const QList<SubBreakpoint>;
|
||||
using BreakHandlerModel = Utils::TreeModel<Utils::TypedTreeItem<BreakpointItem>, BreakpointItem, SubBreakpointItem>;
|
||||
using BreakpointManagerModel = Utils::TreeModel<Utils::TypedTreeItem<GlobalBreakpointItem>, GlobalBreakpointItem>;
|
||||
|
||||
inline uint qHash(const Debugger::Internal::SubBreakpoint &b) { return qHash(b.data()); }
|
||||
inline uint qHash(const Debugger::Internal::Breakpoint &b) { return qHash(b.data()); }
|
||||
inline uint qHash(const Debugger::Internal::GlobalBreakpoint &b) { return qHash(b.data()); }
|
||||
inline auto qHash(const Debugger::Internal::SubBreakpoint &b) { return qHash(b.data()); }
|
||||
inline auto qHash(const Debugger::Internal::Breakpoint &b) { return qHash(b.data()); }
|
||||
inline auto qHash(const Debugger::Internal::GlobalBreakpoint &b) { return qHash(b.data()); }
|
||||
|
||||
class BreakHandler : public BreakHandlerModel
|
||||
{
|
||||
|
@@ -57,6 +57,7 @@
|
||||
#include <utils/stringutils.h>
|
||||
#include <utils/temporaryfile.h>
|
||||
#include <utils/treemodel.h>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QCheckBox>
|
||||
@@ -1045,23 +1046,33 @@ FilePath DockerDevice::symLinkTarget(const FilePath &filePath) const
|
||||
return {};
|
||||
}
|
||||
|
||||
FilePath DockerDevice::searchInPath(const FilePath &filePath) const
|
||||
FilePath DockerDevice::searchInPath(const FilePath &filePath, const FilePaths &additionalDirs) const
|
||||
{
|
||||
QTC_ASSERT(handlesFile(filePath), return {});
|
||||
tryCreateLocalFileAccess();
|
||||
|
||||
const QString path = filePath.path();
|
||||
|
||||
// FIXME: Check whether local search via deviceEnvironment/PATH is faster?
|
||||
CommandLine dcmd{"docker", {"exec", d->m_container, "which", path}};
|
||||
QtcProcess proc;
|
||||
proc.setCommand(dcmd);
|
||||
proc.setWorkingDirectory(QDir::tempPath());
|
||||
proc.start();
|
||||
proc.waitForFinished();
|
||||
|
||||
LOG("Run sync:" << dcmd.toUserOutput() << " result: " << proc.exitCode());
|
||||
if (proc.exitCode() != 0)
|
||||
return {};
|
||||
|
||||
if (proc.exitCode() == 0) {
|
||||
const QString output = proc.stdOut().trimmed();
|
||||
return mapToGlobalPath(FilePath::fromString(output));
|
||||
}
|
||||
|
||||
for (const FilePath &dir : additionalDirs) {
|
||||
const FilePath candidate = dir / filePath.path();
|
||||
if (candidate.exists())
|
||||
return candidate;
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
FilePaths DockerDevice::directoryEntries(const FilePath &filePath,
|
||||
|
@@ -88,7 +88,8 @@ public:
|
||||
bool removeRecursively(const Utils::FilePath &filePath) const override;
|
||||
bool copyFile(const Utils::FilePath &filePath, const Utils::FilePath &target) const override;
|
||||
bool renameFile(const Utils::FilePath &filePath, const Utils::FilePath &target) const override;
|
||||
Utils::FilePath searchInPath(const Utils::FilePath &filePath) const override;
|
||||
Utils::FilePath searchInPath(const Utils::FilePath &filePath,
|
||||
const Utils::FilePaths &additionalDirs) const override;
|
||||
Utils::FilePath symLinkTarget(const Utils::FilePath &filePath) const override;
|
||||
QList<Utils::FilePath> directoryEntries(const Utils::FilePath &filePath,
|
||||
const QStringList &nameFilters,
|
||||
|
@@ -1823,7 +1823,7 @@ bool GitClient::isRemoteCommit(const QString &workingDirectory, const QString &c
|
||||
{
|
||||
QtcProcess proc;
|
||||
vcsFullySynchronousExec(proc, workingDirectory, {"branch", "-r", "--contains", commit}, silentFlags);
|
||||
return proc.rawStdOut().isEmpty();
|
||||
return !proc.rawStdOut().isEmpty();
|
||||
}
|
||||
|
||||
bool GitClient::isFastForwardMerge(const QString &workingDirectory, const QString &branch)
|
||||
|
@@ -33,6 +33,7 @@
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/environment.h>
|
||||
#include <utils/pathchooser.h>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <QFormLayout>
|
||||
#include <QProcess>
|
||||
|
@@ -193,7 +193,7 @@ private:
|
||||
QString m_param;
|
||||
};
|
||||
|
||||
inline int qHash(const ProjectExplorer::Abi &abi)
|
||||
inline auto qHash(const ProjectExplorer::Abi &abi)
|
||||
{
|
||||
int h = abi.architecture()
|
||||
+ (abi.os() << 3)
|
||||
|
@@ -70,7 +70,7 @@ inline bool operator!=(const BuildTargetInfo &ti1, const BuildTargetInfo &ti2)
|
||||
return !(ti1 == ti2);
|
||||
}
|
||||
|
||||
inline uint qHash(const BuildTargetInfo &ti)
|
||||
inline auto qHash(const BuildTargetInfo &ti)
|
||||
{
|
||||
return qHash(ti.displayName) ^ qHash(ti.buildKey);
|
||||
}
|
||||
|
@@ -30,6 +30,7 @@
|
||||
#include <app/app_version.h>
|
||||
|
||||
#include <utils/winutils.h>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDir>
|
||||
|
@@ -29,6 +29,8 @@
|
||||
#include "idevice.h"
|
||||
#include "idevicefactory.h"
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <QPushButton>
|
||||
|
||||
namespace ProjectExplorer {
|
||||
|
@@ -458,10 +458,10 @@ DeviceManager::DeviceManager(bool isInstance) : d(std::make_unique<DeviceManager
|
||||
return device->renameFile(filePath, target);
|
||||
};
|
||||
|
||||
deviceHooks.searchInPath = [](const FilePath &filePath) {
|
||||
deviceHooks.searchInPath = [](const FilePath &filePath, const FilePaths &additionalDirs) {
|
||||
auto device = DeviceManager::deviceForPath(filePath);
|
||||
QTC_ASSERT(device, return FilePath{});
|
||||
return device->searchInPath(filePath);
|
||||
return device->searchInPath(filePath, additionalDirs);
|
||||
};
|
||||
|
||||
deviceHooks.symLinkTarget = [](const FilePath &filePath) {
|
||||
@@ -507,6 +507,12 @@ DeviceManager::DeviceManager(bool isInstance) : d(std::make_unique<DeviceManager
|
||||
return device->osType();
|
||||
};
|
||||
|
||||
deviceHooks.environment = [](const FilePath &filePath) {
|
||||
auto device = DeviceManager::deviceForPath(filePath);
|
||||
QTC_ASSERT(device, return Environment{});
|
||||
return device->systemEnvironment();
|
||||
};
|
||||
|
||||
FilePath::setDeviceFileHooks(deviceHooks);
|
||||
|
||||
DeviceProcessHooks processHooks;
|
||||
|
@@ -28,6 +28,7 @@
|
||||
#include "devicemanager.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <QString>
|
||||
|
||||
|
@@ -28,6 +28,7 @@
|
||||
#include "idevice.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
namespace ProjectExplorer {
|
||||
|
||||
|
@@ -28,6 +28,7 @@
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/treemodel.h>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
using namespace Utils;
|
||||
|
||||
|
@@ -26,6 +26,8 @@
|
||||
#include "devicetestdialog.h"
|
||||
#include "ui_devicetestdialog.h"
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <QBrush>
|
||||
#include <QColor>
|
||||
#include <QFont>
|
||||
|
@@ -311,7 +311,7 @@ bool IDevice::renameFile(const FilePath &filePath, const FilePath &target) const
|
||||
return false;
|
||||
}
|
||||
|
||||
FilePath IDevice::searchInPath(const FilePath &filePath) const
|
||||
FilePath IDevice::searchInPath(const FilePath &filePath, const FilePaths &additionalDirs) const
|
||||
{
|
||||
return Environment::systemEnvironment().searchInPath(filePath.path());
|
||||
}
|
||||
|
@@ -249,7 +249,8 @@ public:
|
||||
virtual bool removeRecursively(const Utils::FilePath &filePath) const;
|
||||
virtual bool copyFile(const Utils::FilePath &filePath, const Utils::FilePath &target) const;
|
||||
virtual bool renameFile(const Utils::FilePath &filePath, const Utils::FilePath &target) const;
|
||||
virtual Utils::FilePath searchInPath(const Utils::FilePath &filePath) const;
|
||||
virtual Utils::FilePath searchInPath(const Utils::FilePath &filePath,
|
||||
const QList<Utils::FilePath> &additionalDirs = {}) const;
|
||||
virtual Utils::FilePath symLinkTarget(const Utils::FilePath &filePath) const;
|
||||
virtual QList<Utils::FilePath> directoryEntries(const Utils::FilePath &filePath,
|
||||
const QStringList &nameFilters,
|
||||
|
@@ -29,6 +29,7 @@
|
||||
|
||||
#include <ssh/sshremoteprocessrunner.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
using namespace QSsh;
|
||||
|
||||
|
@@ -59,7 +59,7 @@ public:
|
||||
HeaderPathType type = HeaderPathType::User;
|
||||
};
|
||||
|
||||
inline uint qHash(const HeaderPath &key, uint seed = 0)
|
||||
inline auto qHash(const HeaderPath &key, uint seed = 0)
|
||||
{
|
||||
return ((qHash(key.path) << 2) | uint(key.type)) ^ seed;
|
||||
}
|
||||
|
@@ -85,7 +85,7 @@ private:
|
||||
};
|
||||
|
||||
inline
|
||||
uint qHash(const Macro ¯o)
|
||||
auto qHash(const Macro ¯o)
|
||||
{
|
||||
using QT_PREPEND_NAMESPACE(qHash);
|
||||
return qHash(macro.key) ^ qHash(macro.value) ^ qHash(int(macro.type));
|
||||
|
@@ -163,13 +163,13 @@ QString ComponentNameDialog::isValid() const
|
||||
|
||||
QString compName = ui->componentNameEdit->text();
|
||||
if (compName.isEmpty() || !compName[0].isUpper())
|
||||
return tr("Invalid component name");
|
||||
return tr("Invalid component name.");
|
||||
|
||||
if (!ui->pathEdit->isValid())
|
||||
return tr("Invalid path");
|
||||
return tr("Invalid path.");
|
||||
|
||||
if (QDir(ui->pathEdit->path()).exists(compName + u".qml"))
|
||||
return tr("Component already exists");
|
||||
return tr("Component already exists.");
|
||||
|
||||
return QString();
|
||||
}
|
||||
|
@@ -148,7 +148,7 @@ ModelManagerInterface::ProjectInfo ModelManager::defaultProjectInfoForProject(
|
||||
projectInfo.tryQmlDump = project && qtVersion->type() == QLatin1String(QtSupport::Constants::DESKTOPQT);
|
||||
projectInfo.qtQmlPath = qtVersion->qmlPath().toFileInfo().canonicalFilePath();
|
||||
projectInfo.qtVersionString = qtVersion->qtVersionString();
|
||||
} else if (!activeKit->value(QtSupport::SuppliesQtQuickImportPath::id(), false).toBool()) {
|
||||
} else if (!activeKit || !activeKit->value(QtSupport::SuppliesQtQuickImportPath::id(), false).toBool()) {
|
||||
projectInfo.qtQmlPath = QFileInfo(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath)).canonicalFilePath();
|
||||
projectInfo.qtVersionString = QLatin1String(qVersion());
|
||||
}
|
||||
|
@@ -76,7 +76,7 @@ inline bool operator!=(const QmlEventLocation &location1, const QmlEventLocation
|
||||
return !(location1 == location2);
|
||||
}
|
||||
|
||||
inline uint qHash(const QmlEventLocation &location)
|
||||
inline auto qHash(const QmlEventLocation &location)
|
||||
{
|
||||
return qHash(location.filename())
|
||||
^ ((location.line() & 0xfff) // 12 bits of line number
|
||||
|
@@ -26,6 +26,7 @@
|
||||
#include "qnxdeviceprocesslist.h"
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <QRegularExpression>
|
||||
#include <QStringList>
|
||||
|
@@ -25,6 +25,8 @@
|
||||
|
||||
#include "qnxdeviceprocesssignaloperation.h"
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
using namespace Qnx;
|
||||
using namespace Qnx::Internal;
|
||||
|
||||
|
@@ -28,6 +28,7 @@
|
||||
|
||||
#include <ssh/sshremoteprocessrunner.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
namespace Qnx {
|
||||
namespace Internal {
|
||||
|
@@ -30,6 +30,7 @@
|
||||
#include "remotelinux_constants.h"
|
||||
|
||||
#include <utils/portlist.h>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
using namespace QSsh;
|
||||
|
@@ -26,6 +26,7 @@
|
||||
#include "remotelinuxcheckforfreediskspaceservice.h"
|
||||
|
||||
#include <ssh/sshremoteprocessrunner.h>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
namespace RemoteLinux {
|
||||
namespace Internal {
|
||||
|
@@ -26,6 +26,7 @@
|
||||
#include "remotelinuxcustomcommanddeployservice.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <ssh/sshremoteprocessrunner.h>
|
||||
|
||||
using namespace QSsh;
|
||||
|
@@ -25,6 +25,8 @@
|
||||
|
||||
#include "remotelinuxkillappservice.h"
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
#
|
||||
namespace RemoteLinux {
|
||||
namespace Internal {
|
||||
class RemoteLinuxKillAppServicePrivate
|
||||
|
@@ -26,6 +26,7 @@
|
||||
#include "remotelinuxpackageinstaller.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <ssh/sshremoteprocessrunner.h>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
|
@@ -28,6 +28,7 @@
|
||||
#include <ssh/sshremoteprocessrunner.h>
|
||||
#include <ssh/sshconnection.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
using namespace RemoteLinux;
|
||||
using namespace ProjectExplorer;
|
||||
|