Utils: Remove superfluous qualifications

Change-Id: I36e17dac0cff87f82f0ddaf97bc613389110f218
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Orgad Shaneh
2018-07-17 23:21:05 +03:00
committed by Tobias Hunger
parent 9f8dbc1d2f
commit 7cee991c70
26 changed files with 95 additions and 95 deletions

View File

@@ -727,15 +727,15 @@ auto toConstReferences(const SourceContainer &sources)
/////////////////
template<class C, typename P>
Q_REQUIRED_RESULT Utils::optional<typename C::value_type> take(C &container, P predicate)
Q_REQUIRED_RESULT optional<typename C::value_type> take(C &container, P predicate)
{
const auto end = std::end(container);
const auto it = std::find_if(std::begin(container), end, predicate);
if (it == end)
return Utils::nullopt;
return nullopt;
Utils::optional<typename C::value_type> result = Utils::make_optional(std::move(*it));
optional<typename C::value_type> result = Utils::make_optional(std::move(*it));
container.erase(it);
return result;
}

View File

@@ -96,7 +96,7 @@ static QPixmap segmentPixmap(CrumblePathButton::SegmentType type, QStyle::State
if (!QPixmapCache::find(pixmapKey, pixmap)) {
const QString maskFileName = QStringLiteral(":/utils/images/crumblepath-segment-%1%2.png")
.arg(segmentName).arg(QLatin1String(hover ? "-hover" : ""));
pixmap = Utils::Icon({{maskFileName, Theme::IconsBaseColor}}).pixmap(iconMode);
pixmap = Icon({{maskFileName, Theme::IconsBaseColor}}).pixmap(iconMode);
QPixmapCache::insert(pixmapKey, pixmap);
}

View File

@@ -58,7 +58,7 @@ public:
static QStringList mimeTypesForFilePaths();
signals:
void filesDropped(const QList<Utils::DropSupport::FileSpec> &files, const QPoint &dropPos);
void filesDropped(const QList<DropSupport::FileSpec> &files, const QPoint &dropPos);
void valuesDropped(const QList<QVariant> &values, const QPoint &dropPos);
public:

View File

@@ -181,16 +181,16 @@ QDebug operator<<(QDebug debug, const EnvironmentItem &i)
debug.nospace();
debug << "EnvironmentItem(";
switch (i.operation) {
case Utils::EnvironmentItem::Set:
case EnvironmentItem::Set:
debug << "set \"" << i.name << "\" to \"" << i.value << '"';
break;
case Utils::EnvironmentItem::Unset:
case EnvironmentItem::Unset:
debug << "unset \"" << i.name << '"';
break;
case Utils::EnvironmentItem::Prepend:
case EnvironmentItem::Prepend:
debug << "prepend to \"" << i.name << "\":\"" << i.value << '"';
break;
case Utils::EnvironmentItem::Append:
case EnvironmentItem::Append:
debug << "append to \"" << i.name << "\":\"" << i.value << '"';
break;
}

View File

@@ -76,7 +76,7 @@ public:
void setPixmap(const QString &uri)
{
m_label->hide();
m_pixmap.load(Utils::StyleHelper::dpiSpecificImageFile(uri));
m_pixmap.load(StyleHelper::dpiSpecificImageFile(uri));
layout()->setSizeConstraint(QLayout::SetNoConstraint);
resize(m_pixmap.size() / m_pixmap.devicePixelRatio());
if (QWidget *parent = parentWidget())

View File

@@ -144,7 +144,7 @@ protected:
virtual void handleChanged(const QString &) {}
signals:
void buttonClicked(Utils::FancyLineEdit::Side side);
void buttonClicked(FancyLineEdit::Side side);
void leftButtonClicked();
void rightButtonClicked();

View File

@@ -95,7 +95,7 @@ QString FileInProjectFinder::projectDirectory() const
return m_projectDir;
}
void FileInProjectFinder::setProjectFiles(const Utils::FileNameList &projectFiles)
void FileInProjectFinder::setProjectFiles(const FileNameList &projectFiles)
{
if (m_projectFiles == projectFiles)
return;
@@ -180,7 +180,7 @@ QString FileInProjectFinder::findFileOrDirectory(const QString &originalPath, Fi
int prefixToIgnore = -1;
const QChar separator = QLatin1Char('/');
if (originalPath.startsWith(m_projectDir + separator)) {
if (Utils::HostOsInfo::isMacHost()) {
if (HostOsInfo::isMacHost()) {
// starting with the project path is not sufficient if the file was
// copied in an insource build, e.g. into MyApp.app/Contents/Resources
static const QString appResourcePath = QString::fromLatin1(".app/Contents/Resources");

View File

@@ -49,7 +49,7 @@ public:
void setProjectDirectory(const QString &absoluteProjectPath);
QString projectDirectory() const;
void setProjectFiles(const Utils::FileNameList &projectFiles);
void setProjectFiles(const FileNameList &projectFiles);
void setSysroot(const QString &sysroot);
QString findFile(const QUrl &fileUrl, bool *success = nullptr) const;
@@ -74,7 +74,7 @@ private:
QString m_projectDir;
QString m_sysroot;
Utils::FileNameList m_projectFiles;
FileNameList m_projectFiles;
QStringList m_searchDirectories;
mutable QHash<QString,QString> m_cache;
};

View File

@@ -482,7 +482,7 @@ static bool matches(const QList<QRegExp> &exprList, const QString &filePath)
{
return Utils::anyOf(exprList, [&filePath](QRegExp reg) {
return (reg.exactMatch(filePath)
|| reg.exactMatch(Utils::FileName::fromString(filePath).fileName()));
|| reg.exactMatch(FileName::fromString(filePath).fileName()));
});
}

View File

@@ -396,7 +396,7 @@ void MacroExpander::registerFileVariables(const QByteArray &prefix,
registerVariable(prefix + kFileNamePostfix,
tr("%1: File name without path.").arg(heading),
[base]() -> QString { QString tmp = base(); return tmp.isEmpty() ? QString() : Utils::FileName::fromString(tmp).fileName(); },
[base]() -> QString { QString tmp = base(); return tmp.isEmpty() ? QString() : FileName::fromString(tmp).fileName(); },
visibleInChooser);
registerVariable(prefix + kFileBaseNamePostfix,

View File

@@ -66,7 +66,7 @@ protected:
void initFormats();
virtual void clearLastLine();
QTextCharFormat charFormat(OutputFormat format) const;
QList<Utils::FormattedText> parseAnsi(const QString &text, const QTextCharFormat &format);
QList<FormattedText> parseAnsi(const QString &text, const QTextCharFormat &format);
void append(QTextCursor &cursor, const QString &text, const QTextCharFormat &format);
private:

View File

@@ -49,9 +49,11 @@
This class has some validation logic for embedding into QWizardPage.
*/
namespace Utils {
static QString appBundleExpandedPath(const QString &path)
{
if (Utils::HostOsInfo::hostOs() == Utils::OsTypeMac && path.endsWith(".app")) {
if (HostOsInfo::hostOs() == OsTypeMac && path.endsWith(".app")) {
// possibly expand to Foo.app/Contents/MacOS/Foo
QFileInfo info(path);
if (info.isDir()) {
@@ -63,9 +65,7 @@ static QString appBundleExpandedPath(const QString &path)
return path;
}
Utils::PathChooser::AboutToShowContextMenuHandler Utils::PathChooser::s_aboutToShowContextMenuHandler;
namespace Utils {
PathChooser::AboutToShowContextMenuHandler PathChooser::s_aboutToShowContextMenuHandler;
// ------------------ BinaryVersionToolTipEventFilter
// Event filter to be installed on a lineedit used for entering

View File

@@ -95,7 +95,7 @@ public:
FileName rawFileName() const; // The raw unexpanded input.
FileName fileName() const;
static QString expandedDirectory(const QString &input, const Utils::Environment &env,
static QString expandedDirectory(const QString &input, const Environment &env,
const QString &baseDir);
QString baseDirectory() const;
@@ -142,7 +142,7 @@ public:
// global handler for adding context menus to ALL pathchooser
// used by the coreplugin to add "Open in Terminal" and "Open in Explorer" context menu actions
using AboutToShowContextMenuHandler = std::function<void (Utils::PathChooser *, QMenu *)>;
using AboutToShowContextMenuHandler = std::function<void (PathChooser *, QMenu *)>;
static void setAboutToShowContextMenuHandler(AboutToShowContextMenuHandler handler);
QColor errorColor() const;
@@ -166,7 +166,7 @@ signals:
public slots:
void setPath(const QString &);
void setFileName(const Utils::FileName &);
void setFileName(const FileName &);
void setErrorColor(const QColor &errorColor);
void setOkColor(const QColor &okColor);

View File

@@ -275,13 +275,13 @@ auto toRawPointer(const SourceContainer &sources)
// take:
/////////////////
template<typename C>
Q_REQUIRED_RESULT Utils::optional<ValueType<C>> take(C &container, PointerType<C> p)
Q_REQUIRED_RESULT optional<ValueType<C>> take(C &container, PointerType<C> p)
{
return take(container, [p](const ValueType<C> &v) { return v.get() == p; });
}
template <typename C>
Q_REQUIRED_RESULT Utils::optional<ValueType<C>> take(C &container, std::nullptr_t)
Q_REQUIRED_RESULT optional<ValueType<C>> take(C &container, std::nullptr_t)
{
return take(container, static_cast<PointerType<C>>(nullptr));
}

View File

@@ -205,7 +205,7 @@ void ProgressIndicatorPainter::stopAnimation()
/*!
\internal
*/
void Utils::ProgressIndicatorPainter::nextAnimationStep()
void ProgressIndicatorPainter::nextAnimationStep()
{
m_rotation = (m_rotation + m_rotationStep + 360) % 360;
}

View File

@@ -59,7 +59,7 @@ struct hasCallOperator
namespace Utils {
using StackSizeInBytes = Utils::optional<uint>;
using StackSizeInBytes = optional<uint>;
namespace Internal {

View File

@@ -110,7 +110,7 @@ SettingsAccessor::RestoreData SettingsAccessor::readData(const FileName &path, Q
/*!
* Store the \a data in \a path on disk. Do all the necessary preprocessing of the data.
*/
Utils::optional<SettingsAccessor::Issue>
optional<SettingsAccessor::Issue>
SettingsAccessor::writeData(const FileName &path, const QVariantMap &data, QWidget *parent) const
{
Q_UNUSED(parent);
@@ -155,7 +155,7 @@ SettingsAccessor::RestoreData SettingsAccessor::readFile(const FileName &path) c
*
* This method does not do *any* processing of the file contents.
*/
Utils::optional<SettingsAccessor::Issue>
optional<SettingsAccessor::Issue>
SettingsAccessor::writeFile(const FileName &path, const QVariantMap &data) const
{
if (data.isEmpty()) {
@@ -239,11 +239,11 @@ int BackUpStrategy::compare(const SettingsAccessor::RestoreData &data1,
return 0;
}
Utils::optional<Utils::FileName>
optional<FileName>
BackUpStrategy::backupName(const QVariantMap &oldData, const FileName &path, const QVariantMap &data) const
{
if (oldData == data)
return Utils::nullopt;
return nullopt;
FileName backup = path;
backup.appendString(".bak");
return backup;
@@ -264,7 +264,7 @@ BackingUpSettingsAccessor::BackingUpSettingsAccessor(std::unique_ptr<BackUpStrat
{ }
SettingsAccessor::RestoreData
BackingUpSettingsAccessor::readData(const Utils::FileName &path, QWidget *parent) const
BackingUpSettingsAccessor::readData(const FileName &path, QWidget *parent) const
{
const FileNameList fileList = readFileCandidates(path);
if (fileList.isEmpty()) // No settings found at all.
@@ -288,8 +288,8 @@ BackingUpSettingsAccessor::readData(const Utils::FileName &path, QWidget *parent
return result;
}
Utils::optional<SettingsAccessor::Issue>
BackingUpSettingsAccessor::writeData(const Utils::FileName &path, const QVariantMap &data,
optional<SettingsAccessor::Issue>
BackingUpSettingsAccessor::writeData(const FileName &path, const QVariantMap &data,
QWidget *parent) const
{
if (data.isEmpty())
@@ -300,7 +300,7 @@ BackingUpSettingsAccessor::writeData(const Utils::FileName &path, const QVariant
return SettingsAccessor::writeData(path, data, parent);
}
FileNameList BackingUpSettingsAccessor::readFileCandidates(const Utils::FileName &path) const
FileNameList BackingUpSettingsAccessor::readFileCandidates(const FileName &path) const
{
FileNameList result = Utils::filteredUnique(m_strategy->readFileCandidates(path));
if (result.removeOne(baseFilePath()))
@@ -752,7 +752,7 @@ static QVariant mergeQVariantMapsRecursion(const QVariantMap &mainTree, const QV
global.key = keyPrefix + key;
local.key = key;
Utils::optional<QPair<QString, QVariant>> mergeResult = merge(global, local);
optional<QPair<QString, QVariant>> mergeResult = merge(global, local);
if (!mergeResult)
continue;

View File

@@ -63,7 +63,7 @@ QTCREATOR_UTILS_EXPORT void setVersionInMap(QVariantMap &data, int version);
QTCREATOR_UTILS_EXPORT void setOriginalVersionInMap(QVariantMap &data, int version);
QTCREATOR_UTILS_EXPORT void setSettingsIdInMap(QVariantMap &data, const QByteArray &id);
using SettingsMergeResult = Utils::optional<QPair<QString, QVariant>>;
using SettingsMergeResult = optional<QPair<QString, QVariant>>;
// --------------------------------------------------------------------
// SettingsAccessor:
@@ -99,7 +99,7 @@ public:
class RestoreData {
public:
RestoreData() = default;
RestoreData(const Utils::FileName &path, const QVariantMap &data) : path{path}, data{data} { }
RestoreData(const FileName &path, const QVariantMap &data) : path{path}, data{data} { }
RestoreData(const QString &title, const QString &message, const Issue::Type type) :
RestoreData(Issue(title, message, type))
{ }
@@ -109,9 +109,9 @@ public:
bool hasError() const { return hasIssue() && issue.value().type == Issue::Type::ERROR; }
bool hasWarning() const { return hasIssue() && issue.value().type == Issue::Type::WARNING; }
Utils::FileName path;
FileName path;
QVariantMap data;
Utils::optional<Issue> issue;
optional<Issue> issue;
};
QVariantMap restoreSettings(QWidget *parent) const;
@@ -121,26 +121,26 @@ public:
const QString displayName;
const QString applicationDisplayName;
void setBaseFilePath(const Utils::FileName &baseFilePath) { m_baseFilePath = baseFilePath; }
void setBaseFilePath(const FileName &baseFilePath) { m_baseFilePath = baseFilePath; }
void setReadOnly() { m_readOnly = true; }
Utils::FileName baseFilePath() const { return m_baseFilePath; }
FileName baseFilePath() const { return m_baseFilePath; }
virtual RestoreData readData(const Utils::FileName &path, QWidget *parent) const;
virtual Utils::optional<Issue> writeData(const Utils::FileName &path, const QVariantMap &data, QWidget *parent) const;
virtual RestoreData readData(const FileName &path, QWidget *parent) const;
virtual optional<Issue> writeData(const FileName &path, const QVariantMap &data, QWidget *parent) const;
protected:
// Report errors:
QVariantMap restoreSettings(const Utils::FileName &settingsPath, QWidget *parent) const;
QVariantMap restoreSettings(const FileName &settingsPath, QWidget *parent) const;
ProceedInfo reportIssues(const Issue &issue, const FileName &path, QWidget *parent) const;
virtual QVariantMap preprocessReadSettings(const QVariantMap &data) const;
virtual QVariantMap prepareToWriteSettings(const QVariantMap &data) const;
virtual RestoreData readFile(const Utils::FileName &path) const;
virtual Utils::optional<Issue> writeFile(const Utils::FileName &path, const QVariantMap &data) const;
virtual RestoreData readFile(const FileName &path) const;
virtual optional<Issue> writeFile(const FileName &path, const QVariantMap &data) const;
private:
Utils::FileName m_baseFilePath;
FileName m_baseFilePath;
mutable std::unique_ptr<PersistentSettingsWriter> m_writer;
bool m_readOnly = false;
};
@@ -154,7 +154,7 @@ class QTCREATOR_UTILS_EXPORT BackUpStrategy
public:
virtual ~BackUpStrategy() = default;
virtual FileNameList readFileCandidates(const Utils::FileName &baseFileName) const;
virtual FileNameList readFileCandidates(const FileName &baseFileName) const;
// Return -1 if data1 is better that data2, 0 if both are equally worthwhile
// and 1 if data2 is better than data1
virtual int compare(const SettingsAccessor::RestoreData &data1,
@@ -172,14 +172,14 @@ public:
BackingUpSettingsAccessor(std::unique_ptr<BackUpStrategy> &&strategy, const QString &docType,
const QString &displayName, const QString &applicationDisplayName);
RestoreData readData(const Utils::FileName &path, QWidget *parent) const override;
Utils::optional<Issue> writeData(const Utils::FileName &path, const QVariantMap &data,
RestoreData readData(const FileName &path, QWidget *parent) const override;
optional<Issue> writeData(const FileName &path, const QVariantMap &data,
QWidget *parent) const override;
BackUpStrategy *strategy() const { return m_strategy.get(); }
private:
Utils::FileNameList readFileCandidates(const FileName &path) const;
FileNameList readFileCandidates(const FileName &path) const;
RestoreData bestReadFileData(const FileNameList &candidates, QWidget *parent) const;
void backupFile(const FileName &path, const QVariantMap &data, QWidget *parent) const;
@@ -251,7 +251,7 @@ public:
bool isValidVersionAndId(const int version, const QByteArray &id) const;
VersionUpgrader *upgrader(const int version) const;
RestoreData readData(const Utils::FileName &path, QWidget *parent) const override;
RestoreData readData(const FileName &path, QWidget *parent) const override;
protected:
QVariantMap prepareToWriteSettings(const QVariantMap &data) const override;
@@ -284,7 +284,7 @@ public:
const QString &docType, const QString &displayName,
const QString &applicationDisplayName);
RestoreData readData(const Utils::FileName &path, QWidget *parent) const final;
RestoreData readData(const FileName &path, QWidget *parent) const final;
void setSecondaryAccessor(std::unique_ptr<SettingsAccessor> &&secondary);

View File

@@ -68,11 +68,11 @@ class ShellCommandPrivate
{
public:
struct Job {
explicit Job(const QString &wd, const Utils::FileName &b, const QStringList &a, int t,
explicit Job(const QString &wd, const FileName &b, const QStringList &a, int t,
const ExitCodeInterpreter &interpreter);
QString workingDirectory;
Utils::FileName binary;
FileName binary;
QStringList arguments;
ExitCodeInterpreter exitCodeInterpreter;
int timeoutS;
@@ -113,7 +113,7 @@ ShellCommandPrivate::~ShellCommandPrivate()
delete m_progressParser;
}
ShellCommandPrivate::Job::Job(const QString &wd, const Utils::FileName &b, const QStringList &a,
ShellCommandPrivate::Job::Job(const QString &wd, const FileName &b, const QStringList &a,
int t, const ExitCodeInterpreter &interpreter) :
workingDirectory(wd),
binary(b),
@@ -195,13 +195,13 @@ void ShellCommand::addFlags(unsigned f)
d->m_flags |= f;
}
void ShellCommand::addJob(const Utils::FileName &binary, const QStringList &arguments,
void ShellCommand::addJob(const FileName &binary, const QStringList &arguments,
const QString &workingDirectory, const ExitCodeInterpreter &interpreter)
{
addJob(binary, arguments, defaultTimeoutS(), workingDirectory, interpreter);
}
void ShellCommand::addJob(const Utils::FileName &binary, const QStringList &arguments, int timeoutS,
void ShellCommand::addJob(const FileName &binary, const QStringList &arguments, int timeoutS,
const QString &workingDirectory, const ExitCodeInterpreter &interpreter)
{
d->m_jobs.push_back(Internal::ShellCommandPrivate::Job(workDirectory(workingDirectory), binary,
@@ -286,13 +286,13 @@ void ShellCommand::run(QFutureInterface<void> &future)
d->m_lastExecSuccess = true;
for (int j = 0; j < count; j++) {
const Internal::ShellCommandPrivate::Job &job = d->m_jobs.at(j);
Utils::SynchronousProcessResponse resp
SynchronousProcessResponse resp
= runCommand(job.binary, job.arguments, job.timeoutS, job.workingDirectory,
job.exitCodeInterpreter);
stdOut += resp.stdOut();
stdErr += resp.stdErr();
d->m_lastExecExitCode = resp.exitCode;
d->m_lastExecSuccess = resp.result == Utils::SynchronousProcessResponse::Finished;
d->m_lastExecSuccess = resp.result == SynchronousProcessResponse::Finished;
if (!d->m_lastExecSuccess)
break;
}
@@ -319,17 +319,17 @@ void ShellCommand::run(QFutureInterface<void> &future)
this->deleteLater();
}
Utils::SynchronousProcessResponse ShellCommand::runCommand(const Utils::FileName &binary,
SynchronousProcessResponse ShellCommand::runCommand(const FileName &binary,
const QStringList &arguments, int timeoutS,
const QString &workingDirectory,
const ExitCodeInterpreter &interpreter)
{
Utils::SynchronousProcessResponse response;
SynchronousProcessResponse response;
const QString dir = workDirectory(workingDirectory);
if (binary.isEmpty()) {
response.result = Utils::SynchronousProcessResponse::StartFailed;
response.result = SynchronousProcessResponse::StartFailed;
return response;
}
@@ -345,7 +345,7 @@ Utils::SynchronousProcessResponse ShellCommand::runCommand(const Utils::FileName
if (!d->m_aborted) {
// Success/Fail message in appropriate window?
if (response.result == Utils::SynchronousProcessResponse::Finished) {
if (response.result == SynchronousProcessResponse::Finished) {
if (d->m_flags & ShowSuccessMessage)
proxy->appendMessage(response.exitMessage(binary.toUserOutput(), timeoutS));
} else if (!(d->m_flags & SuppressFailMessage)) {
@@ -356,7 +356,7 @@ Utils::SynchronousProcessResponse ShellCommand::runCommand(const Utils::FileName
return response;
}
Utils::SynchronousProcessResponse ShellCommand::runFullySynchronous(const Utils::FileName &binary,
SynchronousProcessResponse ShellCommand::runFullySynchronous(const FileName &binary,
const QStringList &arguments,
QSharedPointer<OutputProxy> proxy,
int timeoutS,
@@ -364,7 +364,7 @@ Utils::SynchronousProcessResponse ShellCommand::runFullySynchronous(const Utils:
const ExitCodeInterpreter &interpreter)
{
// Set up process
Utils::SynchronousProcess process;
SynchronousProcess process;
process.setFlags(processFlags());
const QString dir = workDirectory(workingDirectory);
if (!dir.isEmpty())
@@ -403,9 +403,9 @@ SynchronousProcessResponse ShellCommand::runSynchronous(const FileName &binary,
const QString &workingDirectory,
const ExitCodeInterpreter &interpreter)
{
Utils::SynchronousProcess process;
SynchronousProcess process;
process.setExitCodeInterpreter(interpreter);
connect(this, &ShellCommand::terminate, &process, &Utils::SynchronousProcess::terminate);
connect(this, &ShellCommand::terminate, &process, &SynchronousProcess::terminate);
process.setProcessEnvironment(processEnvironment());
process.setTimeoutS(timeoutS);
if (d->m_codec)
@@ -421,7 +421,7 @@ SynchronousProcessResponse ShellCommand::runSynchronous(const FileName &binary,
} else if (d->m_progressiveOutput
|| !(d->m_flags & SuppressStdErr)) {
process.setStdErrBufferedSignalsEnabled(true);
connect(&process, &Utils::SynchronousProcess::stdErrBuffered,
connect(&process, &SynchronousProcess::stdErrBuffered,
this, [this, proxy](const QString &text)
{
if (d->m_progressParser)
@@ -436,7 +436,7 @@ SynchronousProcessResponse ShellCommand::runSynchronous(const FileName &binary,
// connect stdout to the output window if desired
if (d->m_progressParser || d->m_progressiveOutput || (d->m_flags & ShowStdOut)) {
process.setStdOutBufferedSignalsEnabled(true);
connect(&process, &Utils::SynchronousProcess::stdOutBuffered,
connect(&process, &SynchronousProcess::stdOutBuffered,
this, [this, proxy](const QString &text)
{
if (d->m_progressParser)

View File

@@ -79,7 +79,7 @@ signals:
void append(const QString &text);
void appendSilently(const QString &text);
void appendError(const QString &text);
void appendCommand(const QString &workingDirectory, const Utils::FileName &binary,
void appendCommand(const QString &workingDirectory, const FileName &binary,
const QStringList &args);
void appendMessage(const QString &text);
};

View File

@@ -53,7 +53,7 @@ ShellCommandPage::ShellCommandPage(QWidget *parent) :
resize(264, 200);
auto verticalLayout = new QVBoxLayout(this);
m_logPlainTextEdit = new QPlainTextEdit;
m_formatter = new Utils::OutputFormatter;
m_formatter = new OutputFormatter;
m_logPlainTextEdit->setReadOnly(true);
m_formatter->setPlainTextEdit(m_logPlainTextEdit);
@@ -86,10 +86,10 @@ void ShellCommandPage::start(ShellCommand *command)
m_command = command;
command->setProgressiveOutput(true);
connect(command, &ShellCommand::stdOutText, this, [this](const QString &text) {
m_formatter->appendMessage(text, Utils::StdOutFormat);
m_formatter->appendMessage(text, StdOutFormat);
});
connect(command, &ShellCommand::stdErrText, this, [this](const QString &text) {
m_formatter->appendMessage(text, Utils::StdErrFormat);
m_formatter->appendMessage(text, StdErrFormat);
});
connect(command, &ShellCommand::finished, this, &ShellCommandPage::slotFinished);
QApplication::setOverrideCursor(Qt::WaitCursor);

View File

@@ -146,7 +146,7 @@ public:
{
}
BasicSmallString(std::initializer_list<Utils::SmallStringView> list)
BasicSmallString(std::initializer_list<SmallStringView> list)
: m_data(Internal::StringDataLayout<Size>())
{
appendInitializerList(list, 0);
@@ -695,7 +695,7 @@ private:
void appendInitializerList(std::initializer_list<SmallStringView> list, std::size_t initialSize)
{
auto addSize = [] (std::size_t size, Utils::SmallStringView string) {
auto addSize = [] (std::size_t size, SmallStringView string) {
return size + string.size();
};
@@ -706,7 +706,7 @@ private:
char *currentData = data() + initialSize;
for (Utils::SmallStringView string : list) {
for (SmallStringView string : list) {
std::memcpy(currentData, string.data(), string.size());
currentData += string.size();
}

View File

@@ -46,9 +46,9 @@ bool convertPosition(const QTextDocument *document, int pos, int *line, int *col
}
}
Utils::OptionalLineColumn convertPosition(const QTextDocument *document, int pos)
OptionalLineColumn convertPosition(const QTextDocument *document, int pos)
{
Utils::OptionalLineColumn optional;
OptionalLineColumn optional;
QTextBlock block = document->findBlock(pos);

View File

@@ -41,7 +41,7 @@ QTCREATOR_UTILS_EXPORT bool convertPosition(const QTextDocument *document,
int pos,
int *line, int *column);
QTCREATOR_UTILS_EXPORT
Utils::OptionalLineColumn convertPosition(const QTextDocument *document, int pos);
OptionalLineColumn convertPosition(const QTextDocument *document, int pos);
// line and column are 1-based
QTCREATOR_UTILS_EXPORT int positionInText(QTextDocument *textDocument, int line, int column);

View File

@@ -47,7 +47,7 @@ QUrl urlFromLocalSocket()
{
QUrl serverUrl;
serverUrl.setScheme(urlSocketScheme());
Utils::TemporaryFile file("qtcreator-freesocket");
TemporaryFile file("qtcreator-freesocket");
if (file.open())
serverUrl.setPath(file.fileName());
return serverUrl;

View File

@@ -30,9 +30,9 @@ namespace Icons {
const Icon HOME({
{QLatin1String(":/utils/images/home.png"), Utils::Theme::PanelTextColorDark}}, Icon::Tint);
{QLatin1String(":/utils/images/home.png"), Theme::PanelTextColorDark}}, Icon::Tint);
const Icon HOME_TOOLBAR({
{QLatin1String(":/utils/images/home.png"), Utils::Theme::IconsBaseColor}});
{QLatin1String(":/utils/images/home.png"), Theme::IconsBaseColor}});
const Icon EDIT_CLEAR({
{QLatin1String(":/utils/images/editclear.png"), Theme::PanelTextColorMid}}, Icon::Tint);
const Icon EDIT_CLEAR_TOOLBAR({