Commit 5948e284 authored by Friedemann Kleint's avatar Friedemann Kleint

Rename namespace Core::Utils into Utils

Also move Designer::Internal::FormWindowEditor ->
Designer::FormWindowEditor.
parent 406d35ac
......@@ -34,7 +34,6 @@
#include <QtCore/QStringList>
namespace Core {
namespace Utils {
class QTCREATOR_UTILS_EXPORT AbstractProcess
......@@ -75,7 +74,6 @@ private:
};
} //namespace Utils
} //namespace Core
#endif // ABSTRACTPROCESS_H
......@@ -31,7 +31,6 @@
#include <windows.h>
namespace Core {
namespace Utils {
QStringList AbstractProcess::fixWinEnvironment(const QStringList &env)
......@@ -114,4 +113,3 @@ QByteArray AbstractProcess::createWinEnvironment(const QStringList &env)
}
} //namespace Utils
} //namespace Core
......@@ -33,7 +33,6 @@
enum { debug = 0 };
namespace Core {
namespace Utils {
struct BaseValidatingLineEditPrivate {
......@@ -156,4 +155,3 @@ void BaseValidatingLineEdit::triggerChanged()
}
} // namespace Utils
} // namespace Core
......@@ -34,7 +34,6 @@
#include <QtGui/QLineEdit>
namespace Core {
namespace Utils {
struct BaseValidatingLineEditPrivate;
......@@ -98,6 +97,5 @@ private:
};
} // namespace Utils
} // namespace Core
#endif // BASEVALIDATINGLINEEDIT_H
......@@ -4,7 +4,6 @@
#include <QtGui/QPushButton>
#include <QtCore/QDebug>
namespace Core {
namespace Utils {
struct CheckableMessageBoxPrivate {
......@@ -147,4 +146,3 @@ QMessageBox::StandardButton CheckableMessageBox::dialogButtonBoxToMessageBoxButt
}
} // namespace Utils
} // namespace Core
......@@ -7,7 +7,6 @@
#include <QtGui/QMessageBox>
#include <QtGui/QDialog>
namespace Core {
namespace Utils {
struct CheckableMessageBoxPrivate;
......@@ -72,6 +71,5 @@ private:
};
} // namespace Utils
} // namespace Core
#endif // CHECKABLEMESSAGEBOX_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Core::Utils::CheckableMessageBox</class>
<widget class="QDialog" name="Core::Utils::CheckableMessageBox">
<class>Utils::CheckableMessageBox</class>
<widget class="QDialog" name="Utils::CheckableMessageBox">
<property name="geometry">
<rect>
<x>0</x>
......@@ -121,7 +121,7 @@
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>Core::Utils::CheckableMessageBox</receiver>
<receiver>Utils::CheckableMessageBox</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
......@@ -137,7 +137,7 @@
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>Core::Utils::CheckableMessageBox</receiver>
<receiver>Utils::CheckableMessageBox</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
......
......@@ -34,7 +34,6 @@
#include <QtCore/QDebug>
#include <QtCore/QRegExp>
namespace Core {
namespace Utils {
struct ClassNameValidatingLineEditPrivate {
......@@ -58,7 +57,7 @@ ClassNameValidatingLineEditPrivate:: ClassNameValidatingLineEditPrivate() :
// --------------------- ClassNameValidatingLineEdit
ClassNameValidatingLineEdit::ClassNameValidatingLineEdit(QWidget *parent) :
Core::Utils::BaseValidatingLineEdit(parent),
Utils::BaseValidatingLineEdit(parent),
m_d(new ClassNameValidatingLineEditPrivate)
{
}
......@@ -98,7 +97,7 @@ bool ClassNameValidatingLineEdit::validate(const QString &value, QString *errorM
void ClassNameValidatingLineEdit::slotChanged(const QString &t)
{
Core::Utils::BaseValidatingLineEdit::slotChanged(t);
Utils::BaseValidatingLineEdit::slotChanged(t);
if (isValid()) {
// Suggest file names, strip namespaces
QString fileName = m_d->m_lowerCaseFileName ? t.toLower() : t;
......@@ -148,4 +147,3 @@ void ClassNameValidatingLineEdit::setLowerCaseFileName(bool v)
}
} // namespace Utils
} // namespace Core
......@@ -33,7 +33,6 @@
#include "utils_global.h"
#include "basevalidatinglineedit.h"
namespace Core {
namespace Utils {
struct ClassNameValidatingLineEditPrivate;
......@@ -42,7 +41,7 @@ struct ClassNameValidatingLineEditPrivate;
* to derive suggested file names from it. */
class QTCREATOR_UTILS_EXPORT ClassNameValidatingLineEdit
: public Core::Utils::BaseValidatingLineEdit
: public Utils::BaseValidatingLineEdit
{
Q_DISABLE_COPY(ClassNameValidatingLineEdit)
Q_PROPERTY(bool namespacesEnabled READ namespacesEnabled WRITE setNamespacesEnabled DESIGNABLE true)
......@@ -76,6 +75,5 @@ private:
};
} // namespace Utils
} // namespace Core
#endif // CLASSNAMEVALIDATINGLINEEDIT_H
......@@ -33,7 +33,6 @@
#include <QtCore/QStringList>
#include <QtCore/QFileInfo>
namespace Core {
namespace Utils {
static QString toAlphaNum(const QString &s)
......@@ -101,4 +100,3 @@ void writeClosingNameSpaces(const QStringList &l, const QString &indent,
}
} // namespace Utils
} // namespace Core
......@@ -38,7 +38,6 @@ class QTextStream;
class QStringList;
QT_END_NAMESPACE
namespace Core {
namespace Utils {
QTCREATOR_UTILS_EXPORT QString headerGuard(const QString &file);
......@@ -62,6 +61,5 @@ void writeClosingNameSpaces(const QStringList &namespaces,
QTextStream &str);
} // namespace Utils
} // namespace Core
#endif // CODEGENERATION_H
......@@ -29,7 +29,6 @@
#include "consoleprocess.h"
namespace Core {
namespace Utils {
QString ConsoleProcess::modeOption(Mode m)
......@@ -83,4 +82,3 @@ QString ConsoleProcess::msgCannotExecute(const QString & p, const QString &why)
}
}
}
......@@ -51,7 +51,6 @@ class QSettings;
class QTemporaryFile;
QT_END_NAMESPACE
namespace Core {
namespace Utils {
class QTCREATOR_UTILS_EXPORT ConsoleProcess : public QObject, public AbstractProcess
......@@ -138,6 +137,5 @@ private:
};
} //namespace Utils
} //namespace Core
#endif
......@@ -42,7 +42,7 @@
#include <string.h>
#include <unistd.h>
using namespace Core::Utils;
using namespace Utils;
ConsoleProcess::ConsoleProcess(QObject *parent) :
QObject(parent),
......
......@@ -40,7 +40,7 @@
#include <stdlib.h>
using namespace Core::Utils;
using namespace Utils;
ConsoleProcess::ConsoleProcess(QObject *parent) :
QObject(parent),
......
......@@ -39,7 +39,6 @@
enum { margin = 6 };
namespace Core {
namespace Utils {
static inline QString sideToStyleSheetString(FancyLineEdit::Side side)
......@@ -311,4 +310,3 @@ QString FancyLineEdit::typedText() const
}
} // namespace Utils
} // namespace Core
......@@ -34,7 +34,6 @@
#include <QtGui/QLineEdit>
namespace Core {
namespace Utils {
class FancyLineEditPrivate;
......@@ -107,6 +106,5 @@ private:
};
} // namespace Utils
} // namespace Core
#endif // FANCYLINEEDIT_H
......@@ -35,7 +35,7 @@
#include <QtCore/QSettings>
using namespace Core::Utils;
using namespace Utils;
FancyMainWindow::FancyMainWindow(QWidget *parent)
: QMainWindow(parent),
......
......@@ -41,7 +41,6 @@ QT_BEGIN_NAMESPACE
class QSettings;
QT_END_NAMESPACE
namespace Core {
namespace Utils {
class QTCREATOR_UTILS_EXPORT FancyMainWindow : public QMainWindow
......@@ -85,6 +84,5 @@ private:
};
} // namespace Utils
} // namespace Core
#endif // FANCYMAINWINDOW_H
......@@ -33,7 +33,6 @@
#include <QtCore/QRegExp>
#include <QtCore/QDebug>
namespace Core {
namespace Utils {
#define WINDOWS_DEVICES "CON|AUX|PRN|COM1|COM2|LPT1|LPT2|NUL"
......@@ -133,4 +132,3 @@ bool FileNameValidatingLineEdit::validate(const QString &value, QString *errorM
}
} // namespace Utils
} // namespace Core
......@@ -32,7 +32,6 @@
#include "basevalidatinglineedit.h"
namespace Core {
namespace Utils {
/**
......@@ -67,6 +66,5 @@ private:
};
} // namespace Utils
} // namespace Core
#endif // FILENAMEVALIDATINGLINEEDIT_H
......@@ -40,11 +40,11 @@
#include <qtconcurrent/runextensions.h>
using namespace Core::Utils;
using namespace Utils;
static inline QString msgCanceled(const QString &searchTerm, int numMatches, int numFilesSearched)
{
return QCoreApplication::translate("Core::Utils::FileSearch",
return QCoreApplication::translate("Utils::FileSearch",
"%1: canceled. %n occurrences found in %2 files.",
0, QCoreApplication::CodecForTr, numMatches).
arg(searchTerm).arg(numFilesSearched);
......@@ -52,7 +52,7 @@ static inline QString msgCanceled(const QString &searchTerm, int numMatches, int
static inline QString msgFound(const QString &searchTerm, int numMatches, int numFilesSearched)
{
return QCoreApplication::translate("Core::Utils::FileSearch",
return QCoreApplication::translate("Utils::FileSearch",
"%1: %n occurrences found in %2 files.",
0, QCoreApplication::CodecForTr, numMatches).
arg(searchTerm).arg(numFilesSearched);
......@@ -60,7 +60,7 @@ static inline QString msgFound(const QString &searchTerm, int numMatches, int nu
static inline QString msgFound(const QString &searchTerm, int numMatches, int numFilesSearched, int filesSize)
{
return QCoreApplication::translate("Core::Utils::FileSearch",
return QCoreApplication::translate("Utils::FileSearch",
"%1: %n occurrences found in %2 of %3 files.",
0, QCoreApplication::CodecForTr, numMatches).
arg(searchTerm).arg(numFilesSearched).arg(filesSize);
......@@ -246,14 +246,14 @@ void runFileSearchRegExp(QFutureInterface<FileSearchResult> &future,
} // namespace
QFuture<FileSearchResult> Core::Utils::findInFiles(const QString &searchTerm, const QStringList &files,
QFuture<FileSearchResult> Utils::findInFiles(const QString &searchTerm, const QStringList &files,
QTextDocument::FindFlags flags, QMap<QString, QString> fileToContentsMap)
{
return QtConcurrent::run<FileSearchResult, QString, QStringList, QTextDocument::FindFlags, QMap<QString, QString> >
(runFileSearch, searchTerm, files, flags, fileToContentsMap);
}
QFuture<FileSearchResult> Core::Utils::findInFilesRegExp(const QString &searchTerm, const QStringList &files,
QFuture<FileSearchResult> Utils::findInFilesRegExp(const QString &searchTerm, const QStringList &files,
QTextDocument::FindFlags flags, QMap<QString, QString> fileToContentsMap)
{
return QtConcurrent::run<FileSearchResult, QString, QStringList, QTextDocument::FindFlags, QMap<QString, QString> >
......
......@@ -37,7 +37,6 @@
#include <QtCore/QMap>
#include <QtGui/QTextDocument>
namespace Core {
namespace Utils {
class QTCREATOR_UTILS_EXPORT FileSearchResult
......@@ -62,6 +61,5 @@ QTCREATOR_UTILS_EXPORT QFuture<FileSearchResult> findInFilesRegExp(const QString
QTextDocument::FindFlags flags, QMap<QString, QString> fileToContentsMap = QMap<QString, QString>());
} // namespace Utils
} // namespace Core
#endif // FILESEARCH_H
......@@ -32,7 +32,6 @@
#include <QtGui/QAbstractButton>
namespace Core {
namespace Utils {
FileWizardDialog::FileWizardDialog(QWidget *parent) :
......@@ -69,4 +68,3 @@ void FileWizardDialog::setName(const QString &name)
}
} // namespace Utils
} // namespace Core
......@@ -34,7 +34,6 @@
#include <QtGui/QWizard>
namespace Core {
namespace Utils {
class FileWizardPage;
......@@ -62,6 +61,5 @@ private:
};
} // namespace Utils
} // namespace Core
#endif // FILEWIZARDDIALOG_H
......@@ -30,7 +30,6 @@
#include "filewizardpage.h"
#include "ui_filewizardpage.h"
namespace Core {
namespace Utils {
struct FileWizardPagePrivate
......@@ -130,4 +129,3 @@ bool FileWizardPage::validateBaseName(const QString &name, QString *errorMessage
}
} // namespace Utils
} // namespace Core
......@@ -34,7 +34,6 @@
#include <QtGui/QWizardPage>
namespace Core {
namespace Utils {
struct FileWizardPagePrivate;
......@@ -87,6 +86,5 @@ private:
};
} // namespace Utils
} // namespace Core
#endif // FILEWIZARDPAGE_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Core::Utils::WizardPage</class>
<widget class="QWizardPage" name="Core::Utils::WizardPage">
<class>Utils::WizardPage</class>
<widget class="QWizardPage" name="Utils::WizardPage">
<property name="geometry">
<rect>
<x>0</x>
......@@ -22,7 +22,7 @@
</widget>
</item>
<item row="0" column="1">
<widget class="Core::Utils::FileNameValidatingLineEdit" name="nameLineEdit"/>
<widget class="Utils::FileNameValidatingLineEdit" name="nameLineEdit"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="pathLabel">
......@@ -32,19 +32,19 @@
</widget>
</item>
<item row="1" column="1">
<widget class="Core::Utils::PathChooser" name="pathChooser" native="true"/>
<widget class="Utils::PathChooser" name="pathChooser" native="true"/>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>Core::Utils::PathChooser</class>
<class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header>pathchooser.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>Core::Utils::FileNameValidatingLineEdit</class>
<class>Utils::FileNameValidatingLineEdit</class>
<extends>QLineEdit</extends>
<header>filenamevalidatinglineedit.h</header>
</customwidget>
......
......@@ -29,7 +29,6 @@
#include "linecolumnlabel.h"
namespace Core {
namespace Utils {
LineColumnLabel::LineColumnLabel(QWidget *parent)
......@@ -62,4 +61,3 @@ void LineColumnLabel::setMaxText(const QString &maxText)
}
} // namespace Utils
} // namespace Core
......@@ -33,7 +33,6 @@
#include "utils_global.h"
#include <QtGui/QLabel>
namespace Core {
namespace Utils {
/* A label suitable for displaying cursor positions, etc. with a fixed
......@@ -61,6 +60,5 @@ private:
};
} // namespace Utils
} // namespace Core
#endif // LINECOLUMNLABEL_H
......@@ -32,7 +32,6 @@
#include <QtCore/QList>
namespace Core {
namespace Utils {
template <class T1, class T2>
......@@ -46,6 +45,5 @@ QList<T1> qwConvertList(const QList<T2> &list)
}
} // namespace Utils
} // namespace Core
#endif // LISTUTILS_H
......@@ -41,7 +41,6 @@
enum { debugNewClassWidget = 0 };
namespace Core {
namespace Utils {
struct NewClassWidgetPrivate {
......@@ -485,4 +484,3 @@ QStringList NewClassWidget::files() const
}
} // namespace Utils
} // namespace Core
......@@ -38,7 +38,6 @@ QT_BEGIN_NAMESPACE
class QStringList;
QT_END_NAMESPACE
namespace Core {
namespace Utils {
struct NewClassWidgetPrivate;
......@@ -157,6 +156,5 @@ private:
};
} // namespace Utils
} // namespace Core
#endif // NEWCLASSWIDGET_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Core::Utils::NewClassWidget</class>
<widget class="QWidget" name="Core::Utils::NewClassWidget">
<class>Utils::NewClassWidget</class>
<widget class="QWidget" name="Utils::NewClassWidget">