summaryrefslogtreecommitdiff
path: root/src/libs
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2014-07-15 23:33:17 +0300
committerhjk <hjk121@nokiamail.com>2014-07-16 14:15:09 +0200
commit62d98daa586e8ed9af1f769451875e2e64d816dd (patch)
tree8634ca5ef2cf714fb2ead376138b4bfb559c86c3 /src/libs
parente63945593621e87c8afd64624f29e5a04ff6e1b6 (diff)
downloadqt-creator-62d98daa586e8ed9af1f769451875e2e64d816dd.tar.gz
Utils: Remove unneeded namespace qualifications
Change-Id: Iacab8410ab4d3b63f96e7541b450e3cc729ab662 Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/utils/basetreeview.cpp6
-rw-r--r--src/libs/utils/basetreeview.h2
-rw-r--r--src/libs/utils/buildablehelperlibrary.cpp8
-rw-r--r--src/libs/utils/buildablehelperlibrary.h8
-rw-r--r--src/libs/utils/classnamevalidatinglineedit.cpp2
-rw-r--r--src/libs/utils/classnamevalidatinglineedit.h3
-rw-r--r--src/libs/utils/consoleprocess_unix.cpp4
-rw-r--r--src/libs/utils/crumblepath.cpp12
-rw-r--r--src/libs/utils/detailswidget.cpp4
-rw-r--r--src/libs/utils/detailswidget.h2
-rw-r--r--src/libs/utils/environment.cpp10
-rw-r--r--src/libs/utils/environmentmodel.cpp32
-rw-r--r--src/libs/utils/environmentmodel.h8
-rw-r--r--src/libs/utils/fancylineedit.h2
-rw-r--r--src/libs/utils/fileutils.cpp4
-rw-r--r--src/libs/utils/fileutils.h8
-rw-r--r--src/libs/utils/filewizardpage.cpp2
-rw-r--r--src/libs/utils/ipaddresslineedit.cpp2
-rw-r--r--src/libs/utils/ipaddresslineedit.h2
-rw-r--r--src/libs/utils/json.h10
-rw-r--r--src/libs/utils/navigationtreeview.h2
-rw-r--r--src/libs/utils/pathchooser.cpp12
-rw-r--r--src/libs/utils/pathchooser.h8
-rw-r--r--src/libs/utils/persistentsettings.cpp4
-rw-r--r--src/libs/utils/persistentsettings.h4
-rw-r--r--src/libs/utils/reloadpromptutils.cpp22
-rw-r--r--src/libs/utils/tcpportsgatherer.cpp4
-rw-r--r--src/libs/utils/textfileformat.cpp16
-rw-r--r--src/libs/utils/tooltip/reuse.h2
-rw-r--r--src/libs/utils/tooltip/tips.cpp4
-rw-r--r--src/libs/utils/tooltip/tips.h8
-rw-r--r--src/libs/utils/tooltip/tooltip.cpp2
-rw-r--r--src/libs/utils/wizard.cpp2
33 files changed, 111 insertions, 110 deletions
diff --git a/src/libs/utils/basetreeview.cpp b/src/libs/utils/basetreeview.cpp
index 7114021e63..5ca1e1bd60 100644
--- a/src/libs/utils/basetreeview.cpp
+++ b/src/libs/utils/basetreeview.cpp
@@ -59,7 +59,7 @@ public:
};
BaseTreeView::BaseTreeView(QWidget *parent)
- : Utils::TreeView(parent)
+ : TreeView(parent)
{
setAttribute(Qt::WA_MacShowFocusRect, false);
setFrameStyle(QFrame::NoFrame);
@@ -87,7 +87,7 @@ void BaseTreeView::setModel(QAbstractItemModel *m)
if (index != -1)
disconnect(model(), SIGNAL(columnAdjustmentRequested()), this, SLOT(resizeColumns()));
}
- Utils::TreeView::setModel(m);
+ TreeView::setModel(m);
if (m) {
int index = m->metaObject()->indexOfSignal(sig);
if (index != -1)
@@ -97,7 +97,7 @@ void BaseTreeView::setModel(QAbstractItemModel *m)
void BaseTreeView::mousePressEvent(QMouseEvent *ev)
{
- Utils::TreeView::mousePressEvent(ev);
+ TreeView::mousePressEvent(ev);
const QModelIndex mi = indexAt(ev->pos());
if (!mi.isValid())
toggleColumnWidth(columnAt(ev->x()));
diff --git a/src/libs/utils/basetreeview.h b/src/libs/utils/basetreeview.h
index f034abb1db..123839ce77 100644
--- a/src/libs/utils/basetreeview.h
+++ b/src/libs/utils/basetreeview.h
@@ -36,7 +36,7 @@
namespace Utils {
-class QTCREATOR_UTILS_EXPORT BaseTreeView : public Utils::TreeView
+class QTCREATOR_UTILS_EXPORT BaseTreeView : public TreeView
{
Q_OBJECT
diff --git a/src/libs/utils/buildablehelperlibrary.cpp b/src/libs/utils/buildablehelperlibrary.cpp
index 967ef75fe9..2e330d55a8 100644
--- a/src/libs/utils/buildablehelperlibrary.cpp
+++ b/src/libs/utils/buildablehelperlibrary.cpp
@@ -64,7 +64,7 @@ QString BuildableHelperLibrary::qtChooserToQmakePath(const QString &path)
return result;
}
-Utils::FileName BuildableHelperLibrary::findSystemQt(const Utils::Environment &env)
+FileName BuildableHelperLibrary::findSystemQt(const Environment &env)
{
QStringList paths = env.path();
foreach (const QString &path, paths) {
@@ -78,11 +78,11 @@ Utils::FileName BuildableHelperLibrary::findSystemQt(const Utils::Environment &e
qmake.setFile(qtChooserToQmakePath(qmake.symLinkTarget()));
if (!qtVersionForQMake(qmake.absoluteFilePath()).isNull())
- return Utils::FileName(qmake);
+ return FileName(qmake);
}
}
}
- return Utils::FileName();
+ return FileName();
}
QString BuildableHelperLibrary::qtVersionForQMake(const QString &qmakePath)
@@ -105,7 +105,7 @@ QString BuildableHelperLibrary::qtVersionForQMake(const QString &qmakePath, bool
return QString();
}
if (!qmake.waitForFinished()) {
- Utils::SynchronousProcess::stopProcess(qmake);
+ SynchronousProcess::stopProcess(qmake);
qWarning("Timeout running '%s'.", qPrintable(qmakePath));
return QString();
}
diff --git a/src/libs/utils/buildablehelperlibrary.h b/src/libs/utils/buildablehelperlibrary.h
index c01a45d231..6d0ed8bc68 100644
--- a/src/libs/utils/buildablehelperlibrary.h
+++ b/src/libs/utils/buildablehelperlibrary.h
@@ -42,7 +42,7 @@ class QTCREATOR_UTILS_EXPORT BuildableHelperLibrary
public:
// returns the full path to the first qmake, qmake-qt4, qmake4 that has
// at least version 2.0.0 and thus is a qt4 qmake
- static FileName findSystemQt(const Utils::Environment &env);
+ static FileName findSystemQt(const Environment &env);
static bool isQtChooser(const QFileInfo &info);
static QString qtChooserToQmakePath(const QString &path);
// return true if the qmake at qmakePath is qt4 (used by QtVersion)
@@ -63,11 +63,11 @@ public:
struct BuildHelperArguments {
QString helperName;
QString directory;
- Utils::Environment environment;
+ Environment environment;
- Utils::FileName qmakeCommand;
+ FileName qmakeCommand;
QString targetMode;
- Utils::FileName mkspec;
+ FileName mkspec;
QString proFilename;
QStringList qmakeArguments;
diff --git a/src/libs/utils/classnamevalidatinglineedit.cpp b/src/libs/utils/classnamevalidatinglineedit.cpp
index a2a5d4e067..e8cd7740b4 100644
--- a/src/libs/utils/classnamevalidatinglineedit.cpp
+++ b/src/libs/utils/classnamevalidatinglineedit.cpp
@@ -65,7 +65,7 @@ ClassNameValidatingLineEditPrivate:: ClassNameValidatingLineEditPrivate() :
// --------------------- ClassNameValidatingLineEdit
ClassNameValidatingLineEdit::ClassNameValidatingLineEdit(QWidget *parent) :
- Utils::FancyLineEdit(parent),
+ FancyLineEdit(parent),
d(new ClassNameValidatingLineEditPrivate)
{
updateRegExp();
diff --git a/src/libs/utils/classnamevalidatinglineedit.h b/src/libs/utils/classnamevalidatinglineedit.h
index be0d6a7ede..cb1593c2c2 100644
--- a/src/libs/utils/classnamevalidatinglineedit.h
+++ b/src/libs/utils/classnamevalidatinglineedit.h
@@ -36,8 +36,7 @@ namespace Utils {
struct ClassNameValidatingLineEditPrivate;
-class QTCREATOR_UTILS_EXPORT ClassNameValidatingLineEdit
- : public Utils::FancyLineEdit
+class QTCREATOR_UTILS_EXPORT ClassNameValidatingLineEdit : public FancyLineEdit
{
Q_OBJECT
Q_PROPERTY(bool namespacesEnabled READ namespacesEnabled WRITE setNamespacesEnabled DESIGNABLE true)
diff --git a/src/libs/utils/consoleprocess_unix.cpp b/src/libs/utils/consoleprocess_unix.cpp
index 68917967dc..6e338866a3 100644
--- a/src/libs/utils/consoleprocess_unix.cpp
+++ b/src/libs/utils/consoleprocess_unix.cpp
@@ -150,7 +150,7 @@ bool ConsoleProcess::start(const QString &program, const QString &args)
}
QString stubPath = QCoreApplication::applicationDirPath();
- if (Utils::HostOsInfo::isMacHost())
+ if (HostOsInfo::isMacHost())
stubPath.append(QLatin1String("/../Resources/qtcreator_process_stub"));
else
stubPath.append(QLatin1String("/qtcreator_process_stub"));
@@ -363,7 +363,7 @@ static const Terminal knownTerminals[] =
QString ConsoleProcess::defaultTerminalEmulator()
{
- if (Utils::HostOsInfo::isMacHost()) {
+ if (HostOsInfo::isMacHost()) {
QString termCmd = QCoreApplication::applicationDirPath() + QLatin1String("/../Resources/scripts/openTerminal.command");
if (QFile(termCmd).exists())
return termCmd.replace(QLatin1Char(' '), QLatin1String("\\ "));
diff --git a/src/libs/utils/crumblepath.cpp b/src/libs/utils/crumblepath.cpp
index 85f785555c..28e808c0d3 100644
--- a/src/libs/utils/crumblepath.cpp
+++ b/src/libs/utils/crumblepath.cpp
@@ -121,18 +121,18 @@ void CrumblePathButton::paintEvent(QPaintEvent *)
if (m_isEnd) {
if (m_isPressed || m_isSelected)
- Utils::StyleHelper::drawCornerImage(m_segmentSelectedEnd, &p, geom, 2, 0, 2, 0);
+ StyleHelper::drawCornerImage(m_segmentSelectedEnd, &p, geom, 2, 0, 2, 0);
else if (m_isHovering)
- Utils::StyleHelper::drawCornerImage(m_segmentHoverEnd, &p, geom, 2, 0, 2, 0);
+ StyleHelper::drawCornerImage(m_segmentHoverEnd, &p, geom, 2, 0, 2, 0);
else
- Utils::StyleHelper::drawCornerImage(m_segmentEnd, &p, geom, 2, 0, 2, 0);
+ StyleHelper::drawCornerImage(m_segmentEnd, &p, geom, 2, 0, 2, 0);
} else {
if (m_isPressed || m_isSelected)
- Utils::StyleHelper::drawCornerImage(m_segmentSelected, &p, geom, 2, 0, 12, 0);
+ StyleHelper::drawCornerImage(m_segmentSelected, &p, geom, 2, 0, 12, 0);
else if (m_isHovering)
- Utils::StyleHelper::drawCornerImage(m_segmentHover, &p, geom, 2, 0, 12, 0);
+ StyleHelper::drawCornerImage(m_segmentHover, &p, geom, 2, 0, 12, 0);
else
- Utils::StyleHelper::drawCornerImage(m_segment, &p, geom, 2, 0, 12, 0);
+ StyleHelper::drawCornerImage(m_segment, &p, geom, 2, 0, 12, 0);
}
if (isEnabled())
p.setPen(StyleHelper::panelTextColor());
diff --git a/src/libs/utils/detailswidget.cpp b/src/libs/utils/detailswidget.cpp
index 53cda0dda4..4fcbe604f0 100644
--- a/src/libs/utils/detailswidget.cpp
+++ b/src/libs/utils/detailswidget.cpp
@@ -78,7 +78,7 @@ public:
QLabel *m_summaryLabel;
QCheckBox *m_summaryCheckBox;
QLabel *m_additionalSummaryLabel;
- Utils::FadingPanel *m_toolWidget;
+ FadingPanel *m_toolWidget;
QWidget *m_widget;
QPixmap m_collapsedPixmap;
@@ -375,7 +375,7 @@ void DetailsWidget::setWidget(QWidget *widget)
d->updateControls();
}
-void DetailsWidget::setToolWidget(Utils::FadingPanel *widget)
+void DetailsWidget::setToolWidget(FadingPanel *widget)
{
if (d->m_toolWidget == widget)
return;
diff --git a/src/libs/utils/detailswidget.h b/src/libs/utils/detailswidget.h
index 0b18c077b1..bce52a88ec 100644
--- a/src/libs/utils/detailswidget.h
+++ b/src/libs/utils/detailswidget.h
@@ -73,7 +73,7 @@ public:
QWidget *widget() const;
QWidget *takeWidget();
- void setToolWidget(Utils::FadingPanel *widget);
+ void setToolWidget(FadingPanel *widget);
QWidget *toolWidget() const;
void setSummaryFontBold(bool b);
diff --git a/src/libs/utils/environment.cpp b/src/libs/utils/environment.cpp
index 30d69e60d1..5f2e214762 100644
--- a/src/libs/utils/environment.cpp
+++ b/src/libs/utils/environment.cpp
@@ -373,23 +373,23 @@ QList<EnvironmentItem> Environment::diff(const Environment &other) const
QList<EnvironmentItem> result;
while (thisIt != constEnd() || otherIt != other.constEnd()) {
if (thisIt == constEnd()) {
- result.append(Utils::EnvironmentItem(otherIt.key(), otherIt.value()));
+ result.append(EnvironmentItem(otherIt.key(), otherIt.value()));
++otherIt;
} else if (otherIt == constEnd()) {
- Utils::EnvironmentItem item(thisIt.key(), QString());
+ EnvironmentItem item(thisIt.key(), QString());
item.unset = true;
result.append(item);
++thisIt;
} else if (thisIt.key() < otherIt.key()) {
- Utils::EnvironmentItem item(thisIt.key(), QString());
+ EnvironmentItem item(thisIt.key(), QString());
item.unset = true;
result.append(item);
++thisIt;
} else if (thisIt.key() > otherIt.key()) {
- result.append(Utils::EnvironmentItem(otherIt.key(), otherIt.value()));
+ result.append(EnvironmentItem(otherIt.key(), otherIt.value()));
++otherIt;
} else {
- result.append(Utils::EnvironmentItem(otherIt.key(), otherIt.value()));
+ result.append(EnvironmentItem(otherIt.key(), otherIt.value()));
++otherIt;
++thisIt;
}
diff --git a/src/libs/utils/environmentmodel.cpp b/src/libs/utils/environmentmodel.cpp
index bb2967fcd7..6d00b6ce91 100644
--- a/src/libs/utils/environmentmodel.cpp
+++ b/src/libs/utils/environmentmodel.cpp
@@ -47,7 +47,7 @@ public:
m_resultEnvironment.modify(m_items);
// Add removed variables again and mark them as "<UNSET>" so
// that the user can actually see those removals:
- foreach (const Utils::EnvironmentItem &item, m_items) {
+ foreach (const EnvironmentItem &item, m_items) {
if (item.unset)
m_resultEnvironment.set(item.name, EnvironmentModel::tr("<UNSET>"));
}
@@ -63,7 +63,7 @@ public:
int findInResultInsertPosition(const QString &name) const
{
- Utils::Environment::const_iterator it;
+ Environment::const_iterator it;
int i = 0;
for (it = m_resultEnvironment.constBegin(); it != m_resultEnvironment.constEnd(); ++it, ++i)
if (m_resultEnvironment.key(it) > name)
@@ -73,7 +73,7 @@ public:
int findInResult(const QString &name) const
{
- Utils::Environment::const_iterator it;
+ Environment::const_iterator it;
int i = 0;
for (it = m_resultEnvironment.constBegin(); it != m_resultEnvironment.constEnd(); ++it, ++i)
if (m_resultEnvironment.key(it) == name)
@@ -81,9 +81,9 @@ public:
return -1;
}
- Utils::Environment m_baseEnvironment;
- Utils::Environment m_resultEnvironment;
- QList<Utils::EnvironmentItem> m_items;
+ Environment m_baseEnvironment;
+ Environment m_resultEnvironment;
+ QList<EnvironmentItem> m_items;
};
} // namespace Internal
@@ -103,7 +103,7 @@ QString EnvironmentModel::indexToVariable(const QModelIndex &index) const
return d->m_resultEnvironment.key(d->m_resultEnvironment.constBegin() + index.row());
}
-void EnvironmentModel::setBaseEnvironment(const Utils::Environment &env)
+void EnvironmentModel::setBaseEnvironment(const Environment &env)
{
if (d->m_baseEnvironment == env)
return;
@@ -215,7 +215,7 @@ bool EnvironmentModel::setData(const QModelIndex &index, const QVariant &value,
if (d->m_resultEnvironment.hasKey(newName) || newName.isEmpty())
return false;
- Utils::EnvironmentItem newVariable(newName, oldValue);
+ EnvironmentItem newVariable(newName, oldValue);
if (changesPos != -1)
resetVariable(oldName); // restore the original base variable again
@@ -238,7 +238,7 @@ bool EnvironmentModel::setData(const QModelIndex &index, const QVariant &value,
}
} else {
// Add a new change item:
- d->m_items.append(Utils::EnvironmentItem(oldName, stringValue));
+ d->m_items.append(EnvironmentItem(oldName, stringValue));
}
d->updateResultEnvironment();
emit dataChanged(index, index);
@@ -251,12 +251,12 @@ bool EnvironmentModel::setData(const QModelIndex &index, const QVariant &value,
QModelIndex EnvironmentModel::addVariable()
{
//: Name when inserting a new variable
- return addVariable(Utils::EnvironmentItem(tr("<VARIABLE>"),
- //: Value when inserting a new variable
- tr("<VALUE>")));
+ return addVariable(EnvironmentItem(tr("<VARIABLE>"),
+ //: Value when inserting a new variable
+ tr("<VALUE>")));
}
-QModelIndex EnvironmentModel::addVariable(const Utils::EnvironmentItem &item)
+QModelIndex EnvironmentModel::addVariable(const EnvironmentItem &item)
{
// Return existing index if the name is already in the result set:
@@ -331,7 +331,7 @@ void EnvironmentModel::unsetVariable(const QString &name)
emit userChangesChanged();
return;
}
- Utils::EnvironmentItem item(name, QString());
+ EnvironmentItem item(name, QString());
item.unset = true;
d->m_items.append(item);
d->updateResultEnvironment();
@@ -353,12 +353,12 @@ bool EnvironmentModel::canReset(const QString &name)
return d->m_baseEnvironment.hasKey(name);
}
-QList<Utils::EnvironmentItem> EnvironmentModel::userChanges() const
+QList<EnvironmentItem> EnvironmentModel::userChanges() const
{
return d->m_items;
}
-void EnvironmentModel::setUserChanges(QList<Utils::EnvironmentItem> list)
+void EnvironmentModel::setUserChanges(QList<EnvironmentItem> list)
{
// We assume nobody is reordering the items here.
if (list == d->m_items)
diff --git a/src/libs/utils/environmentmodel.h b/src/libs/utils/environmentmodel.h
index 340b2c9009..782d192247 100644
--- a/src/libs/utils/environmentmodel.h
+++ b/src/libs/utils/environmentmodel.h
@@ -56,7 +56,7 @@ public:
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
QModelIndex addVariable();
- QModelIndex addVariable(const Utils::EnvironmentItem &item);
+ QModelIndex addVariable(const EnvironmentItem &item);
void resetVariable(const QString &name);
void unsetVariable(const QString &name);
bool canUnset(const QString &name);
@@ -64,9 +64,9 @@ public:
QString indexToVariable(const QModelIndex &index) const;
QModelIndex variableToIndex(const QString &name) const;
bool changes(const QString &key) const;
- void setBaseEnvironment(const Utils::Environment &env);
- QList<Utils::EnvironmentItem> userChanges() const;
- void setUserChanges(QList<Utils::EnvironmentItem> list);
+ void setBaseEnvironment(const Environment &env);
+ QList<EnvironmentItem> userChanges() const;
+ void setUserChanges(QList<EnvironmentItem> list);
signals:
void userChangesChanged();
diff --git a/src/libs/utils/fancylineedit.h b/src/libs/utils/fancylineedit.h
index 27be689831..61cabefd13 100644
--- a/src/libs/utils/fancylineedit.h
+++ b/src/libs/utils/fancylineedit.h
@@ -177,7 +177,7 @@ private:
void updateMargins();
void updateButtonPositions();
- friend class Utils::FancyLineEditPrivate;
+ friend class FancyLineEditPrivate;
FancyLineEditPrivate *d;
};
diff --git a/src/libs/utils/fileutils.cpp b/src/libs/utils/fileutils.cpp
index 4993f99a48..146a03dc64 100644
--- a/src/libs/utils/fileutils.cpp
+++ b/src/libs/utils/fileutils.cpp
@@ -644,7 +644,7 @@ bool FileName::isChildOf(const FileName &s) const
/// \overload
bool FileName::isChildOf(const QDir &dir) const
{
- return isChildOf(Utils::FileName::fromString(dir.absolutePath()));
+ return isChildOf(FileName::fromString(dir.absolutePath()));
}
/// \returns whether FileName endsWith \a s
@@ -659,7 +659,7 @@ bool FileName::endsWith(const QString &s) const
FileName FileName::relativeChildPath(const FileName &parent) const
{
if (!isChildOf(parent))
- return Utils::FileName();
+ return FileName();
return FileName(QString::mid(parent.size() + 1, -1));
}
diff --git a/src/libs/utils/fileutils.h b/src/libs/utils/fileutils.h
index b2dbd66ac1..8a7edeef38 100644
--- a/src/libs/utils/fileutils.h
+++ b/src/libs/utils/fileutils.h
@@ -80,10 +80,10 @@ public:
bool isChildOf(const QDir &dir) const;
bool endsWith(const QString &s) const;
- Utils::FileName relativeChildPath(const FileName &parent) const;
- Utils::FileName &appendPath(const QString &s);
- Utils::FileName &appendString(const QString &str);
- Utils::FileName &appendString(QChar str);
+ FileName relativeChildPath(const FileName &parent) const;
+ FileName &appendPath(const QString &s);
+ FileName &appendString(const QString &str);
+ FileName &appendString(QChar str);
using QString::size;
using QString::count;
diff --git a/src/libs/utils/filewizardpage.cpp b/src/libs/utils/filewizardpage.cpp
index 8fcd6afa98..66594b5e91 100644
--- a/src/libs/utils/filewizardpage.cpp
+++ b/src/libs/utils/filewizardpage.cpp
@@ -69,7 +69,7 @@ FileWizardPage::FileWizardPage(QWidget *parent) :
connect(d->m_ui.pathChooser, SIGNAL(returnPressed()), this, SLOT(slotActivated()));
connect(d->m_ui.nameLineEdit, SIGNAL(validReturnPressed()), this, SLOT(slotActivated()));
- setProperty(Utils::SHORT_TITLE_PROPERTY, tr("Location"));
+ setProperty(SHORT_TITLE_PROPERTY, tr("Location"));
}
FileWizardPage::~FileWizardPage()
diff --git a/src/libs/utils/ipaddresslineedit.cpp b/src/libs/utils/ipaddresslineedit.cpp
index c051b1438d..6291bc993e 100644
--- a/src/libs/utils/ipaddresslineedit.cpp
+++ b/src/libs/utils/ipaddresslineedit.cpp
@@ -90,7 +90,7 @@ bool IpAddressLineEdit::validate(const QString &value, QString *errorMessage) co
void IpAddressLineEdit::handleChanged(const QString &t)
{
- Utils::FancyLineEdit::handleChanged(t);
+ FancyLineEdit::handleChanged(t);
if (isValid())
emit validAddressChanged(t);
else
diff --git a/src/libs/utils/ipaddresslineedit.h b/src/libs/utils/ipaddresslineedit.h
index 848c78a839..b62de39534 100644
--- a/src/libs/utils/ipaddresslineedit.h
+++ b/src/libs/utils/ipaddresslineedit.h
@@ -36,7 +36,7 @@ namespace Utils {
class IpAddressLineEditPrivate;
-class QTCREATOR_UTILS_EXPORT IpAddressLineEdit : public Utils::FancyLineEdit
+class QTCREATOR_UTILS_EXPORT IpAddressLineEdit : public FancyLineEdit
{
Q_OBJECT
diff --git a/src/libs/utils/json.h b/src/libs/utils/json.h
index f2d7ac23e8..636139abbf 100644
--- a/src/libs/utils/json.h
+++ b/src/libs/utils/json.h
@@ -398,22 +398,22 @@ public:
JsonSchemaManager(const QStringList &searchPaths);
~JsonSchemaManager();
- Utils::JsonSchema *schemaForFile(const QString &fileName) const;
- Utils::JsonSchema *schemaByName(const QString &baseName) const;
+ JsonSchema *schemaForFile(const QString &fileName) const;
+ JsonSchema *schemaByName(const QString &baseName) const;
private:
struct JsonSchemaData
{
- JsonSchemaData(const QString &absoluteFileName, Utils::JsonSchema *schema = 0)
+ JsonSchemaData(const QString &absoluteFileName, JsonSchema *schema = 0)
: m_absoluteFileName(absoluteFileName)
, m_schema(schema)
{}
QString m_absoluteFileName;
- Utils::JsonSchema *m_schema;
+ JsonSchema *m_schema;
QDateTime m_lastParseAttempt;
};
- Utils::JsonSchema *parseSchema(const QString &schemaFileName) const;
+ JsonSchema *parseSchema(const QString &schemaFileName) const;
QStringList m_searchPaths;
mutable QHash<QString, JsonSchemaData> m_schemas;
diff --git a/src/libs/utils/navigationtreeview.h b/src/libs/utils/navigationtreeview.h
index f9846f3dff..6e12ca95ec 100644
--- a/src/libs/utils/navigationtreeview.h
+++ b/src/libs/utils/navigationtreeview.h
@@ -36,7 +36,7 @@
namespace Utils {
-class QTCREATOR_UTILS_EXPORT NavigationTreeView : public Utils::TreeView
+class QTCREATOR_UTILS_EXPORT NavigationTreeView : public TreeView
{
Q_OBJECT
public:
diff --git a/src/libs/utils/pathchooser.cpp b/src/libs/utils/pathchooser.cpp
index e13c5855d6..25f10a30ca 100644
--- a/src/libs/utils/pathchooser.cpp
+++ b/src/libs/utils/pathchooser.cpp
@@ -148,7 +148,7 @@ QString BinaryVersionToolTipEventFilter::toolVersion(const QString &binary, cons
if (!proc.waitForStarted())
return QString();
if (!proc.waitForFinished()) {
- Utils::SynchronousProcess::stopProcess(proc);
+ SynchronousProcess::stopProcess(proc);
return QString();
}
return QString::fromLocal8Bit(QByteArray(proc.readAllStandardOutput()
@@ -271,7 +271,7 @@ void PathChooser::insertButton(int index, const QString &text, QObject *receiver
d->m_buttons.insert(index, button);
}
-QString Utils::PathChooser::browseButtonLabel()
+QString PathChooser::browseButtonLabel()
{
return HostOsInfo::isMacHost() ? tr("Choose...") : tr("Browse...");
}
@@ -296,7 +296,7 @@ void PathChooser::setBaseDirectory(const QString &directory)
FileName PathChooser::baseFileName() const
{
- return Utils::FileName::fromString(d->m_baseDirectory);
+ return FileName::fromString(d->m_baseDirectory);
}
void PathChooser::setBaseFileName(const FileName &base)
@@ -305,7 +305,7 @@ void PathChooser::setBaseFileName(const FileName &base)
triggerChanged();
}
-void PathChooser::setEnvironment(const Utils::Environment &env)
+void PathChooser::setEnvironment(const Environment &env)
{
QString oldExpand = path();
d->m_environment = env;
@@ -327,7 +327,7 @@ QString PathChooser::rawPath() const
FileName PathChooser::fileName() const
{
- return Utils::FileName::fromString(path());
+ return FileName::fromString(path());
}
void PathChooser::setPath(const QString &path)
@@ -335,7 +335,7 @@ void PathChooser::setPath(const QString &path)
d->m_lineEdit->setText(QDir::toNativeSeparators(path));
}
-void PathChooser::setFileName(const Utils::FileName &fn)
+void PathChooser::setFileName(const FileName &fn)
{
d->m_lineEdit->setText(fn.toUserOutput());
}
diff --git a/src/libs/utils/pathchooser.h b/src/libs/utils/pathchooser.h
index 86250849a8..e650efbcb5 100644
--- a/src/libs/utils/pathchooser.h
+++ b/src/libs/utils/pathchooser.h
@@ -94,15 +94,15 @@ public:
QString path() const;
QString rawPath() const; // The raw unexpanded input.
- Utils::FileName fileName() const;
+ FileName fileName() const;
QString baseDirectory() const;
void setBaseDirectory(const QString &directory);
- Utils::FileName baseFileName() const;
- void setBaseFileName(const Utils::FileName &base);
+ FileName baseFileName() const;
+ void setBaseFileName(const FileName &base);
- void setEnvironment(const Utils::Environment &env);
+ void setEnvironment(const Environment &env);
/** Returns the suggested label title when used in a form layout. */
static QString label();
diff --git a/src/libs/utils/persistentsettings.cpp b/src/libs/utils/persistentsettings.cpp
index 80ffd46dde..bdfc54ba4c 100644
--- a/src/libs/utils/persistentsettings.cpp
+++ b/src/libs/utils/persistentsettings.cpp
@@ -350,7 +350,7 @@ QVariantMap PersistentSettingsReader::restoreValues() const
return m_valueMap;
}
-bool PersistentSettingsReader::load(const Utils::FileName &fileName)
+bool PersistentSettingsReader::load(const FileName &fileName)
{
m_valueMap.clear();
@@ -442,7 +442,7 @@ bool PersistentSettingsWriter::write(const QVariantMap &data, QWidget *parent) c
{
QDir tmp;
tmp.mkpath(m_fileName.toFileInfo().path());
- Utils::FileSaver saver(m_fileName.toString(), QIODevice::Text);
+ FileSaver saver(m_fileName.toString(), QIODevice::Text);
if (!saver.hasError()) {
const Context ctx;
QXmlStreamWriter w(saver.file());
diff --git a/src/libs/utils/persistentsettings.h b/src/libs/utils/persistentsettings.h
index 947355cb12..834c875ad7 100644
--- a/src/libs/utils/persistentsettings.h
+++ b/src/libs/utils/persistentsettings.h
@@ -60,12 +60,12 @@ public:
bool save(const QVariantMap &data, QWidget *parent) const;
- Utils::FileName fileName() const;
+ FileName fileName() const;
private:
bool write(const QVariantMap &data, QWidget *parent) const;
- const Utils::FileName m_fileName;
+ const FileName m_fileName;
const QString m_docType;
mutable QMap<QString, QVariant> m_savedData;
};
diff --git a/src/libs/utils/reloadpromptutils.cpp b/src/libs/utils/reloadpromptutils.cpp
index 0b632e385a..664b47dba0 100644
--- a/src/libs/utils/reloadpromptutils.cpp
+++ b/src/libs/utils/reloadpromptutils.cpp
@@ -34,11 +34,11 @@
#include <QMessageBox>
#include <QPushButton>
-using namespace Utils;
+namespace Utils {
-QTCREATOR_UTILS_EXPORT Utils::ReloadPromptAnswer Utils::reloadPrompt(const QString &fileName,
- bool modified,
- QWidget *parent)
+QTCREATOR_UTILS_EXPORT ReloadPromptAnswer reloadPrompt(const QString &fileName,
+ bool modified,
+ QWidget *parent)
{
const QString title = QCoreApplication::translate("Utils::reloadPrompt", "File Changed");
@@ -56,10 +56,10 @@ QTCREATOR_UTILS_EXPORT Utils::ReloadPromptAnswer Utils::reloadPrompt(const QStri
return reloadPrompt(title, msg, QDir::toNativeSeparators(fileName), parent);
}
-QTCREATOR_UTILS_EXPORT Utils::ReloadPromptAnswer Utils::reloadPrompt(const QString &title,
- const QString &prompt,
- const QString &details,
- QWidget *parent)
+QTCREATOR_UTILS_EXPORT ReloadPromptAnswer reloadPrompt(const QString &title,
+ const QString &prompt,
+ const QString &details,
+ QWidget *parent)
{
QMessageBox msg(parent);
msg.setStandardButtons(QMessageBox::Yes | QMessageBox::YesToAll | QMessageBox::Close
@@ -84,8 +84,8 @@ QTCREATOR_UTILS_EXPORT Utils::ReloadPromptAnswer Utils::reloadPrompt(const QStri
return ReloadNone;
}
-QTCREATOR_UTILS_EXPORT Utils::FileDeletedPromptAnswer
- Utils::fileDeletedPrompt(const QString &fileName, bool triggerExternally, QWidget *parent)
+QTCREATOR_UTILS_EXPORT FileDeletedPromptAnswer
+ fileDeletedPrompt(const QString &fileName, bool triggerExternally, QWidget *parent)
{
const QString title = QCoreApplication::translate("Utils::fileDeletedPrompt",
"File has been removed");
@@ -127,3 +127,5 @@ QTCREATOR_UTILS_EXPORT Utils::FileDeletedPromptAnswer
return FileDeletedSave;
return FileDeletedClose;
}
+
+} // namespace Utils
diff --git a/src/libs/utils/tcpportsgatherer.cpp b/src/libs/utils/tcpportsgatherer.cpp
index abd11cf9ad..b25d95f954 100644
--- a/src/libs/utils/tcpportsgatherer.cpp
+++ b/src/libs/utils/tcpportsgatherer.cpp
@@ -270,9 +270,9 @@ void TcpPortsGatherer::update(QAbstractSocket::NetworkLayerProtocol protocol)
d->protocol = protocol;
d->usedPorts.clear();
- if (Utils::HostOsInfo::isWindowsHost())
+ if (HostOsInfo::isWindowsHost())
d->updateWin();
- else if (Utils::HostOsInfo::isLinuxHost())
+ else if (HostOsInfo::isLinuxHost())
d->updateLinux();
else
d->updateNetstat();
diff --git a/src/libs/utils/textfileformat.cpp b/src/libs/utils/textfileformat.cpp
index f9a2e21c86..9aceec7dd1 100644
--- a/src/libs/utils/textfileformat.cpp
+++ b/src/libs/utils/textfileformat.cpp
@@ -213,7 +213,7 @@ TextFileFormat::ReadResult readTextFile(const QString &fileName, const QTextCode
QByteArray data;
try {
- Utils::FileReader reader;
+ FileReader reader;
if (!reader.fetch(fileName, errorString))
return TextFileFormat::ReadIOError;
data = reader.data();
@@ -277,16 +277,16 @@ TextFileFormat::ReadResult TextFileFormat::readFileUTF8(const QString &fileName,
{
QByteArray data;
try {
- Utils::FileReader reader;
+ FileReader reader;
if (!reader.fetch(fileName, errorString))
- return Utils::TextFileFormat::ReadIOError;
+ return TextFileFormat::ReadIOError;
data = reader.data();
} catch (const std::bad_alloc &) {
*errorString = QCoreApplication::translate("Utils::TextFileFormat", "Out of memory.");
- return Utils::TextFileFormat::ReadMemoryAllocationError;
+ return TextFileFormat::ReadMemoryAllocationError;
}
- Utils::TextFileFormat format = Utils::TextFileFormat::detect(data);
+ TextFileFormat format = TextFileFormat::detect(data);
if (!format.codec)
format.codec = defaultCodec ? defaultCodec : QTextCodec::codecForLocale();
QString target;
@@ -294,10 +294,10 @@ TextFileFormat::ReadResult TextFileFormat::readFileUTF8(const QString &fileName,
if (format.hasUtf8Bom)
data.remove(0, 3);
*plainText = data;
- return Utils::TextFileFormat::ReadSuccess;
+ return TextFileFormat::ReadSuccess;
}
*plainText = target.toUtf8();
- return Utils::TextFileFormat::ReadSuccess;
+ return TextFileFormat::ReadSuccess;
}
/*!
@@ -318,7 +318,7 @@ bool TextFileFormat::writeFile(const QString &fileName, QString plainText, QStri
plainText.replace(QLatin1Char('\n'), QLatin1String("\r\n"));
}
- Utils::FileSaver saver(fileName, fileMode);
+ FileSaver saver(fileName, fileMode);
if (!saver.hasError()) {
if (hasUtf8Bom && codec->name() == "UTF-8")
saver.write("\xef\xbb\xbf", 3);
diff --git a/src/libs/utils/tooltip/reuse.h b/src/libs/utils/tooltip/reuse.h
index afaee3136d..9398924478 100644
--- a/src/libs/utils/tooltip/reuse.h
+++ b/src/libs/utils/tooltip/reuse.h
@@ -51,7 +51,7 @@ inline int screenNumber(const QPoint &pos, QWidget *w)
inline QRect screenGeometry(const QPoint &pos, QWidget *w)
{
- if (Utils::HostOsInfo::isMacHost())
+ if (HostOsInfo::isMacHost())
return QApplication::desktop()->availableGeometry(screenNumber(pos, w));
return QApplication::desktop()->screenGeometry(screenNumber(pos, w));
}
diff --git a/src/libs/utils/tooltip/tips.cpp b/src/libs/utils/tooltip/tips.cpp
index 25572d99b2..f85abe4959 100644
--- a/src/libs/utils/tooltip/tips.cpp
+++ b/src/libs/utils/tooltip/tips.cpp
@@ -72,7 +72,7 @@ QTipLabel::QTipLabel(QWidget *parent) :
QTipLabel::~QTipLabel()
{
- Utils::TipContent *tmpTipContent = m_tipContent;
+ TipContent *tmpTipContent = m_tipContent;
m_tipContent = 0;
delete tmpTipContent;
}
@@ -84,7 +84,7 @@ bool QTipLabel::isInteractive() const
void QTipLabel::setContent(const TipContent &content)
{
- Utils::TipContent *tmpTipContent = m_tipContent;
+ TipContent *tmpTipContent = m_tipContent;
m_tipContent = content.clone();
delete tmpTipContent;
}
diff --git a/src/libs/utils/tooltip/tips.h b/src/libs/utils/tooltip/tips.h
index 84c776a65e..168731ab6b 100644
--- a/src/libs/utils/tooltip/tips.h
+++ b/src/libs/utils/tooltip/tips.h
@@ -53,16 +53,16 @@ protected:
public:
virtual ~QTipLabel();
- void setContent(const Utils::TipContent &content);
- const Utils::TipContent &content() const;
+ void setContent(const TipContent &content);
+ const TipContent &content() const;
virtual void configure(const QPoint &pos, QWidget *w) = 0;
- virtual bool canHandleContentReplacement(const Utils::TipContent &content) const = 0;
+ virtual bool canHandleContentReplacement(const TipContent &content) const = 0;
bool isInteractive() const;
private:
- Utils::TipContent *m_tipContent;
+ TipContent *m_tipContent;
};
class ColorTip : public QTipLabel
diff --git a/src/libs/utils/tooltip/tooltip.cpp b/src/libs/utils/tooltip/tooltip.cpp
index 35450e8a74..8521b04b44 100644
--- a/src/libs/utils/tooltip/tooltip.cpp
+++ b/src/libs/utils/tooltip/tooltip.cpp
@@ -222,7 +222,7 @@ void ToolTip::placeTip(const QPoint &pos, QWidget *w)
{
QRect screen = Internal::screenGeometry(pos, w);
QPoint p = pos;
- p += QPoint(2, Utils::HostOsInfo::isWindowsHost() ? 21 : 16);
+ p += QPoint(2, HostOsInfo::isWindowsHost() ? 21 : 16);
if (p.x() + m_tip->width() > screen.x() + screen.width())
p.rx() -= 4 + m_tip->width();
if (p.y() + m_tip->height() > screen.y() + screen.height())
diff --git a/src/libs/utils/wizard.cpp b/src/libs/utils/wizard.cpp
index 58c21cdcc3..ed534716d4 100644
--- a/src/libs/utils/wizard.cpp
+++ b/src/libs/utils/wizard.cpp
@@ -326,7 +326,7 @@ Wizard::Wizard(QWidget *parent, Qt::WindowFlags flags) :
setOption(QWizard::NoBackButtonOnStartPage, true);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
- if (Utils::HostOsInfo::isMacHost()) {
+ if (HostOsInfo::isMacHost()) {
setButtonLayout(QList<QWizard::WizardButton>()
<< QWizard::CancelButton
<< QWizard::Stretch