-
diff --git a/src/plugins/debugger/cdb/cdbparsehelpers.cpp b/src/plugins/debugger/cdb/cdbparsehelpers.cpp
index f91ef452618..58047ce12fe 100644
--- a/src/plugins/debugger/cdb/cdbparsehelpers.cpp
+++ b/src/plugins/debugger/cdb/cdbparsehelpers.cpp
@@ -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 > &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);
}
diff --git a/src/plugins/debugger/cdb/cdbparsehelpers.h b/src/plugins/debugger/cdb/cdbparsehelpers.h
index 73b480b69e3..6bf0efa160b 100644
--- a/src/plugins/debugger/cdb/cdbparsehelpers.h
+++ b/src/plugins/debugger/cdb/cdbparsehelpers.h
@@ -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,
diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp
index 301a2801beb..75aa213b508 100644
--- a/src/plugins/debugger/debuggerengine.cpp
+++ b/src/plugins/debugger/debuggerengine.cpp
@@ -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(
- "
Record information to enable stepping backwards.
"
- "Note: 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.
"));
+ m_recordForReverseOperationAction.setToolTip(QString(" %1
"
+ "%2%3
").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.")));
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();
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index 449842e0b9e..bf41147fad4 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -1963,7 +1963,7 @@ void DebuggerPluginPrivate::requestContextMenu(TextEditorWidget *widget,
}
// Edit existing breakpoint.
- act = menu->addAction(tr("Edit Breakpoint ..."));
+ act = menu->addAction(tr("Edit Breakpoint..."));
connect(act, &QAction::triggered, [gbp] {
BreakpointManager::editBreakpoint(gbp, ICore::dialogParent());
});
diff --git a/src/plugins/git/mergetool.cpp b/src/plugins/git/mergetool.cpp
index 8a224f09a7d..f0f03e4ffc2 100644
--- a/src/plugins/git/mergetool.cpp
+++ b/src/plugins/git/mergetool.cpp
@@ -238,9 +238,10 @@ void MergeTool::readData()
} else if (m_line.startsWith("Hit return")) {
QMessageBox::warning(
Core::ICore::dialogParent(), tr("Merge Tool"),
- tr("Merge tool is not configured.
\n"
- "Run git config --global merge.tool <tool> to configure it, "
- "then try again
"));
+ QString("%1
\n%2
").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
diff --git a/src/plugins/ios/iosbuildsettingswidget.cpp b/src/plugins/ios/iosbuildsettingswidget.cpp
index 8b417ab3905..f7c90b3aa9a 100644
--- a/src/plugins/ios/iosbuildsettingswidget.cpp
+++ b/src/plugins/ios/iosbuildsettingswidget.cpp
@@ -126,7 +126,7 @@ void IosBuildSettingsWidget::setDefaultSigningIdentfier(const QString &identifie
} else {
// Reset to default
ui->m_signEntityCombo->setCurrentIndex(0);
- qCDebug(iosSettingsLog) << "Can not find default"
+ qCDebug(iosSettingsLog) << "Cannot find default"
<< (ui->m_autoSignCheckbox->isChecked() ? "team": "provisioning profile")
<< ". Identifier: " << identifier;
}
diff --git a/src/plugins/ios/simulatorcontrol.cpp b/src/plugins/ios/simulatorcontrol.cpp
index f3f048d02e1..ebe9ece83f4 100644
--- a/src/plugins/ios/simulatorcontrol.cpp
+++ b/src/plugins/ios/simulatorcontrol.cpp
@@ -107,7 +107,7 @@ static bool launchSimulator(const QString &simUdid) {
return runSimCtlCommand(QStringList({"boot", simUdid}), nullptr);
}
} else {
- qCDebug(simulatorLog) << "Can not start Simulator device."
+ qCDebug(simulatorLog) << "Cannot start Simulator device."
<< "Error probing Simulator.app instance";
return false;
}
@@ -438,7 +438,7 @@ void SimulatorControlPrivate::startSimulator(QFutureInterface> 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();
}
diff --git a/src/plugins/languageclient/languageclientcodeassist.cpp b/src/plugins/languageclient/languageclientcodeassist.cpp
index 4a813889f9b..497d9596b06 100644
--- a/src/plugins/languageclient/languageclientcodeassist.cpp
+++ b/src/plugins/languageclient/languageclientcodeassist.cpp
@@ -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";
diff --git a/src/plugins/projectexplorer/buildconfiguration.h b/src/plugins/projectexplorer/buildconfiguration.h
index a368fe49099..95161bd6d79 100644
--- a/src/plugins/projectexplorer/buildconfiguration.h
+++ b/src/plugins/projectexplorer/buildconfiguration.h
@@ -127,7 +127,7 @@ protected:
~IBuildConfigurationFactory() override;
public:
- // The priority is negative if this factory can not create anything for the target.
+ // The priority is negative if this factory cannot create anything for the target.
// It is 0 for the "default" factory that wants to handle the target.
// Add 100 for each specialization.
virtual int priority(const Target *parent) const;
diff --git a/src/plugins/projectexplorer/foldernavigationwidget.cpp b/src/plugins/projectexplorer/foldernavigationwidget.cpp
index 1b6abf740c3..b58b9300b83 100644
--- a/src/plugins/projectexplorer/foldernavigationwidget.cpp
+++ b/src/plugins/projectexplorer/foldernavigationwidget.cpp
@@ -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()) {
diff --git a/src/plugins/projectexplorer/foldernavigationwidget.h b/src/plugins/projectexplorer/foldernavigationwidget.h
index f10f69d595d..5c8a2e24f6a 100644
--- a/src/plugins/projectexplorer/foldernavigationwidget.h
+++ b/src/plugins/projectexplorer/foldernavigationwidget.h
@@ -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;
diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp
index 394d4a26ae3..0f2060b840d 100644
--- a/src/plugins/projectexplorer/gcctoolchain.cpp
+++ b/src/plugins/projectexplorer/gcctoolchain.cpp
@@ -360,7 +360,7 @@ static Utils::FileName findLocalCompiler(const Utils::FileName &compilerPath,
// Find the "real" compiler if icecc, distcc or similar are in use. Ignore ccache, since that
// is local already.
- // Get the path to the compiler, ignoring direct calls to icecc and distcc as we can not
+ // Get the path to the compiler, ignoring direct calls to icecc and distcc as we cannot
// do anything about those.
const Utils::FileName compilerDir = compilerPath.parentDir();
const QString compilerDirString = compilerDir.toString();
diff --git a/src/plugins/projectexplorer/gnumakeparser.cpp b/src/plugins/projectexplorer/gnumakeparser.cpp
index 92c49a020a7..2b9c0820ccd 100644
--- a/src/plugins/projectexplorer/gnumakeparser.cpp
+++ b/src/plugins/projectexplorer/gnumakeparser.cpp
@@ -180,7 +180,7 @@ void GnuMakeParser::taskAdded(const Task &task, int linkedLines, int skippedLine
if (possibleFiles.size() == 1)
editable.file = Utils::FileName(possibleFiles.first());
// Let the Makestep apply additional heuristics (based on
- // files in ther project) if we can not uniquely
+ // files in ther project) if we cannot uniquely
// identify the file!
}
diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizard.cpp b/src/plugins/projectexplorer/jsonwizard/jsonwizard.cpp
index 894fadcfa45..fb0de4a3293 100644
--- a/src/plugins/projectexplorer/jsonwizard/jsonwizard.cpp
+++ b/src/plugins/projectexplorer/jsonwizard/jsonwizard.cpp
@@ -181,7 +181,7 @@ QVariant JsonWizard::value(const QString &n) const
if (v.isValid())
return v;
if (hasField(n))
- return field(n); // Can not contain macros!
+ return field(n); // Cannot contain macros!
return QVariant();
}
diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizard_test.cpp b/src/plugins/projectexplorer/jsonwizard/jsonwizard_test.cpp
index 1b8b84d8c81..890291f7015 100644
--- a/src/plugins/projectexplorer/jsonwizard/jsonwizard_test.cpp
+++ b/src/plugins/projectexplorer/jsonwizard/jsonwizard_test.cpp
@@ -25,6 +25,8 @@
#include "jsonwizardfactory.h"
+#include
+
#include
#include
@@ -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")}
}
});
diff --git a/src/plugins/projectexplorer/osparser.cpp b/src/plugins/projectexplorer/osparser.cpp
index acd4d3d6337..d492d72f801 100644
--- a/src/plugins/projectexplorer/osparser.cpp
+++ b/src/plugins/projectexplorer/osparser.cpp
@@ -52,7 +52,7 @@ void OsParser::stdOutput(const QString &line)
if (Utils::HostOsInfo::isWindowsHost()) {
const QString trimmed = line.trimmed();
if (trimmed == QLatin1String("The process cannot access the file because it is being used by another process.")) {
- addTask(Task(Task::Error, tr("The process can not access the file because it is being used by another process.\n"
+ addTask(Task(Task::Error, tr("The process cannot access the file because it is being used by another process.\n"
"Please close all running instances of your application before starting a build."),
Utils::FileName(), -1, Constants::TASK_CATEGORY_COMPILE));
m_hasFatalError = true;
diff --git a/src/plugins/projectexplorer/userfileaccessor.cpp b/src/plugins/projectexplorer/userfileaccessor.cpp
index e47e9a2dc7c..6776484506a 100644
--- a/src/plugins/projectexplorer/userfileaccessor.cpp
+++ b/src/plugins/projectexplorer/userfileaccessor.cpp
@@ -398,7 +398,7 @@ QVariantMap UserFileAccessor::preprocessReadSettings(const QVariantMap &data) co
QVariantMap tmp = MergingSettingsAccessor::preprocessReadSettings(data);
// Move from old Version field to new one:
- // This can not be done in a normal upgrader since the version information is needed
+ // This cannot be done in a normal upgrader since the version information is needed
// to decide which upgraders to run
const QString obsoleteKey = OBSOLETE_VERSION_KEY;
const int obsoleteVersion = tmp.value(obsoleteKey, -1).toInt();
diff --git a/src/plugins/qmakeprojectmanager/qmakemakestep.cpp b/src/plugins/qmakeprojectmanager/qmakemakestep.cpp
index 4cf4d123279..3fad755f80b 100644
--- a/src/plugins/qmakeprojectmanager/qmakemakestep.cpp
+++ b/src/plugins/qmakeprojectmanager/qmakemakestep.cpp
@@ -129,7 +129,7 @@ bool QmakeMakeStep::init(QList &earlierSteps)
}
}
- Utils::QtcProcess::addArgs(&args, userArguments());
+ Utils::QtcProcess::addArgs(&args, allArguments());
if (bc->fileNodeBuild() && subProFile) {
QString objectsDir = subProFile->objectsDirectory();
if (objectsDir.isEmpty()) {
diff --git a/src/plugins/qmldesigner/designercore/model/abstractproperty.cpp b/src/plugins/qmldesigner/designercore/model/abstractproperty.cpp
index c6602a3bc70..94943349210 100644
--- a/src/plugins/qmldesigner/designercore/model/abstractproperty.cpp
+++ b/src/plugins/qmldesigner/designercore/model/abstractproperty.cpp
@@ -58,7 +58,7 @@ AbstractProperty::AbstractProperty(const PropertyName &propertyName, const Inter
m_view(view)
{
Q_ASSERT(!m_model || m_view);
- Q_ASSERT_X(!m_propertyName.contains(' '), Q_FUNC_INFO, "a property name can not contain a space");
+ Q_ASSERT_X(!m_propertyName.contains(' '), Q_FUNC_INFO, "a property name cannot contain a space");
}
AbstractProperty::AbstractProperty(const Internal::InternalPropertyPointer &property, Model* model, AbstractView *view)
diff --git a/src/plugins/qmldesigner/switchsplittabwidget.cpp b/src/plugins/qmldesigner/switchsplittabwidget.cpp
index 9d81f3564dd..7dea80f164f 100644
--- a/src/plugins/qmldesigner/switchsplittabwidget.cpp
+++ b/src/plugins/qmldesigner/switchsplittabwidget.cpp
@@ -122,7 +122,7 @@ QWidget *SwitchSplitTabWidget::currentWidget() const
void SwitchSplitTabWidget::updateSplitterSizes(int index)
{
if (isHidden()) {
- // we can not get the sizes if the splitter is hidden
+ // we cannot get the sizes if the splitter is hidden
m_splittSizesAreDirty = true;
return;
}
diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
index 9ba68b556a1..65616389af2 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
@@ -278,7 +278,7 @@ QmlProjectRunConfiguration::QmlProjectRunConfiguration(Target *target, Id id)
{
addAspect(target);
m_qmlViewerAspect = addAspect();
- m_qmlViewerAspect->setLabelText(tr("QML viewer:"));
+ m_qmlViewerAspect->setLabelText(tr("QML Viewer:"));
m_qmlViewerAspect->setPlaceHolderText(executable());
m_qmlViewerAspect->setDisplayStyle(BaseStringAspect::LineEditDisplay);
diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp
index 553a3d69842..166e8a45ec1 100644
--- a/src/plugins/qtsupport/baseqtversion.cpp
+++ b/src/plugins/qtsupport/baseqtversion.cpp
@@ -1807,7 +1807,7 @@ FileNameList BaseQtVersion::qtCorePaths() const
}
}
}
- // Only handle static libs if we can not find dynamic ones:
+ // Only handle static libs if we cannot find dynamic ones:
if (dynamicLibs.isEmpty())
return staticLibs;
return dynamicLibs;
diff --git a/src/plugins/subversion/subversionclient.cpp b/src/plugins/subversion/subversionclient.cpp
index e5b0a356402..a2e887239c5 100644
--- a/src/plugins/subversion/subversionclient.cpp
+++ b/src/plugins/subversion/subversionclient.cpp
@@ -198,7 +198,7 @@ SubversionDiffEditorController::SubversionDiffEditorController(
: VcsBaseDiffEditorController(document, SubversionPlugin::instance()->client(), workingDirectory)
, m_state(Idle)
{
- forceContextLineCount(3); // SVN can not change that when using internal diff
+ forceContextLineCount(3); // SVN cannot change that when using internal diff
}
void SubversionDiffEditorController::setFilesList(const QStringList &filesList)
diff --git a/src/plugins/texteditor/codeassist/codeassistant.cpp b/src/plugins/texteditor/codeassist/codeassistant.cpp
index 15c7f56cc82..9abbe3a8f19 100644
--- a/src/plugins/texteditor/codeassist/codeassistant.cpp
+++ b/src/plugins/texteditor/codeassist/codeassistant.cpp
@@ -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()));
diff --git a/src/plugins/texteditor/codeassist/iassistproposal.cpp b/src/plugins/texteditor/codeassist/iassistproposal.cpp
index fcbe2e83862..bfce6360712 100644
--- a/src/plugins/texteditor/codeassist/iassistproposal.cpp
+++ b/src/plugins/texteditor/codeassist/iassistproposal.cpp
@@ -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
diff --git a/src/plugins/texteditor/codeassist/iassistproposal.h b/src/plugins/texteditor/codeassist/iassistproposal.h
index 0dbf24462fc..e7ac9131965 100644
--- a/src/plugins/texteditor/codeassist/iassistproposal.h
+++ b/src/plugins/texteditor/codeassist/iassistproposal.h
@@ -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
diff --git a/src/plugins/valgrind/callgrindvisualisation.cpp b/src/plugins/valgrind/callgrindvisualisation.cpp
index a653489e367..3fd51366005 100644
--- a/src/plugins/valgrind/callgrindvisualisation.cpp
+++ b/src/plugins/valgrind/callgrindvisualisation.cpp
@@ -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);
diff --git a/src/tools/iostool/iosdevicemanager.cpp b/src/tools/iostool/iosdevicemanager.cpp
index bfc493ad5af..53a9fd1625a 100644
--- a/src/tools/iostool/iosdevicemanager.cpp
+++ b/src/tools/iostool/iosdevicemanager.cpp
@@ -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(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)) {
diff --git a/src/tools/sdktool/addkitoperation.cpp b/src/tools/sdktool/addkitoperation.cpp
index a58e1257c20..b1c480811e6 100644
--- a/src/tools/sdktool/addkitoperation.cpp
+++ b/src/tools/sdktool/addkitoperation.cpp
@@ -280,7 +280,7 @@ bool AddKitOperation::setArguments(const QStringList &args)
if (m_deviceType.isEmpty())
std::cerr << "No devicetype given for kit." << std::endl << std::endl;
if (!m_debuggerId.isEmpty() && (!m_debugger.isEmpty() || m_debuggerEngine != 0)) {
- std::cerr << "Can not set both debugger id and debugger/debuggerengine." << std::endl << std::endl;
+ std::cerr << "Cannot set both debugger id and debugger/debuggerengine." << std::endl << std::endl;
return false;
}
diff --git a/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp b/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp
index af4723c8729..9b5762f3da9 100644
--- a/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp
+++ b/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp
@@ -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
diff --git a/tests/auto/utils/fileutils/tst_fileutils.cpp b/tests/auto/utils/fileutils/tst_fileutils.cpp
index aa37314365a..2b588c533e9 100644
--- a/tests/auto/utils/fileutils/tst_fileutils.cpp
+++ b/tests/auto/utils/fileutils/tst_fileutils.cpp
@@ -64,9 +64,9 @@ void tst_fileutils::parentDir_data()
QTest::newRow("C:/data") << "C:/data" << "C:/" << "";
QTest::newRow("C:/") << "C:/" << "" << "";
QTest::newRow("//./com1") << "//./com1" << "/" << "";
- QTest::newRow("//?/path") << "//?/path" << "/" << "Qt 4 can not handle this path.";
+ QTest::newRow("//?/path") << "//?/path" << "/" << "Qt 4 cannot handle this path.";
QTest::newRow("/Global?\?/UNC/host") << "/Global?\?/UNC/host" << "/Global?\?/UNC/host"
- << "Qt 4 can not handle this path.";
+ << "Qt 4 cannot handle this path.";
QTest::newRow("//server/directory/file")
<< "//server/directory/file" << "//server/directory" << "";
QTest::newRow("//server/directory") << "//server/directory" << "//server" << "";