forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.8'
Conflicts: doc/src/editors/creator-only/creator-code-pasting.qdoc src/plugins/android/androidbuildapkwidget.cpp Change-Id: Iea8b7135643d14ffe49d10b14bedb8fa5ac48063
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -52,6 +52,7 @@ wrapper.sh
|
||||
/src/plugins/**/*.json
|
||||
/src/plugins/coreplugin/ide_version.h
|
||||
/src/libs/qt-breakpad/bin
|
||||
/src/libs/botan/build/
|
||||
app_version.h
|
||||
phony.c
|
||||
|
||||
|
||||
15
dist/changes-4.7.2.md
vendored
15
dist/changes-4.7.2.md
vendored
@@ -7,11 +7,21 @@ you can check out from the public Git repository. For example:
|
||||
git clone git://code.qt.io/qt-creator/qt-creator.git
|
||||
git log --cherry-pick --pretty=oneline origin/v4.7.1..v4.7.2
|
||||
|
||||
General
|
||||
|
||||
* Fixed crash when pressing wrong shortcut for recent projects in Welcome mode
|
||||
(QTCREATORBUG-21302)
|
||||
* Fixed rare crash in file system view
|
||||
|
||||
Editing
|
||||
|
||||
* Fixed that collapsed text no longer showed up in tooltip (QTCREATORBUG-21040)
|
||||
* Fixed crash with generic text completion (QTCREATORBUG-21192)
|
||||
|
||||
Generic Projects
|
||||
|
||||
* Fixed crash when adding file to sub-folder (QTCREATORBUG-21342)
|
||||
|
||||
C++ Support
|
||||
|
||||
* Fixed wrong value of `__cplusplus` define (QTCREATORBUG-20884)
|
||||
@@ -31,6 +41,11 @@ Windows
|
||||
|
||||
* Fixed saving of files when another application blocks atomic save operation
|
||||
(QTCREATORBUG-7668)
|
||||
* Fixed wrongly added empty lines in application output (QTCREATORBUG-21215)
|
||||
|
||||
iOS
|
||||
|
||||
* Fixed issue with detecting iPhone XS (QTCREATORBUG-21291)
|
||||
|
||||
Remote Linux
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 49 KiB |
@@ -387,8 +387,10 @@
|
||||
|
||||
\li Disassemble sections of code.
|
||||
|
||||
\omit
|
||||
\li Create snapshots of the current state of the debugged program
|
||||
and re-examine them later.
|
||||
\endomit
|
||||
|
||||
\endlist
|
||||
|
||||
@@ -605,6 +607,7 @@
|
||||
|
||||
By default, the \uicontrol Registers view is hidden.
|
||||
|
||||
\omit
|
||||
\section2 Creating Snapshots
|
||||
|
||||
A snapshot contains the complete state of the debugged program at a time,
|
||||
@@ -616,7 +619,7 @@
|
||||
Double-click on entries in the \uicontrol {Debugger Perspectives} view to
|
||||
switch between snapshots. The debugger views are updated to reflect the state
|
||||
of the program at time of taking the snapshot.
|
||||
|
||||
\endomit
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
\list
|
||||
\li \uicontrol {Pastebin.Com}
|
||||
\li \uicontrol {Pastecode.Xyz}
|
||||
\li \uicontrol {Paste.KDE.Org}
|
||||
\li \uicontrol {Shared network drives}
|
||||
\endlist
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
{MIME type} of the file to determine which mode and editor to use for
|
||||
opening the file. For example, \QC opens C++ source and header files in
|
||||
the C++ editor, and Qt widget based UI files (.ui) in \QD.
|
||||
For some MIME types, you can change the editor that is used to open the
|
||||
files of that type by default.
|
||||
|
||||
To identify the MIME type of a file, \QC uses matching by pattern and
|
||||
matching by contents. First, \QC looks at the filename to check whether it
|
||||
@@ -94,12 +96,18 @@
|
||||
\note You are recommended not to change the range and priority,
|
||||
because it might cause problems when opening files in \QC.
|
||||
|
||||
\li In \uicontrol Handler, double-click the editor name to display a
|
||||
context-menu where you can select another editor to open the file
|
||||
in by default. The menu is available only if alternative suitable
|
||||
editors are available.
|
||||
|
||||
\li Click \uicontrol OK.
|
||||
|
||||
\endlist
|
||||
|
||||
To revert all the changes you have made to the MIME type definitions,
|
||||
select \uicontrol {Reset All}.
|
||||
To revert the changes you have made to the MIME type definitions,
|
||||
select \uicontrol {Reset MIME Types}. To revert the changes you have
|
||||
made to the default editors, select \uicontrol {Reset Handlers}.
|
||||
|
||||
\note If you now select \uicontrol OK or \uicontrol Apply, you permanently lose all
|
||||
your own patterns and magic headers. The changes are reverted the next
|
||||
|
||||
@@ -200,9 +200,11 @@
|
||||
current working directory. You can specify another location for the file,
|
||||
including a relative or absolute path, as an argument of the command.
|
||||
|
||||
\omit
|
||||
To generate a temporary core file, select \uicontrol {Create Snapshot} in the
|
||||
context menu in the \uicontrol Snapshot view. The core file is deleted when you
|
||||
stop debugging.
|
||||
\endomit
|
||||
|
||||
\section1 Compiler Questions
|
||||
|
||||
@@ -253,8 +255,10 @@
|
||||
the standard output and error output. When you run or debug the
|
||||
application, you can view the output in the \uicontrol{Application Output} pane.
|
||||
|
||||
For console applications that require input, select \uicontrol {Projects > Run
|
||||
Settings > Run in terminal}.
|
||||
For console applications that require input, select \uicontrol Projects >
|
||||
\uicontrol {Run Settings} > \uicontrol {Run in terminal}. To specify the
|
||||
terminal to use, select \uicontrol Tools > \uicontrol Options >
|
||||
\uicontrol Environment > \uicontrol System.
|
||||
|
||||
\b {On Windows:} Output is displayed differently for \e{console
|
||||
applications} and \e{GUI applications}.
|
||||
|
||||
@@ -237,7 +237,9 @@
|
||||
\li Show the file or directory in the file explorer.
|
||||
|
||||
\li Open a terminal window in the selected directory or in the directory
|
||||
that contains the file.
|
||||
that contains the file. To specify the terminal to use on Linux and
|
||||
\macos, select \uicontrol Tools > \uicontrol Options >
|
||||
\uicontrol Environment > \uicontrol System.
|
||||
|
||||
\li Search from the selected directory.
|
||||
|
||||
|
||||
@@ -32,9 +32,13 @@
|
||||
and the working directory to use. The working directory defaults to
|
||||
the directory of the build result.
|
||||
|
||||
For console applications, check the \uicontrol{Run in Terminal} check box.
|
||||
If you need to run with special environment variables set up, you
|
||||
also do it in the run configuration settings.
|
||||
For console applications, check the \uicontrol{Run in terminal} check box.
|
||||
To specify the terminal to use on Linux and \macos, select \uicontrol Tools
|
||||
> \uicontrol Options > \uicontrol Environment > \uicontrol System.
|
||||
|
||||
To run with special environment variables set up, select them in the
|
||||
\uicontrol {Run Environment} section. For more information, see
|
||||
\l {Selecting the Run Environment}.
|
||||
|
||||
\image qtcreator-pprunsettings.png
|
||||
|
||||
|
||||
@@ -203,7 +203,8 @@ SshKeyExchangeReply SshIncomingPacket::extractKeyExchangeReply(const QByteArray
|
||||
throw SshPacketParseException();
|
||||
getHostKeySpecificReplyData(replyData, hostKeyAlgo, replyData.k_s.mid(k_sOffset));
|
||||
|
||||
if (kexAlgo == SshCapabilities::DiffieHellmanGroup1Sha1) {
|
||||
if (kexAlgo == SshCapabilities::DiffieHellmanGroup1Sha1
|
||||
|| kexAlgo == SshCapabilities::DiffieHellmanGroup14Sha1) {
|
||||
replyData.f = SshPacketParser::asBigInt(m_data, &topLevelOffset);
|
||||
} else {
|
||||
QSSH_ASSERT_AND_RETURN_VALUE(kexAlgo.startsWith(SshCapabilities::EcdhKexNamePrefix),
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
QStringList list;
|
||||
QString historyKey;
|
||||
QString historyKeyIsLastItemEmpty;
|
||||
int maxLines = 30;
|
||||
int maxLines = 6;
|
||||
bool isLastItemEmpty = false;
|
||||
};
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ AndroidBuildApkInnerWidget::AndroidBuildApkInnerWidget(AndroidBuildApkStep *step
|
||||
m_step(step)
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
setDisplayName(tr("<b>Build Android APK</b>"));
|
||||
setDisplayName("<b>" + tr("Build Android APK" + "</b>"));
|
||||
setSummaryText(displayName());
|
||||
|
||||
// Target sdk combobox
|
||||
@@ -225,8 +225,8 @@ AndroidBuildApkWidget::AndroidBuildApkWidget(AndroidBuildApkStep *step) :
|
||||
BuildStepConfigWidget(step),
|
||||
m_step(step)
|
||||
{
|
||||
setDisplayName(tr("<b>Build Android APK</b>"));
|
||||
setSummaryText(tr("<b>Build Android APK</b>"));
|
||||
setDisplayName("<b>" + tr("Build Android APK" + "</b>"));
|
||||
setSummaryText("<b>" + tr("Build Android APK" + "</b>"));
|
||||
|
||||
m_extraLibraryListModel = new AndroidExtraLibraryListModel(m_step->target(), this);
|
||||
|
||||
|
||||
@@ -137,10 +137,12 @@ static QString processInformation(const QProcess *proc)
|
||||
|
||||
static QString rcInfo(const TestConfiguration * const config)
|
||||
{
|
||||
QString info = '\n' + TestRunner::tr("Run configuration:") + ' ';
|
||||
QString info;
|
||||
if (config->isDeduced())
|
||||
info += TestRunner::tr("deduced from");
|
||||
return info + " \"" + config->runConfigDisplayName() + '"';
|
||||
info = TestRunner::tr("\nRun configuration: deduced from \"%1\"");
|
||||
else
|
||||
info = TestRunner::tr("\nRun configuration: \"%1\"");
|
||||
return info.arg(config->runConfigDisplayName());
|
||||
}
|
||||
|
||||
static QString constructOmittedDetailsString(const QStringList &omitted)
|
||||
|
||||
@@ -358,9 +358,8 @@ QString ClangAssistProposalItem::fixItText() const
|
||||
{
|
||||
const FixItContainer &fixIt = firstCompletionFixIts().first();
|
||||
return QCoreApplication::translate("ClangCodeModel::ClangAssistProposalItem",
|
||||
"Requires to correct \"%1\" to \"%2\"")
|
||||
.arg(textReplacedByFixit(fixIt))
|
||||
.arg(fixIt.text.toString());
|
||||
"Requires changing \"%1\" to \"%2\"")
|
||||
.arg(textReplacedByFixit(fixIt), fixIt.text.toString());
|
||||
}
|
||||
|
||||
int ClangAssistProposalItem::fixItsShift(const TextDocumentManipulatorInterface &manipulator) const
|
||||
|
||||
@@ -253,7 +253,7 @@ void BackendCommunicator::unsavedFilesUpdatedForUiHeaders()
|
||||
const auto editorSupports = CppModelManager::instance()->abstractEditorSupports();
|
||||
foreach (const AbstractEditorSupport *es, editorSupports) {
|
||||
const QString mappedPath
|
||||
= ModelManagerSupportClang::instance()->dummyUiHeaderOnDiskPath(es->fileName());
|
||||
= ClangModelManagerSupport::instance()->dummyUiHeaderOnDiskPath(es->fileName());
|
||||
unsavedFilesUpdated(mappedPath, es->contents(), es->revision());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ private:
|
||||
void generateCompilationDB();
|
||||
void createCompilationDBButton();
|
||||
|
||||
ModelManagerSupportProviderClang m_modelManagerSupportProvider;
|
||||
ClangModelManagerSupportProvider m_modelManagerSupportProvider;
|
||||
Utils::ParameterAction *m_generateCompilationDBAction = nullptr;
|
||||
QFutureWatcher<void> m_generatorWatcher;
|
||||
#ifdef WITH_TESTS
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace Internal {
|
||||
static ClangProjectSettings &getProjectSettings(ProjectExplorer::Project *project)
|
||||
{
|
||||
QTC_CHECK(project);
|
||||
return ModelManagerSupportClang::instance()->projectSettings(project);
|
||||
return ClangModelManagerSupport::instance()->projectSettings(project);
|
||||
}
|
||||
|
||||
ClangEditorDocumentProcessor::ClangEditorDocumentProcessor(
|
||||
|
||||
@@ -60,14 +60,14 @@
|
||||
using namespace ClangCodeModel;
|
||||
using namespace ClangCodeModel::Internal;
|
||||
|
||||
static ModelManagerSupportClang *m_instance = 0;
|
||||
static ClangModelManagerSupport *m_instance = 0;
|
||||
|
||||
static CppTools::CppModelManager *cppModelManager()
|
||||
{
|
||||
return CppTools::CppModelManager::instance();
|
||||
}
|
||||
|
||||
ModelManagerSupportClang::ModelManagerSupportClang()
|
||||
ClangModelManagerSupport::ClangModelManagerSupport()
|
||||
: m_completionAssistProvider(m_communicator)
|
||||
, m_followSymbol(new ClangFollowSymbol)
|
||||
, m_refactoringEngine(new RefactoringEngine)
|
||||
@@ -82,76 +82,76 @@ ModelManagerSupportClang::ModelManagerSupportClang()
|
||||
|
||||
Core::EditorManager *editorManager = Core::EditorManager::instance();
|
||||
connect(editorManager, &Core::EditorManager::editorOpened,
|
||||
this, &ModelManagerSupportClang::onEditorOpened);
|
||||
this, &ClangModelManagerSupport::onEditorOpened);
|
||||
connect(editorManager, &Core::EditorManager::currentEditorChanged,
|
||||
this, &ModelManagerSupportClang::onCurrentEditorChanged);
|
||||
this, &ClangModelManagerSupport::onCurrentEditorChanged);
|
||||
connect(editorManager, &Core::EditorManager::editorsClosed,
|
||||
this, &ModelManagerSupportClang::onEditorClosed);
|
||||
this, &ClangModelManagerSupport::onEditorClosed);
|
||||
|
||||
CppTools::CppModelManager *modelManager = cppModelManager();
|
||||
connect(modelManager, &CppTools::CppModelManager::abstractEditorSupportContentsUpdated,
|
||||
this, &ModelManagerSupportClang::onAbstractEditorSupportContentsUpdated);
|
||||
this, &ClangModelManagerSupport::onAbstractEditorSupportContentsUpdated);
|
||||
connect(modelManager, &CppTools::CppModelManager::abstractEditorSupportRemoved,
|
||||
this, &ModelManagerSupportClang::onAbstractEditorSupportRemoved);
|
||||
this, &ClangModelManagerSupport::onAbstractEditorSupportRemoved);
|
||||
connect(modelManager, &CppTools::CppModelManager::projectPartsUpdated,
|
||||
this, &ModelManagerSupportClang::onProjectPartsUpdated);
|
||||
this, &ClangModelManagerSupport::onProjectPartsUpdated);
|
||||
connect(modelManager, &CppTools::CppModelManager::projectPartsRemoved,
|
||||
this, &ModelManagerSupportClang::onProjectPartsRemoved);
|
||||
this, &ClangModelManagerSupport::onProjectPartsRemoved);
|
||||
|
||||
auto *sessionManager = ProjectExplorer::SessionManager::instance();
|
||||
connect(sessionManager, &ProjectExplorer::SessionManager::projectAdded,
|
||||
this, &ModelManagerSupportClang::onProjectAdded);
|
||||
this, &ClangModelManagerSupport::onProjectAdded);
|
||||
connect(sessionManager, &ProjectExplorer::SessionManager::aboutToRemoveProject,
|
||||
this, &ModelManagerSupportClang::onAboutToRemoveProject);
|
||||
this, &ClangModelManagerSupport::onAboutToRemoveProject);
|
||||
|
||||
CppTools::CppCodeModelSettings *settings = CppTools::codeModelSettings().data();
|
||||
connect(settings, &CppTools::CppCodeModelSettings::clangDiagnosticConfigsInvalidated,
|
||||
this, &ModelManagerSupportClang::onDiagnosticConfigsInvalidated);
|
||||
this, &ClangModelManagerSupport::onDiagnosticConfigsInvalidated);
|
||||
}
|
||||
|
||||
ModelManagerSupportClang::~ModelManagerSupportClang()
|
||||
ClangModelManagerSupport::~ClangModelManagerSupport()
|
||||
{
|
||||
QTC_CHECK(m_projectSettings.isEmpty());
|
||||
m_instance = 0;
|
||||
}
|
||||
|
||||
CppTools::CppCompletionAssistProvider *ModelManagerSupportClang::completionAssistProvider()
|
||||
CppTools::CppCompletionAssistProvider *ClangModelManagerSupport::completionAssistProvider()
|
||||
{
|
||||
return &m_completionAssistProvider;
|
||||
}
|
||||
|
||||
TextEditor::BaseHoverHandler *ModelManagerSupportClang::createHoverHandler()
|
||||
TextEditor::BaseHoverHandler *ClangModelManagerSupport::createHoverHandler()
|
||||
{
|
||||
return new Internal::ClangHoverHandler;
|
||||
}
|
||||
|
||||
CppTools::FollowSymbolInterface &ModelManagerSupportClang::followSymbolInterface()
|
||||
CppTools::FollowSymbolInterface &ClangModelManagerSupport::followSymbolInterface()
|
||||
{
|
||||
return *m_followSymbol;
|
||||
}
|
||||
|
||||
CppTools::RefactoringEngineInterface &ModelManagerSupportClang::refactoringEngineInterface()
|
||||
CppTools::RefactoringEngineInterface &ClangModelManagerSupport::refactoringEngineInterface()
|
||||
{
|
||||
return *m_refactoringEngine;
|
||||
}
|
||||
|
||||
std::unique_ptr<CppTools::AbstractOverviewModel> ModelManagerSupportClang::createOverviewModel()
|
||||
std::unique_ptr<CppTools::AbstractOverviewModel> ClangModelManagerSupport::createOverviewModel()
|
||||
{
|
||||
return std::make_unique<OverviewModel>();
|
||||
}
|
||||
|
||||
void ModelManagerSupportClang::setBackendJobsPostponed(bool postponed)
|
||||
void ClangModelManagerSupport::setBackendJobsPostponed(bool postponed)
|
||||
{
|
||||
m_communicator.setBackendJobsPostponed(postponed);
|
||||
}
|
||||
|
||||
CppTools::BaseEditorDocumentProcessor *ModelManagerSupportClang::createEditorDocumentProcessor(
|
||||
CppTools::BaseEditorDocumentProcessor *ClangModelManagerSupport::createEditorDocumentProcessor(
|
||||
TextEditor::TextDocument *baseTextDocument)
|
||||
{
|
||||
return new ClangEditorDocumentProcessor(m_communicator, baseTextDocument);
|
||||
}
|
||||
|
||||
void ModelManagerSupportClang::onCurrentEditorChanged(Core::IEditor *editor)
|
||||
void ClangModelManagerSupport::onCurrentEditorChanged(Core::IEditor *editor)
|
||||
{
|
||||
m_communicator.documentVisibilityChanged();
|
||||
|
||||
@@ -165,60 +165,60 @@ void ModelManagerSupportClang::onCurrentEditorChanged(Core::IEditor *editor)
|
||||
processor->generateTaskHubIssues();
|
||||
}
|
||||
|
||||
void ModelManagerSupportClang::connectTextDocumentToTranslationUnit(TextEditor::TextDocument *textDocument)
|
||||
void ClangModelManagerSupport::connectTextDocumentToTranslationUnit(TextEditor::TextDocument *textDocument)
|
||||
{
|
||||
// Handle externally changed documents
|
||||
connect(textDocument, &Core::IDocument::aboutToReload,
|
||||
this, &ModelManagerSupportClang::onCppDocumentAboutToReloadOnTranslationUnit,
|
||||
this, &ClangModelManagerSupport::onCppDocumentAboutToReloadOnTranslationUnit,
|
||||
Qt::UniqueConnection);
|
||||
connect(textDocument, &Core::IDocument::reloadFinished,
|
||||
this, &ModelManagerSupportClang::onCppDocumentReloadFinishedOnTranslationUnit,
|
||||
this, &ClangModelManagerSupport::onCppDocumentReloadFinishedOnTranslationUnit,
|
||||
Qt::UniqueConnection);
|
||||
|
||||
// Handle changes from e.g. refactoring actions
|
||||
connectToTextDocumentContentsChangedForTranslationUnit(textDocument);
|
||||
}
|
||||
|
||||
void ModelManagerSupportClang::connectTextDocumentToUnsavedFiles(TextEditor::TextDocument *textDocument)
|
||||
void ClangModelManagerSupport::connectTextDocumentToUnsavedFiles(TextEditor::TextDocument *textDocument)
|
||||
{
|
||||
// Handle externally changed documents
|
||||
connect(textDocument, &Core::IDocument::aboutToReload,
|
||||
this, &ModelManagerSupportClang::onCppDocumentAboutToReloadOnUnsavedFile,
|
||||
this, &ClangModelManagerSupport::onCppDocumentAboutToReloadOnUnsavedFile,
|
||||
Qt::UniqueConnection);
|
||||
connect(textDocument, &Core::IDocument::reloadFinished,
|
||||
this, &ModelManagerSupportClang::onCppDocumentReloadFinishedOnUnsavedFile,
|
||||
this, &ClangModelManagerSupport::onCppDocumentReloadFinishedOnUnsavedFile,
|
||||
Qt::UniqueConnection);
|
||||
|
||||
// Handle changes from e.g. refactoring actions
|
||||
connectToTextDocumentContentsChangedForUnsavedFile(textDocument);
|
||||
}
|
||||
|
||||
void ModelManagerSupportClang::connectToTextDocumentContentsChangedForTranslationUnit(
|
||||
void ClangModelManagerSupport::connectToTextDocumentContentsChangedForTranslationUnit(
|
||||
TextEditor::TextDocument *textDocument)
|
||||
{
|
||||
connect(textDocument, &TextEditor::TextDocument::contentsChangedWithPosition,
|
||||
this, &ModelManagerSupportClang::onCppDocumentContentsChangedOnTranslationUnit,
|
||||
this, &ClangModelManagerSupport::onCppDocumentContentsChangedOnTranslationUnit,
|
||||
Qt::UniqueConnection);
|
||||
}
|
||||
|
||||
void ModelManagerSupportClang::connectToTextDocumentContentsChangedForUnsavedFile(
|
||||
void ClangModelManagerSupport::connectToTextDocumentContentsChangedForUnsavedFile(
|
||||
TextEditor::TextDocument *textDocument)
|
||||
{
|
||||
connect(textDocument, &TextEditor::TextDocument::contentsChangedWithPosition,
|
||||
this, &ModelManagerSupportClang::onCppDocumentContentsChangedOnUnsavedFile,
|
||||
this, &ClangModelManagerSupport::onCppDocumentContentsChangedOnUnsavedFile,
|
||||
Qt::UniqueConnection);
|
||||
}
|
||||
|
||||
void ModelManagerSupportClang::connectToWidgetsMarkContextMenuRequested(QWidget *editorWidget)
|
||||
void ClangModelManagerSupport::connectToWidgetsMarkContextMenuRequested(QWidget *editorWidget)
|
||||
{
|
||||
const auto widget = qobject_cast<TextEditor::TextEditorWidget *>(editorWidget);
|
||||
if (widget) {
|
||||
connect(widget, &TextEditor::TextEditorWidget::markContextMenuRequested,
|
||||
this, &ModelManagerSupportClang::onTextMarkContextMenuRequested);
|
||||
this, &ClangModelManagerSupport::onTextMarkContextMenuRequested);
|
||||
}
|
||||
}
|
||||
|
||||
bool ModelManagerSupportClang::eventFilter(QObject *obj, QEvent *e)
|
||||
bool ClangModelManagerSupport::eventFilter(QObject *obj, QEvent *e)
|
||||
{
|
||||
if (obj == QApplication::instance() && e->type() == QEvent::ApplicationStateChange) {
|
||||
switch (QApplication::applicationState()) {
|
||||
@@ -232,7 +232,7 @@ bool ModelManagerSupportClang::eventFilter(QObject *obj, QEvent *e)
|
||||
return false;
|
||||
}
|
||||
|
||||
void ModelManagerSupportClang::onEditorOpened(Core::IEditor *editor)
|
||||
void ClangModelManagerSupport::onEditorOpened(Core::IEditor *editor)
|
||||
{
|
||||
QTC_ASSERT(editor, return);
|
||||
Core::IDocument *document = editor->document();
|
||||
@@ -247,19 +247,19 @@ void ModelManagerSupportClang::onEditorOpened(Core::IEditor *editor)
|
||||
}
|
||||
}
|
||||
|
||||
void ModelManagerSupportClang::onEditorClosed(const QList<Core::IEditor *> &)
|
||||
void ClangModelManagerSupport::onEditorClosed(const QList<Core::IEditor *> &)
|
||||
{
|
||||
m_communicator.documentVisibilityChanged();
|
||||
}
|
||||
|
||||
void ModelManagerSupportClang::onCppDocumentAboutToReloadOnTranslationUnit()
|
||||
void ClangModelManagerSupport::onCppDocumentAboutToReloadOnTranslationUnit()
|
||||
{
|
||||
TextEditor::TextDocument *textDocument = qobject_cast<TextEditor::TextDocument *>(sender());
|
||||
disconnect(textDocument, &TextEditor::TextDocument::contentsChangedWithPosition,
|
||||
this, &ModelManagerSupportClang::onCppDocumentContentsChangedOnTranslationUnit);
|
||||
this, &ClangModelManagerSupport::onCppDocumentContentsChangedOnTranslationUnit);
|
||||
}
|
||||
|
||||
void ModelManagerSupportClang::onCppDocumentReloadFinishedOnTranslationUnit(bool success)
|
||||
void ClangModelManagerSupport::onCppDocumentReloadFinishedOnTranslationUnit(bool success)
|
||||
{
|
||||
if (success) {
|
||||
TextEditor::TextDocument *textDocument = qobject_cast<TextEditor::TextDocument *>(sender());
|
||||
@@ -277,7 +277,7 @@ void clearDiagnosticFixIts(const QString &filePath)
|
||||
}
|
||||
}
|
||||
|
||||
void ModelManagerSupportClang::onCppDocumentContentsChangedOnTranslationUnit(int position,
|
||||
void ClangModelManagerSupport::onCppDocumentContentsChangedOnTranslationUnit(int position,
|
||||
int /*charsRemoved*/,
|
||||
int /*charsAdded*/)
|
||||
{
|
||||
@@ -290,14 +290,14 @@ void ModelManagerSupportClang::onCppDocumentContentsChangedOnTranslationUnit(int
|
||||
clearDiagnosticFixIts(document->filePath().toString());
|
||||
}
|
||||
|
||||
void ModelManagerSupportClang::onCppDocumentAboutToReloadOnUnsavedFile()
|
||||
void ClangModelManagerSupport::onCppDocumentAboutToReloadOnUnsavedFile()
|
||||
{
|
||||
TextEditor::TextDocument *textDocument = qobject_cast<TextEditor::TextDocument *>(sender());
|
||||
disconnect(textDocument, &TextEditor::TextDocument::contentsChangedWithPosition,
|
||||
this, &ModelManagerSupportClang::onCppDocumentContentsChangedOnUnsavedFile);
|
||||
this, &ClangModelManagerSupport::onCppDocumentContentsChangedOnUnsavedFile);
|
||||
}
|
||||
|
||||
void ModelManagerSupportClang::onCppDocumentReloadFinishedOnUnsavedFile(bool success)
|
||||
void ClangModelManagerSupport::onCppDocumentReloadFinishedOnUnsavedFile(bool success)
|
||||
{
|
||||
if (success) {
|
||||
TextEditor::TextDocument *textDocument = qobject_cast<TextEditor::TextDocument *>(sender());
|
||||
@@ -306,13 +306,13 @@ void ModelManagerSupportClang::onCppDocumentReloadFinishedOnUnsavedFile(bool suc
|
||||
}
|
||||
}
|
||||
|
||||
void ModelManagerSupportClang::onCppDocumentContentsChangedOnUnsavedFile()
|
||||
void ClangModelManagerSupport::onCppDocumentContentsChangedOnUnsavedFile()
|
||||
{
|
||||
Core::IDocument *document = qobject_cast<Core::IDocument *>(sender());
|
||||
m_communicator.unsavedFilesUpdated(document);
|
||||
}
|
||||
|
||||
void ModelManagerSupportClang::onAbstractEditorSupportContentsUpdated(const QString &filePath,
|
||||
void ClangModelManagerSupport::onAbstractEditorSupportContentsUpdated(const QString &filePath,
|
||||
const QByteArray &content)
|
||||
{
|
||||
QTC_ASSERT(!filePath.isEmpty(), return);
|
||||
@@ -321,7 +321,7 @@ void ModelManagerSupportClang::onAbstractEditorSupportContentsUpdated(const QStr
|
||||
m_communicator.unsavedFilesUpdated(mappedPath, content, 0);
|
||||
}
|
||||
|
||||
void ModelManagerSupportClang::onAbstractEditorSupportRemoved(const QString &filePath)
|
||||
void ClangModelManagerSupport::onAbstractEditorSupportRemoved(const QString &filePath)
|
||||
{
|
||||
QTC_ASSERT(!filePath.isEmpty(), return);
|
||||
|
||||
@@ -358,7 +358,7 @@ static TextEditor::AssistInterface createAssistInterface(TextEditor::TextEditorW
|
||||
TextEditor::IdleEditor);
|
||||
}
|
||||
|
||||
void ModelManagerSupportClang::onTextMarkContextMenuRequested(TextEditor::TextEditorWidget *widget,
|
||||
void ClangModelManagerSupport::onTextMarkContextMenuRequested(TextEditor::TextEditorWidget *widget,
|
||||
int lineNumber,
|
||||
QMenu *menu)
|
||||
{
|
||||
@@ -402,7 +402,7 @@ static void updateProcessors(const ClangEditorDocumentProcessors &processors)
|
||||
modelManager->updateCppEditorDocuments(/*projectsUpdated=*/ false);
|
||||
}
|
||||
|
||||
void ModelManagerSupportClang::onProjectAdded(ProjectExplorer::Project *project)
|
||||
void ClangModelManagerSupport::onProjectAdded(ProjectExplorer::Project *project)
|
||||
{
|
||||
QTC_ASSERT(!m_projectSettings.value(project), return);
|
||||
|
||||
@@ -414,7 +414,7 @@ void ModelManagerSupportClang::onProjectAdded(ProjectExplorer::Project *project)
|
||||
m_projectSettings.insert(project, settings);
|
||||
}
|
||||
|
||||
void ModelManagerSupportClang::onAboutToRemoveProject(ProjectExplorer::Project *project)
|
||||
void ClangModelManagerSupport::onAboutToRemoveProject(ProjectExplorer::Project *project)
|
||||
{
|
||||
ClangProjectSettings * const settings = m_projectSettings.value(project);
|
||||
QTC_ASSERT(settings, return);
|
||||
@@ -422,7 +422,7 @@ void ModelManagerSupportClang::onAboutToRemoveProject(ProjectExplorer::Project *
|
||||
delete settings;
|
||||
}
|
||||
|
||||
void ModelManagerSupportClang::onProjectPartsUpdated(ProjectExplorer::Project *project)
|
||||
void ClangModelManagerSupport::onProjectPartsUpdated(ProjectExplorer::Project *project)
|
||||
{
|
||||
QTC_ASSERT(project, return);
|
||||
const CppTools::ProjectInfo projectInfo = cppModelManager()->projectInfo(project);
|
||||
@@ -434,7 +434,7 @@ void ModelManagerSupportClang::onProjectPartsUpdated(ProjectExplorer::Project *p
|
||||
onProjectPartsRemoved(projectPartIds);
|
||||
}
|
||||
|
||||
void ModelManagerSupportClang::onProjectPartsRemoved(const QStringList &projectPartIds)
|
||||
void ClangModelManagerSupport::onProjectPartsRemoved(const QStringList &projectPartIds)
|
||||
{
|
||||
if (!projectPartIds.isEmpty())
|
||||
reinitializeBackendDocuments(projectPartIds);
|
||||
@@ -448,7 +448,7 @@ static ClangEditorDocumentProcessors clangProcessorsWithDiagnosticConfig(
|
||||
});
|
||||
}
|
||||
|
||||
void ModelManagerSupportClang::onDiagnosticConfigsInvalidated(const QVector<Core::Id> &configIds)
|
||||
void ClangModelManagerSupport::onDiagnosticConfigsInvalidated(const QVector<Core::Id> &configIds)
|
||||
{
|
||||
updateProcessors(clangProcessorsWithDiagnosticConfig(configIds));
|
||||
}
|
||||
@@ -461,7 +461,7 @@ clangProcessorsWithProjectParts(const QStringList &projectPartIds)
|
||||
});
|
||||
}
|
||||
|
||||
void ModelManagerSupportClang::reinitializeBackendDocuments(const QStringList &projectPartIds)
|
||||
void ClangModelManagerSupport::reinitializeBackendDocuments(const QStringList &projectPartIds)
|
||||
{
|
||||
const auto processors = clangProcessorsWithProjectParts(projectPartIds);
|
||||
foreach (ClangEditorDocumentProcessor *processor, processors) {
|
||||
@@ -471,45 +471,45 @@ void ModelManagerSupportClang::reinitializeBackendDocuments(const QStringList &p
|
||||
}
|
||||
}
|
||||
|
||||
ModelManagerSupportClang *ModelManagerSupportClang::instance()
|
||||
ClangModelManagerSupport *ClangModelManagerSupport::instance()
|
||||
{
|
||||
return m_instance;
|
||||
}
|
||||
|
||||
BackendCommunicator &ModelManagerSupportClang::communicator()
|
||||
BackendCommunicator &ClangModelManagerSupport::communicator()
|
||||
{
|
||||
return m_communicator;
|
||||
}
|
||||
|
||||
QString ModelManagerSupportClang::dummyUiHeaderOnDiskPath(const QString &filePath) const
|
||||
QString ClangModelManagerSupport::dummyUiHeaderOnDiskPath(const QString &filePath) const
|
||||
{
|
||||
return m_uiHeaderOnDiskManager.mapPath(filePath);
|
||||
}
|
||||
|
||||
ClangProjectSettings &ModelManagerSupportClang::projectSettings(
|
||||
ClangProjectSettings &ClangModelManagerSupport::projectSettings(
|
||||
ProjectExplorer::Project *project) const
|
||||
{
|
||||
return *m_projectSettings.value(project);
|
||||
}
|
||||
|
||||
QString ModelManagerSupportClang::dummyUiHeaderOnDiskDirPath() const
|
||||
QString ClangModelManagerSupport::dummyUiHeaderOnDiskDirPath() const
|
||||
{
|
||||
return m_uiHeaderOnDiskManager.directoryPath();
|
||||
}
|
||||
|
||||
QString ModelManagerSupportProviderClang::id() const
|
||||
QString ClangModelManagerSupportProvider::id() const
|
||||
{
|
||||
return QLatin1String(Constants::CLANG_MODELMANAGERSUPPORT_ID);
|
||||
}
|
||||
|
||||
QString ModelManagerSupportProviderClang::displayName() const
|
||||
QString ClangModelManagerSupportProvider::displayName() const
|
||||
{
|
||||
//: Display name
|
||||
return QCoreApplication::translate("ClangCodeModel::Internal::ModelManagerSupport",
|
||||
"Clang");
|
||||
}
|
||||
|
||||
CppTools::ModelManagerSupport::Ptr ModelManagerSupportProviderClang::createModelManagerSupport()
|
||||
CppTools::ModelManagerSupport::Ptr ClangModelManagerSupportProvider::createModelManagerSupport()
|
||||
{
|
||||
return CppTools::ModelManagerSupport::Ptr(new ModelManagerSupportClang);
|
||||
return CppTools::ModelManagerSupport::Ptr(new ClangModelManagerSupport);
|
||||
}
|
||||
|
||||
@@ -55,15 +55,15 @@ namespace Internal {
|
||||
|
||||
class ClangProjectSettings;
|
||||
|
||||
class ModelManagerSupportClang:
|
||||
class ClangModelManagerSupport:
|
||||
public QObject,
|
||||
public CppTools::ModelManagerSupport
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ModelManagerSupportClang();
|
||||
~ModelManagerSupportClang() override;
|
||||
ClangModelManagerSupport();
|
||||
~ClangModelManagerSupport() override;
|
||||
|
||||
CppTools::CppCompletionAssistProvider *completionAssistProvider() override;
|
||||
TextEditor::BaseHoverHandler *createHoverHandler() override;
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
|
||||
ClangProjectSettings &projectSettings(ProjectExplorer::Project *project) const;
|
||||
|
||||
static ModelManagerSupportClang *instance();
|
||||
static ClangModelManagerSupport *instance();
|
||||
|
||||
private:
|
||||
bool eventFilter(QObject *obj, QEvent *e) override;
|
||||
@@ -131,7 +131,7 @@ private:
|
||||
QHash<ProjectExplorer::Project *, ClangProjectSettings *> m_projectSettings;
|
||||
};
|
||||
|
||||
class ModelManagerSupportProviderClang : public CppTools::ModelManagerSupportProvider
|
||||
class ClangModelManagerSupportProvider : public CppTools::ModelManagerSupportProvider
|
||||
{
|
||||
public:
|
||||
QString id() const override;
|
||||
|
||||
@@ -53,7 +53,7 @@ static Core::Id configIdForProject(ClangProjectSettings &projectSettings)
|
||||
}
|
||||
|
||||
ClangProjectSettingsWidget::ClangProjectSettingsWidget(ProjectExplorer::Project *project)
|
||||
: m_projectSettings(ModelManagerSupportClang::instance()->projectSettings(project))
|
||||
: m_projectSettings(ClangModelManagerSupport::instance()->projectSettings(project))
|
||||
{
|
||||
m_ui.setupUi(this);
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
private:
|
||||
void addDummyUiHeaderOnDiskIncludePath()
|
||||
{
|
||||
const QString path = ModelManagerSupportClang::instance()->dummyUiHeaderOnDiskDirPath();
|
||||
const QString path = ClangModelManagerSupport::instance()->dummyUiHeaderOnDiskDirPath();
|
||||
if (!path.isEmpty()) {
|
||||
add("-I");
|
||||
add(QDir::toNativeSeparators(path));
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="leftMargin">
|
||||
|
||||
@@ -197,10 +197,10 @@ bool CorePlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
.arg(Constants::IDE_DISPLAY_NAME),
|
||||
[]() { return QVariant(Utils::HostOsInfo::isAnyUnixHost()).toString(); });
|
||||
expander->registerVariable("HostOs:PathListSeparator",
|
||||
tr("Return the path list separator for the platform."),
|
||||
tr("The path list separator for the platform."),
|
||||
[]() { return QString(Utils::HostOsInfo::pathListSeparator()); });
|
||||
expander->registerVariable("HostOs:ExecutableSuffix",
|
||||
tr("Return the platform executable suffix."),
|
||||
tr("The platform executable suffix."),
|
||||
[]() { return QString(Utils::HostOsInfo::withExecutableSuffix("")); });
|
||||
expander->registerVariable("IDE:ResourcePath",
|
||||
tr("The directory where %1 finds its pre-installed resources.")
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/variablechooser.h>
|
||||
|
||||
#include <debugger/analyzer/analyzericons.h>
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QDir>
|
||||
#include <QFormLayout>
|
||||
@@ -164,6 +166,8 @@ CppcheckOptionsPage::CppcheckOptionsPage(CppcheckTool &tool, CppcheckTrigger &tr
|
||||
setId(Constants::OPTIONS_PAGE_ID);
|
||||
setDisplayName(tr("Cppcheck"));
|
||||
setCategory("T.Analyzer");
|
||||
setDisplayCategory(QCoreApplication::translate("Analyzer", "Analyzer"));
|
||||
setCategoryIcon(Analyzer::Icons::SETTINGSCATEGORY_ANALYZER);
|
||||
|
||||
CppcheckOptions options;
|
||||
if (Utils::HostOsInfo::isAnyUnixHost()) {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "cppcompletionassist.h"
|
||||
#include "cppmodelmanagersupportinternal.h"
|
||||
#include "cppbuiltinmodelmanagersupport.h"
|
||||
#include "cppfollowsymbolundercursor.h"
|
||||
#include "cpphoverhandler.h"
|
||||
#include "cppoverviewmodel.h"
|
||||
@@ -38,60 +38,60 @@
|
||||
using namespace CppTools;
|
||||
using namespace CppTools::Internal;
|
||||
|
||||
QString ModelManagerSupportProviderInternal::id() const
|
||||
QString BuiltinModelManagerSupportProvider::id() const
|
||||
{
|
||||
return QLatin1String("CppTools.BuiltinCodeModel");
|
||||
}
|
||||
|
||||
QString ModelManagerSupportProviderInternal::displayName() const
|
||||
QString BuiltinModelManagerSupportProvider::displayName() const
|
||||
{
|
||||
return QCoreApplication::translate("ModelManagerSupportInternal::displayName",
|
||||
"%1 Built-in").arg(Core::Constants::IDE_DISPLAY_NAME);
|
||||
}
|
||||
|
||||
ModelManagerSupport::Ptr ModelManagerSupportProviderInternal::createModelManagerSupport()
|
||||
ModelManagerSupport::Ptr BuiltinModelManagerSupportProvider::createModelManagerSupport()
|
||||
{
|
||||
return ModelManagerSupport::Ptr(new ModelManagerSupportInternal);
|
||||
return ModelManagerSupport::Ptr(new BuiltinModelManagerSupport);
|
||||
}
|
||||
|
||||
ModelManagerSupportInternal::ModelManagerSupportInternal()
|
||||
BuiltinModelManagerSupport::BuiltinModelManagerSupport()
|
||||
: m_completionAssistProvider(new InternalCompletionAssistProvider),
|
||||
m_followSymbol(new FollowSymbolUnderCursor),
|
||||
m_refactoringEngine(new CppRefactoringEngine)
|
||||
{
|
||||
}
|
||||
|
||||
ModelManagerSupportInternal::~ModelManagerSupportInternal()
|
||||
BuiltinModelManagerSupport::~BuiltinModelManagerSupport()
|
||||
{
|
||||
}
|
||||
|
||||
BaseEditorDocumentProcessor *ModelManagerSupportInternal::createEditorDocumentProcessor(
|
||||
BaseEditorDocumentProcessor *BuiltinModelManagerSupport::createEditorDocumentProcessor(
|
||||
TextEditor::TextDocument *baseTextDocument)
|
||||
{
|
||||
return new BuiltinEditorDocumentProcessor(baseTextDocument);
|
||||
}
|
||||
|
||||
CppCompletionAssistProvider *ModelManagerSupportInternal::completionAssistProvider()
|
||||
CppCompletionAssistProvider *BuiltinModelManagerSupport::completionAssistProvider()
|
||||
{
|
||||
return m_completionAssistProvider.data();
|
||||
}
|
||||
|
||||
TextEditor::BaseHoverHandler *ModelManagerSupportInternal::createHoverHandler()
|
||||
TextEditor::BaseHoverHandler *BuiltinModelManagerSupport::createHoverHandler()
|
||||
{
|
||||
return new CppHoverHandler;
|
||||
}
|
||||
|
||||
FollowSymbolInterface &ModelManagerSupportInternal::followSymbolInterface()
|
||||
FollowSymbolInterface &BuiltinModelManagerSupport::followSymbolInterface()
|
||||
{
|
||||
return *m_followSymbol;
|
||||
}
|
||||
|
||||
RefactoringEngineInterface &ModelManagerSupportInternal::refactoringEngineInterface()
|
||||
RefactoringEngineInterface &BuiltinModelManagerSupport::refactoringEngineInterface()
|
||||
{
|
||||
return *m_refactoringEngine;
|
||||
}
|
||||
|
||||
std::unique_ptr<AbstractOverviewModel> ModelManagerSupportInternal::createOverviewModel()
|
||||
std::unique_ptr<AbstractOverviewModel> BuiltinModelManagerSupport::createOverviewModel()
|
||||
{
|
||||
return std::make_unique<CppTools::OverviewModel>();
|
||||
}
|
||||
@@ -32,13 +32,13 @@
|
||||
namespace CppTools {
|
||||
namespace Internal {
|
||||
|
||||
class ModelManagerSupportInternal: public ModelManagerSupport
|
||||
class BuiltinModelManagerSupport: public ModelManagerSupport
|
||||
{
|
||||
Q_DISABLE_COPY(ModelManagerSupportInternal)
|
||||
Q_DISABLE_COPY(BuiltinModelManagerSupport)
|
||||
|
||||
public:
|
||||
ModelManagerSupportInternal();
|
||||
virtual ~ModelManagerSupportInternal();
|
||||
BuiltinModelManagerSupport();
|
||||
virtual ~BuiltinModelManagerSupport();
|
||||
|
||||
CppCompletionAssistProvider *completionAssistProvider() final;
|
||||
TextEditor::BaseHoverHandler *createHoverHandler() final;
|
||||
@@ -55,7 +55,7 @@ private:
|
||||
QScopedPointer<RefactoringEngineInterface> m_refactoringEngine;
|
||||
};
|
||||
|
||||
class ModelManagerSupportProviderInternal : public ModelManagerSupportProvider
|
||||
class BuiltinModelManagerSupportProvider : public ModelManagerSupportProvider
|
||||
{
|
||||
public:
|
||||
QString id() const override;
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "cppindexingsupport.h"
|
||||
#include "cpplocatordata.h"
|
||||
#include "cpplocatorfilter.h"
|
||||
#include "cppmodelmanagersupportinternal.h"
|
||||
#include "cppbuiltinmodelmanagersupport.h"
|
||||
#include "cppqtstyleindenter.h"
|
||||
#include "cpprefactoringchanges.h"
|
||||
#include "cpprefactoringengine.h"
|
||||
@@ -502,7 +502,7 @@ void CppModelManager::initCppTools()
|
||||
void CppModelManager::initializeBuiltinModelManagerSupport()
|
||||
{
|
||||
d->m_builtinModelManagerSupport
|
||||
= ModelManagerSupportProviderInternal().createModelManagerSupport();
|
||||
= BuiltinModelManagerSupportProvider().createModelManagerSupport();
|
||||
d->m_activeModelManagerSupport = d->m_builtinModelManagerSupport;
|
||||
d->m_refactoringEngines[RefactoringEngineType::BuiltIn] =
|
||||
&d->m_activeModelManagerSupport->refactoringEngineInterface();
|
||||
|
||||
@@ -48,7 +48,6 @@ HEADERS += \
|
||||
cpplocatorfilter.h \
|
||||
cppmodelmanager.h \
|
||||
cppmodelmanagersupport.h \
|
||||
cppmodelmanagersupportinternal.h \
|
||||
cppoverviewmodel.h \
|
||||
cpppointerdeclarationformatter.h \
|
||||
cppprojectfile.h \
|
||||
@@ -101,7 +100,8 @@ HEADERS += \
|
||||
wrappablelineedit.h \
|
||||
usages.h \
|
||||
cpptools_clangtidychecks.h \
|
||||
cppmodelmanagerinterface.h
|
||||
cppmodelmanagerinterface.h \
|
||||
cppbuiltinmodelmanagersupport.h
|
||||
|
||||
SOURCES += \
|
||||
abstracteditorsupport.cpp \
|
||||
@@ -146,7 +146,6 @@ SOURCES += \
|
||||
cpplocatorfilter.cpp \
|
||||
cppmodelmanager.cpp \
|
||||
cppmodelmanagersupport.cpp \
|
||||
cppmodelmanagersupportinternal.cpp \
|
||||
cppoverviewmodel.cpp \
|
||||
cpppointerdeclarationformatter.cpp \
|
||||
cppprojectfile.cpp \
|
||||
@@ -187,7 +186,8 @@ SOURCES += \
|
||||
compileroptionsbuilder.cpp \
|
||||
cppprojectfilecategorizer.cpp \
|
||||
cppprojectpartchooser.cpp \
|
||||
wrappablelineedit.cpp
|
||||
wrappablelineedit.cpp \
|
||||
cppbuiltinmodelmanagersupport.cpp
|
||||
|
||||
FORMS += \
|
||||
clangdiagnosticconfigswidget.ui \
|
||||
|
||||
@@ -56,6 +56,8 @@ Project {
|
||||
"clazychecks.ui",
|
||||
"compileroptionsbuilder.cpp",
|
||||
"compileroptionsbuilder.h",
|
||||
"cppbuiltinmodelmanagersupport.cpp",
|
||||
"cppbuiltinmodelmanagersupport.h",
|
||||
"cppcanonicalsymbol.cpp",
|
||||
"cppcanonicalsymbol.h",
|
||||
"cppchecksymbols.cpp",
|
||||
@@ -123,8 +125,6 @@ Project {
|
||||
"cppmodelmanager.h",
|
||||
"cppmodelmanagersupport.cpp",
|
||||
"cppmodelmanagersupport.h",
|
||||
"cppmodelmanagersupportinternal.cpp",
|
||||
"cppmodelmanagersupportinternal.h",
|
||||
"cppoverviewmodel.cpp",
|
||||
"cppoverviewmodel.h",
|
||||
"cpppointerdeclarationformatter.cpp",
|
||||
@@ -215,7 +215,7 @@ Project {
|
||||
"tidychecks.ui",
|
||||
"typehierarchybuilder.cpp",
|
||||
"typehierarchybuilder.h",
|
||||
"usages.h"
|
||||
"usages.h",
|
||||
]
|
||||
|
||||
Group {
|
||||
|
||||
@@ -99,7 +99,7 @@ const char SYMBOLS_FIND_FILTER_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("CppTools", "C
|
||||
// CLANG_VERSION here because it might denote a version that was not yet
|
||||
// released (e.g. 6.0.1, but only 6.0.0 was released).
|
||||
constexpr const char TIDY_DOCUMENTATION_URL_TEMPLATE[]
|
||||
= "https://releases.llvm.org/6.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/%1.html";
|
||||
= "https://releases.llvm.org/7.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/%1.html";
|
||||
|
||||
} // namespace Constants
|
||||
} // namespace CppTools
|
||||
|
||||
@@ -1331,12 +1331,6 @@ void BreakpointItem::setEnabled(bool on)
|
||||
adjustMarker();
|
||||
}
|
||||
|
||||
void BreakHandler::setBreakpointEnabled(const Breakpoint &bp, bool on)
|
||||
{
|
||||
bp->setEnabled(on);
|
||||
requestBreakpointUpdate(bp);
|
||||
}
|
||||
|
||||
void DebuggerEngine::notifyBreakpointInsertProceeding(const Breakpoint &bp)
|
||||
{
|
||||
QTC_ASSERT(bp, return);
|
||||
|
||||
@@ -257,7 +257,6 @@ public:
|
||||
// Convenience.
|
||||
void setWatchpointAtAddress(quint64 address, unsigned size);
|
||||
void setWatchpointAtExpression(const QString &exp);
|
||||
void setBreakpointEnabled(const Breakpoint &bp, bool on);
|
||||
|
||||
void updateDisassemblerMarker(const Breakpoint &bp);
|
||||
void removeDisassemblerMarker(const Breakpoint &bp);
|
||||
|
||||
@@ -743,12 +743,17 @@ static inline bool isWatchIName(const QString &iname)
|
||||
|
||||
bool CdbEngine::hasCapability(unsigned cap) const
|
||||
{
|
||||
return cap & (DisassemblerCapability | RegisterCapability
|
||||
return cap & (DisassemblerCapability
|
||||
| RegisterCapability
|
||||
| ShowMemoryCapability
|
||||
|WatchpointByAddressCapability|JumpToLineCapability|AddWatcherCapability|WatchWidgetsCapability
|
||||
| WatchpointByAddressCapability
|
||||
| JumpToLineCapability
|
||||
| AddWatcherCapability
|
||||
| WatchWidgetsCapability
|
||||
| ReloadModuleCapability
|
||||
| BreakOnThrowAndCatchCapability // Sort-of: Can break on throw().
|
||||
| BreakConditionCapability|TracePointCapability
|
||||
| BreakIndividualLocationsCapability
|
||||
| BreakModuleCapability
|
||||
| CreateFullBacktraceCapability
|
||||
| OperateByInstructionCapability
|
||||
@@ -832,6 +837,7 @@ void CdbEngine::handleDoInterruptInferior(const QString &errorMessage)
|
||||
|
||||
void CdbEngine::doInterruptInferior(const InterruptCallback &callback)
|
||||
{
|
||||
const bool requestInterrupt = m_stopMode == NoStopRequested;
|
||||
if (callback) {
|
||||
m_interrupCallbacks.push_back(callback);
|
||||
if (!m_initialSessionIdleHandled)
|
||||
@@ -842,6 +848,8 @@ void CdbEngine::doInterruptInferior(const InterruptCallback &callback)
|
||||
m_stopMode = Interrupt;
|
||||
}
|
||||
|
||||
if (!requestInterrupt)
|
||||
return; // we already requested a stop no need to interrupt twice
|
||||
showMessage(QString("Interrupting process %1...").arg(inferiorPid()), LogMisc);
|
||||
QTC_ASSERT(!m_signalOperation, notifyInferiorStopFailed(); return);
|
||||
QTC_ASSERT(device(), notifyInferiorRunFailed(); return);
|
||||
@@ -2489,7 +2497,7 @@ void CdbEngine::insertBreakpoint(const Breakpoint &bp)
|
||||
BreakpointParameters parameters = bp->requestedParameters();
|
||||
const auto handleBreakInsertCB = [this, bp](const DebuggerResponse &r) { handleBreakInsert(r, bp); };
|
||||
BreakpointParameters response = parameters;
|
||||
auto responseId = QString::number(breakPointIdToCdbId(bp));
|
||||
const QString responseId = breakPointCdbId(bp);
|
||||
QScopedPointer<BreakpointCorrectionContext> lineCorrection(
|
||||
new BreakpointCorrectionContext(m_codeModelSnapshot, CppTools::CppModelManager::instance()->workingCopy()));
|
||||
if (!m_autoBreakPointCorrection
|
||||
@@ -2536,7 +2544,7 @@ void CdbEngine::updateBreakpoint(const Breakpoint &bp)
|
||||
BreakpointParameters parameters = bp->requestedParameters();
|
||||
const auto handleBreakInsertCB = [this, bp](const DebuggerResponse &r) { handleBreakInsert(r, bp); };
|
||||
BreakpointParameters response = parameters;
|
||||
auto responseId = QString::number(breakPointIdToCdbId(bp));
|
||||
const QString responseId = breakPointCdbId(bp);
|
||||
notifyBreakpointChangeProceeding(bp);
|
||||
if (debugBreakpoints)
|
||||
qDebug("Changing %d:\n %s\nTo %s\n", bp->modelId(),
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
<item>
|
||||
<widget class="QGroupBox" name="exceptions">
|
||||
<property name="title">
|
||||
<string>Task Entries for Exceptions </string>
|
||||
<string>Add Exceptions to Issues View</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
|
||||
@@ -128,25 +128,14 @@ static BreakpointParameters fixWinMSVCBreakpoint(const BreakpointParameters &p)
|
||||
return p;
|
||||
}
|
||||
|
||||
int breakPointIdToCdbId(const Breakpoint &bp)
|
||||
QString breakPointCdbId(const Breakpoint &bp)
|
||||
{
|
||||
// return cdbBreakPointStartId + bp.majorPart() * cdbBreakPointIdMinorPart + bp.minorPart();
|
||||
static int bpId = 1;
|
||||
if (!bp->responseId().isEmpty())
|
||||
return bp->responseId().toInt();
|
||||
return cdbBreakPointStartId + bp->modelId() * cdbBreakPointIdMinorPart;
|
||||
return bp->responseId();
|
||||
return QString::number(cdbBreakPointStartId + (bpId++) * cdbBreakPointIdMinorPart);
|
||||
}
|
||||
|
||||
//static int cdbIdToBreakpointModel(int cdbid)
|
||||
//{
|
||||
// if (cdbid >= cdbBreakPointStartId) {
|
||||
// int major = (cdbid - cdbBreakPointStartId) / cdbBreakPointIdMinorPart;
|
||||
// int minor = cdbid % cdbBreakPointIdMinorPart;
|
||||
// (void) minor;
|
||||
// return major;
|
||||
// }
|
||||
// return 0;
|
||||
//}
|
||||
|
||||
QString cdbAddBreakpointCommand(const BreakpointParameters &bpIn,
|
||||
const QList<QPair<QString, QString> > &sourcePathMapping,
|
||||
const QString &responseId,
|
||||
@@ -212,11 +201,11 @@ QString cdbAddBreakpointCommand(const BreakpointParameters &bpIn,
|
||||
QString cdbClearBreakpointCommand(const Breakpoint &bp)
|
||||
{
|
||||
// FIME: Check
|
||||
// const int firstBreakPoint = breakPointIdToCdbId(id);
|
||||
// const int firstBreakPoint = breakPointCdbId(id);
|
||||
// if (id.isMinor())
|
||||
// return "bc " + QString::number(firstBreakPoint);
|
||||
// If this is a major break point we also want to delete all sub break points
|
||||
const int firstBreakPoint = cdbBreakPointStartId + bp->modelId() * cdbBreakPointIdMinorPart;
|
||||
const int firstBreakPoint = bp->responseId().toInt();
|
||||
const int lastBreakPoint = firstBreakPoint + cdbBreakPointIdMinorPart - 1;
|
||||
return "bc " + QString::number(firstBreakPoint) + '-' + QString::number(lastBreakPoint);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ QString cdbSourcePathMapping(QString fileName,
|
||||
enum { cdbBreakPointStartId = 100000,
|
||||
cdbBreakPointIdMinorPart = 100};
|
||||
|
||||
int breakPointIdToCdbId(const Breakpoint &bp);
|
||||
QString breakPointCdbId(const Breakpoint &bp);
|
||||
|
||||
// Convert breakpoint in CDB syntax (applying source path mappings using native paths).
|
||||
QString cdbAddBreakpointCommand(const BreakpointParameters &d,
|
||||
|
||||
@@ -1261,11 +1261,13 @@ void DebuggerEnginePrivate::setInitialActionStates()
|
||||
m_recordForReverseOperationAction.setCheckable(true);
|
||||
m_recordForReverseOperationAction.setChecked(false);
|
||||
m_recordForReverseOperationAction.setIcon(Icons::RECORD_OFF.icon());
|
||||
m_recordForReverseOperationAction.setToolTip(tr(
|
||||
"<html><head/><body><p>Record information to enable stepping backwards.</p><p>"
|
||||
"<b>Note:</b> This feature is very slow and unstable on the GDB side. "
|
||||
m_recordForReverseOperationAction.setToolTip(QString("<html><head/><body><p>%1</p><p>"
|
||||
"<b>%2</b>%3</p></body></html>").arg(
|
||||
tr("Record information to enable stepping backwards."),
|
||||
tr("Note: "),
|
||||
tr("This feature is very slow and unstable on the GDB side. "
|
||||
"It exhibits unpredictable behavior when going backwards over system "
|
||||
"calls and is very likely to destroy your debugging session.</p></body></html>"));
|
||||
"calls and is very likely to destroy your debugging session.")));
|
||||
|
||||
m_operateInReverseDirectionAction.setCheckable(true);
|
||||
m_operateInReverseDirectionAction.setChecked(false);
|
||||
@@ -1847,7 +1849,7 @@ void DebuggerEngine::handleBeginOfRecordingReached()
|
||||
|
||||
void DebuggerEngine::handleRecordingFailed()
|
||||
{
|
||||
showStatusMessage(tr("Reverse-execution recording failed.."));
|
||||
showStatusMessage(tr("Reverse-execution recording failed."));
|
||||
d->m_operateInReverseDirectionAction.setChecked(false);
|
||||
d->m_recordForReverseOperationAction.setChecked(false);
|
||||
d->updateReverseActions();
|
||||
|
||||
@@ -238,9 +238,10 @@ void MergeTool::readData()
|
||||
} else if (m_line.startsWith("Hit return")) {
|
||||
QMessageBox::warning(
|
||||
Core::ICore::dialogParent(), tr("Merge Tool"),
|
||||
tr("<html><body><p>Merge tool is not configured.</p>\n"
|
||||
"<p>Run git config --global merge.tool <tool> to configure it, "
|
||||
"then try again</p></body></html>"));
|
||||
QString("<html><body><p>%1</p>\n<p>%2</p></body></html>").arg(
|
||||
tr("Merge tool is not configured."),
|
||||
tr("Run git config --global merge.tool <tool> "
|
||||
"to configure it, then try again.")));
|
||||
m_process->kill();
|
||||
} else if (m_line.endsWith('\n')) {
|
||||
// Skip unidentified lines
|
||||
|
||||
@@ -658,7 +658,7 @@ void BaseClient::intializeCallback(const InitializeResponse &initResponse)
|
||||
if (optional<ResponseError<InitializeError>> error = initResponse.error()) {
|
||||
if (error.value().data().has_value()
|
||||
&& error.value().data().value().retry().value_or(false)) {
|
||||
const QString title(tr("Language Server \"%1\" Initialize Error"));
|
||||
const QString title(tr("Language Server \"%1\" Initialize Error").arg(m_displayName));
|
||||
auto result = QMessageBox::warning(Core::ICore::dialogParent(),
|
||||
title,
|
||||
error.value().message(),
|
||||
@@ -813,7 +813,7 @@ void StdIOClient::sendData(const QByteArray &data)
|
||||
void StdIOClient::onProcessFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
||||
{
|
||||
if (exitStatus == QProcess::CrashExit)
|
||||
setError(tr("Crashed with exit code %1 : %2").arg(exitCode).arg(m_process.error()));
|
||||
setError(tr("Crashed with exit code %1: %2").arg(exitCode, m_process.error()));
|
||||
emit finished();
|
||||
}
|
||||
|
||||
|
||||
@@ -372,6 +372,7 @@ void LanguageClientCompletionAssistProcessor::handleCompletionResponse(
|
||||
proposal->m_document = m_document;
|
||||
proposal->m_pos = m_pos;
|
||||
proposal->setFragile(true);
|
||||
proposal->setSupportsPrefix(false);
|
||||
setAsyncProposalAvailable(proposal);
|
||||
qCDebug(LOGLSPCOMPLETION) << QTime::currentTime() << " : "
|
||||
<< items.count() << " completions handled";
|
||||
|
||||
@@ -373,13 +373,25 @@ FolderNavigationWidget::FolderNavigationWidget(QWidget *parent) : QWidget(parent
|
||||
connect(m_listView, &QAbstractItemView::activated, this, [this](const QModelIndex &index) {
|
||||
openItem(m_sortProxyModel->mapToSource(index));
|
||||
});
|
||||
// use QueuedConnection for updating crumble path, because that can scroll, which doesn't
|
||||
// work well when done directly in currentChanged (the wrong item can get highlighted)
|
||||
// Delay updating crumble path by event loop cylce, because that can scroll, which doesn't
|
||||
// work well when done directly in currentChanged (the wrong item can get highlighted).
|
||||
// We cannot use Qt::QueuedConnection directly, because the QModelIndex could get invalidated
|
||||
// in the meantime, so use a queued invokeMethod instead.
|
||||
connect(m_listView->selectionModel(),
|
||||
&QItemSelectionModel::currentChanged,
|
||||
this,
|
||||
&FolderNavigationWidget::setCrumblePath,
|
||||
Qt::QueuedConnection);
|
||||
[this](const QModelIndex &index) {
|
||||
const QModelIndex sourceIndex = m_sortProxyModel->mapToSource(index);
|
||||
const auto filePath = Utils::FileName::fromString(
|
||||
m_fileSystemModel->filePath(sourceIndex));
|
||||
// QTimer::singleShot only posts directly onto the event loop if you use the SLOT("...")
|
||||
// notation, so using a singleShot with a lambda would flicker
|
||||
// QTimer::singleShot(0, this, [this, filePath]() { setCrumblePath(filePath); });
|
||||
QMetaObject::invokeMethod(this,
|
||||
"setCrumblePath",
|
||||
Qt::QueuedConnection,
|
||||
Q_ARG(Utils::FileName, filePath));
|
||||
});
|
||||
connect(m_crumbLabel, &Utils::FileCrumbLabel::pathClicked, [this](const Utils::FileName &path) {
|
||||
const QModelIndex rootIndex = m_sortProxyModel->mapToSource(m_listView->rootIndex());
|
||||
const QModelIndex fileIndex = m_fileSystemModel->index(path.toString());
|
||||
@@ -623,7 +635,7 @@ void FolderNavigationWidget::selectFile(const Utils::FileName &filePath)
|
||||
} else {
|
||||
m_listView->scrollTo(fileIndex);
|
||||
}
|
||||
setCrumblePath(fileIndex);
|
||||
setCrumblePath(filePath);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -699,12 +711,12 @@ void FolderNavigationWidget::createNewFolder(const QModelIndex &parent)
|
||||
m_listView->edit(index);
|
||||
}
|
||||
|
||||
void FolderNavigationWidget::setCrumblePath(const QModelIndex &index)
|
||||
void FolderNavigationWidget::setCrumblePath(const Utils::FileName &filePath)
|
||||
{
|
||||
const QModelIndex sourceIndex = m_sortProxyModel->mapToSource(index);
|
||||
const QModelIndex index = m_fileSystemModel->index(filePath.toString());
|
||||
const int width = m_crumbLabel->width();
|
||||
const int previousHeight = m_crumbLabel->immediateHeightForWidth(width);
|
||||
m_crumbLabel->setPath(Utils::FileName::fromString(m_fileSystemModel->filePath(sourceIndex)));
|
||||
m_crumbLabel->setPath(filePath);
|
||||
const int currentHeight = m_crumbLabel->immediateHeightForWidth(width);
|
||||
const int diff = currentHeight - previousHeight;
|
||||
if (diff != 0 && m_crumbLabel->isVisible()) {
|
||||
|
||||
@@ -118,6 +118,9 @@ public:
|
||||
protected:
|
||||
void contextMenuEvent(QContextMenuEvent *ev) override;
|
||||
|
||||
private slots:
|
||||
void setCrumblePath(const Utils::FileName &filePath);
|
||||
|
||||
private:
|
||||
bool rootAutoSynchronization() const;
|
||||
void setRootAutoSynchronization(bool sync);
|
||||
@@ -131,7 +134,6 @@ private:
|
||||
QStringList projectsInDirectory(const QModelIndex &index) const;
|
||||
void openProjectsInDirectory(const QModelIndex &index);
|
||||
void createNewFolder(const QModelIndex &parent);
|
||||
void setCrumblePath(const QModelIndex &index);
|
||||
|
||||
Core::IContext *m_context = nullptr;
|
||||
Utils::NavigationTreeView *m_listView = nullptr;
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
|
||||
#include "jsonwizardfactory.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
|
||||
#include <QJsonDocument>
|
||||
@@ -246,6 +248,12 @@ void ProjectExplorer::ProjectExplorerPlugin::testJsonWizardsComboBox()
|
||||
QCOMPARE(qPrintable(disabledComboBox->currentText()), "fgh");
|
||||
}
|
||||
|
||||
static const char *iconInsideResource(const QString &relativePathToIcon)
|
||||
{
|
||||
const QDir resourcePath(Core::ICore::resourcePath());
|
||||
return resourcePath.filePath(relativePathToIcon).toLocal8Bit().data();
|
||||
}
|
||||
|
||||
void ProjectExplorer::ProjectExplorerPlugin::testJsonWizardsIconList()
|
||||
{
|
||||
QString errorMessage;
|
||||
@@ -255,8 +263,7 @@ void ProjectExplorer::ProjectExplorerPlugin::testJsonWizardsIconList()
|
||||
QJsonObject{
|
||||
{"trKey", "item no1"},
|
||||
{"condition", true},
|
||||
{"icon", "../share/qtcreator/templates/wizards/qtquickstyleicons/default.png"}
|
||||
|
||||
{"icon", iconInsideResource("templates/wizards/qtquickstyleicons/default.png")}
|
||||
},
|
||||
QJsonObject{
|
||||
{"trKey", "item no2"},
|
||||
@@ -268,7 +275,7 @@ void ProjectExplorer::ProjectExplorerPlugin::testJsonWizardsIconList()
|
||||
{"trKey", "item no3"},
|
||||
{"condition", true},
|
||||
{"trToolTip", "MyToolTip"},
|
||||
{"icon", "../share/qtcreator/templates/wizards/qtquickstyleicons/default.png"}
|
||||
{"icon", iconInsideResource("templates/wizards/qtquickstyleicons/default.png")}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ bool QmakeMakeStep::init(QList<const BuildStep *> &earlierSteps)
|
||||
}
|
||||
}
|
||||
|
||||
Utils::QtcProcess::addArgs(&args, userArguments());
|
||||
Utils::QtcProcess::addArgs(&args, allArguments());
|
||||
if (bc->fileNodeBuild() && subProFile) {
|
||||
QString objectsDir = subProFile->objectsDirectory();
|
||||
if (objectsDir.isEmpty()) {
|
||||
|
||||
@@ -278,7 +278,7 @@ QmlProjectRunConfiguration::QmlProjectRunConfiguration(Target *target, Id id)
|
||||
{
|
||||
addAspect<QmlProjectEnvironmentAspect>(target);
|
||||
m_qmlViewerAspect = addAspect<BaseStringAspect>();
|
||||
m_qmlViewerAspect->setLabelText(tr("QML viewer:"));
|
||||
m_qmlViewerAspect->setLabelText(tr("QML Viewer:"));
|
||||
m_qmlViewerAspect->setPlaceHolderText(executable());
|
||||
m_qmlViewerAspect->setDisplayStyle(BaseStringAspect::LineEditDisplay);
|
||||
|
||||
|
||||
@@ -440,7 +440,7 @@ void CodeAssistantPrivate::notifyChange()
|
||||
QTC_ASSERT(m_proposal, return);
|
||||
if (m_editorWidget->position() < m_proposal->basePosition()) {
|
||||
destroyContext();
|
||||
} else if (!m_proposal->isFragile()) {
|
||||
} else if (m_proposal->supportsPrefix()) {
|
||||
m_proposalWidget->updateProposal(
|
||||
m_editorWidget->textAt(m_proposal->basePosition(),
|
||||
m_editorWidget->position() - m_proposal->basePosition()));
|
||||
|
||||
@@ -90,6 +90,11 @@ bool IAssistProposal::isFragile() const
|
||||
return m_isFragile;
|
||||
}
|
||||
|
||||
bool IAssistProposal::supportsPrefix() const
|
||||
{
|
||||
return m_supportsPrefix;
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn bool TextEditor::IAssistProposal::isCorrective() const
|
||||
|
||||
@@ -120,6 +125,11 @@ void IAssistProposal::setFragile(bool fragile)
|
||||
m_isFragile = fragile;
|
||||
}
|
||||
|
||||
void IAssistProposal::setSupportsPrefix(bool supportsPrefix)
|
||||
{
|
||||
m_supportsPrefix = supportsPrefix;
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn IAssistModel *TextEditor::IAssistProposal::model() const
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ public:
|
||||
|
||||
int basePosition() const;
|
||||
bool isFragile() const;
|
||||
bool supportsPrefix() const;
|
||||
virtual bool hasItemsToPropose(const QString &, AssistReason) const { return true; }
|
||||
virtual bool isCorrective(TextEditorWidget *editorWidget) const;
|
||||
virtual void makeCorrection(TextEditorWidget *editorWidget);
|
||||
@@ -50,9 +51,11 @@ public:
|
||||
virtual IAssistProposalWidget *createWidget() const = 0;
|
||||
|
||||
void setFragile(bool fragile);
|
||||
void setSupportsPrefix(bool supportsPrefix);
|
||||
protected:
|
||||
int m_basePosition;
|
||||
bool m_isFragile = false;
|
||||
bool m_supportsPrefix = true;
|
||||
};
|
||||
|
||||
} // TextEditor
|
||||
|
||||
@@ -388,8 +388,7 @@ void Visualization::populateScene()
|
||||
ratioPercentString.append(QLocale::system().percent());
|
||||
const int hiddenFunctions = d->m_model->sourceModel()->rowCount() - d->m_model->rowCount();
|
||||
text = tr("All functions with an inclusive cost ratio higher than %1 (%2 are hidden)")
|
||||
.arg(ratioPercentString)
|
||||
.arg(hiddenFunctions);
|
||||
.arg(ratioPercentString, hiddenFunctions);
|
||||
}
|
||||
|
||||
const qreal height = sceneHeight * (costs.isEmpty() ? 1.0 : 0.1);
|
||||
|
||||
@@ -423,6 +423,7 @@ public:
|
||||
void requestDeviceInfo(const QString &deviceId, int timeout);
|
||||
QStringList errors();
|
||||
void addError(QString errorMsg);
|
||||
QString deviceId(AMDeviceRef device);
|
||||
void addDevice(AMDeviceRef device);
|
||||
void removeDevice(AMDeviceRef device);
|
||||
void checkPendingLookups();
|
||||
@@ -654,11 +655,18 @@ void IosDeviceManagerPrivate::addError(QString errorMsg)
|
||||
emit q->errorMsg(errorMsg);
|
||||
}
|
||||
|
||||
void IosDeviceManagerPrivate::addDevice(AMDeviceRef device)
|
||||
QString IosDeviceManagerPrivate::deviceId(AMDeviceRef device)
|
||||
{
|
||||
CFStringRef s = m_lib.deviceCopyDeviceIdentifier(device);
|
||||
QString devId = QString::fromCFString(s);
|
||||
// remove dashes as a hotfix for QTCREATORBUG-21291
|
||||
const auto id = QString::fromCFString(s).remove('-');
|
||||
if (s) CFRelease(s);
|
||||
return id;
|
||||
}
|
||||
|
||||
void IosDeviceManagerPrivate::addDevice(AMDeviceRef device)
|
||||
{
|
||||
const QString devId = deviceId(device);
|
||||
CFRetain(device);
|
||||
|
||||
DeviceInterfaceType interfaceType = static_cast<DeviceInterfaceType>(lib()->deviceGetInterfaceType(device));
|
||||
@@ -703,10 +711,7 @@ void IosDeviceManagerPrivate::addDevice(AMDeviceRef device)
|
||||
|
||||
void IosDeviceManagerPrivate::removeDevice(AMDeviceRef device)
|
||||
{
|
||||
CFStringRef s = m_lib.deviceCopyDeviceIdentifier(device);
|
||||
QString devId = QString::fromCFString(s);
|
||||
if (s)
|
||||
CFRelease(s);
|
||||
const QString devId = deviceId(device);
|
||||
if (debugAll)
|
||||
qDebug() << "removeDevice " << devId;
|
||||
if (m_devices.contains(devId)) {
|
||||
|
||||
@@ -192,7 +192,7 @@ void tst_TestCore::initTestCase()
|
||||
// Load plugins
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
const QString pluginPath = QTCREATORDIR "/bin/Qt Creator.app/Contents/PlugIns/QtCreator/QmlDesigner";
|
||||
const QString pluginPath = QTCREATORDIR "/bin/Qt Creator.app/Contents/PlugIns/QmlDesigner";
|
||||
#else
|
||||
const QString pluginPath = QTCREATORDIR "/lib/qtcreator/plugins/qmldesigner";
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user