Commit 62d98daa authored by Orgad Shaneh's avatar Orgad Shaneh Committed by hjk
Browse files

Utils: Remove unneeded namespace qualifications



Change-Id: Iacab8410ab4d3b63f96e7541b450e3cc729ab662
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent e6394559
......@@ -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()));
......
......@@ -36,7 +36,7 @@
namespace Utils {
class QTCREATOR_UTILS_EXPORT BaseTreeView : public Utils::TreeView
class QTCREATOR_UTILS_EXPORT BaseTreeView : public TreeView
{
Q_OBJECT
......
......@@ -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();
}
......
......@@ -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;
......
......@@ -65,7 +65,7 @@ ClassNameValidatingLineEditPrivate:: ClassNameValidatingLineEditPrivate() :
// --------------------- ClassNameValidatingLineEdit
ClassNameValidatingLineEdit::ClassNameValidatingLineEdit(QWidget *parent) :
Utils::FancyLineEdit(parent),
FancyLineEdit(parent),
d(new ClassNameValidatingLineEditPrivate)
{
updateRegExp();
......
......@@ -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)
......
......@@ -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("\\ "));
......
......@@ -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());
......
......@@ -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;
......
......@@ -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);
......
......@@ -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;
}
......
......@@ -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)
......
......@@ -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();
......
......@@ -177,7 +177,7 @@ private:
void updateMargins();
void updateButtonPositions();
friend class Utils::FancyLineEditPrivate;
friend class FancyLineEditPrivate;
FancyLineEditPrivate *d;
};
......
......@@ -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));
}
......
......@@ -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;
......
......@@ -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()
......
......@@ -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
......
......@@ -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
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment