summaryrefslogtreecommitdiff
path: root/src/libs/utils
diff options
context:
space:
mode:
authorhjk <qtc-commiter@nokia.com>2008-12-02 14:09:21 +0100
committerhjk <qtc-commiter@nokia.com>2008-12-02 14:09:21 +0100
commitf61e8672db50445a3f84d37e657d38fbaa0d5083 (patch)
tree2dd961e9d2108690a989080ac42f9d5c40567c97 /src/libs/utils
parent1472bdb0cc0c96b254cdf682bbe004c766be4a26 (diff)
downloadqt-creator-f61e8672db50445a3f84d37e657d38fbaa0d5083.tar.gz
more cosmetic changes
Diffstat (limited to 'src/libs/utils')
-rw-r--r--src/libs/utils/basevalidatinglineedit.cpp5
-rw-r--r--src/libs/utils/basevalidatinglineedit.h5
-rw-r--r--src/libs/utils/classnamevalidatinglineedit.cpp5
-rw-r--r--src/libs/utils/classnamevalidatinglineedit.h10
-rw-r--r--src/libs/utils/codegeneration.cpp1
-rw-r--r--src/libs/utils/codegeneration.h1
-rw-r--r--src/libs/utils/fancylineedit.cpp1
-rw-r--r--src/libs/utils/fancylineedit.h5
-rw-r--r--src/libs/utils/filenamevalidatinglineedit.cpp5
-rw-r--r--src/libs/utils/filenamevalidatinglineedit.h9
-rw-r--r--src/libs/utils/filesearch.cpp289
-rw-r--r--src/libs/utils/filesearch.h7
-rw-r--r--src/libs/utils/filewizarddialog.cpp1
-rw-r--r--src/libs/utils/filewizarddialog.h6
-rw-r--r--src/libs/utils/filewizardpage.cpp1
-rw-r--r--src/libs/utils/filewizardpage.h6
-rw-r--r--src/libs/utils/linecolumnlabel.cpp10
-rw-r--r--src/libs/utils/linecolumnlabel.h8
-rw-r--r--src/libs/utils/listutils.h5
-rw-r--r--src/libs/utils/newclasswidget.cpp2
-rw-r--r--src/libs/utils/newclasswidget.h1
-rw-r--r--src/libs/utils/pathchooser.cpp5
-rw-r--r--src/libs/utils/pathchooser.h4
-rw-r--r--src/libs/utils/projectintropage.cpp5
-rw-r--r--src/libs/utils/projectintropage.h9
-rw-r--r--src/libs/utils/projectnamevalidatinglineedit.cpp9
-rw-r--r--src/libs/utils/projectnamevalidatinglineedit.h9
-rw-r--r--src/libs/utils/qtcolorbutton.cpp8
-rw-r--r--src/libs/utils/qtcolorbutton.h1
-rw-r--r--src/libs/utils/reloadpromptutils.cpp5
-rw-r--r--src/libs/utils/reloadpromptutils.h1
-rw-r--r--src/libs/utils/settingsutils.cpp10
-rw-r--r--src/libs/utils/settingsutils.h1
-rw-r--r--src/libs/utils/submiteditorwidget.cpp6
-rw-r--r--src/libs/utils/submiteditorwidget.h9
-rw-r--r--src/libs/utils/synchronousprocess.cpp4
-rw-r--r--src/libs/utils/synchronousprocess.h16
-rw-r--r--src/libs/utils/utils_global.h12
38 files changed, 270 insertions, 227 deletions
diff --git a/src/libs/utils/basevalidatinglineedit.cpp b/src/libs/utils/basevalidatinglineedit.cpp
index cb936e3c2d..fb09d95745 100644
--- a/src/libs/utils/basevalidatinglineedit.cpp
+++ b/src/libs/utils/basevalidatinglineedit.cpp
@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#include "basevalidatinglineedit.h"
#include <QtCore/QDebug>
@@ -153,5 +154,5 @@ void BaseValidatingLineEdit::slotReturnPressed()
emit validReturnPressed();
}
-}
-}
+} // namespace Utils
+} // namespace Core
diff --git a/src/libs/utils/basevalidatinglineedit.h b/src/libs/utils/basevalidatinglineedit.h
index 3482687011..40b5503819 100644
--- a/src/libs/utils/basevalidatinglineedit.h
+++ b/src/libs/utils/basevalidatinglineedit.h
@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#ifndef BASEVALIDATINGLINEEDIT_H
#define BASEVALIDATINGLINEEDIT_H
@@ -95,6 +96,6 @@ private:
BaseValidatingLineEditPrivate *m_bd;
};
-}
-}
+} // namespace Utils
+} // namespace Core
#endif // BASEVALIDATINGLINEEDIT_H
diff --git a/src/libs/utils/classnamevalidatinglineedit.cpp b/src/libs/utils/classnamevalidatinglineedit.cpp
index b52758eda5..9e36203b0e 100644
--- a/src/libs/utils/classnamevalidatinglineedit.cpp
+++ b/src/libs/utils/classnamevalidatinglineedit.cpp
@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#include "classnamevalidatinglineedit.h"
#include <QtCore/QDebug>
@@ -133,5 +134,5 @@ QString ClassNameValidatingLineEdit::createClassName(const QString &name)
return className;
}
-}
-}
+} // namespace Utils
+} // namespace Core
diff --git a/src/libs/utils/classnamevalidatinglineedit.h b/src/libs/utils/classnamevalidatinglineedit.h
index c0a209d0d7..2271a9cd31 100644
--- a/src/libs/utils/classnamevalidatinglineedit.h
+++ b/src/libs/utils/classnamevalidatinglineedit.h
@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#ifndef CLASSNAMEVALIDATINGLINEEDIT_H
#define CLASSNAMEVALIDATINGLINEEDIT_H
@@ -44,8 +45,9 @@ struct ClassNameValidatingLineEditPrivate;
/* A Line edit that validates a C++ class name and emits a signal
* to derive suggested file names from it. */
-class QWORKBENCH_UTILS_EXPORT ClassNameValidatingLineEdit :
- public Core::Utils::BaseValidatingLineEdit {
+class QWORKBENCH_UTILS_EXPORT ClassNameValidatingLineEdit
+ : public Core::Utils::BaseValidatingLineEdit
+{
Q_DISABLE_COPY(ClassNameValidatingLineEdit)
Q_PROPERTY(bool namespacesEnabled READ namespacesEnabled WRITE setNamespacesEnabled DESIGNABLE true)
Q_OBJECT
@@ -73,7 +75,7 @@ private:
ClassNameValidatingLineEditPrivate *m_d;
};
-}
-}
+} // namespace Utils
+} // namespace Core
#endif // CLASSNAMEVALIDATINGLINEEDIT_H
diff --git a/src/libs/utils/codegeneration.cpp b/src/libs/utils/codegeneration.cpp
index 3af484935a..8956396acc 100644
--- a/src/libs/utils/codegeneration.cpp
+++ b/src/libs/utils/codegeneration.cpp
@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#include "codegeneration.h"
#include <QtCore/QTextStream>
diff --git a/src/libs/utils/codegeneration.h b/src/libs/utils/codegeneration.h
index 1a20c76d08..c804365bce 100644
--- a/src/libs/utils/codegeneration.h
+++ b/src/libs/utils/codegeneration.h
@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#ifndef CODEGENERATION_H
#define CODEGENERATION_H
diff --git a/src/libs/utils/fancylineedit.cpp b/src/libs/utils/fancylineedit.cpp
index e7e930c544..8adb3a5bb4 100644
--- a/src/libs/utils/fancylineedit.cpp
+++ b/src/libs/utils/fancylineedit.cpp
@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#include "fancylineedit.h"
#include <QtCore/QEvent>
diff --git a/src/libs/utils/fancylineedit.h b/src/libs/utils/fancylineedit.h
index 24a109eada..634eefa8c0 100644
--- a/src/libs/utils/fancylineedit.h
+++ b/src/libs/utils/fancylineedit.h
@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#ifndef FANCYLINEEDIT_H
#define FANCYLINEEDIT_H
@@ -77,11 +78,11 @@ public:
bool useLayoutDirection() const;
void setUseLayoutDirection(bool v);
- /* Set whether tabbing in will trigger the menu. */
+ // Set whether tabbing in will trigger the menu.
bool hasMenuTabFocusTrigger() const;
void setMenuTabFocusTrigger(bool v);
- /* Hint text that is displayed when no focus is set */
+ // Hint text that is displayed when no focus is set.
QString hintText() const;
bool isShowingHintText() const;
diff --git a/src/libs/utils/filenamevalidatinglineedit.cpp b/src/libs/utils/filenamevalidatinglineedit.cpp
index 1beed717ef..388d271795 100644
--- a/src/libs/utils/filenamevalidatinglineedit.cpp
+++ b/src/libs/utils/filenamevalidatinglineedit.cpp
@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#include "filenamevalidatinglineedit.h"
namespace Core {
@@ -93,5 +94,5 @@ bool FileNameValidatingLineEdit::validate(const QString &value, QString *errorM
return validateFileName(value, errorMessage);
}
-}
-}
+} // namespace Utils
+} // namespace Core
diff --git a/src/libs/utils/filenamevalidatinglineedit.h b/src/libs/utils/filenamevalidatinglineedit.h
index 7535fc196d..c263a94d6c 100644
--- a/src/libs/utils/filenamevalidatinglineedit.h
+++ b/src/libs/utils/filenamevalidatinglineedit.h
@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#ifndef FILENAMEVALIDATINGLINEEDIT_H
#define FILENAMEVALIDATINGLINEEDIT_H
@@ -38,7 +39,8 @@
namespace Core {
namespace Utils {
-class QWORKBENCH_UTILS_EXPORT FileNameValidatingLineEdit : public BaseValidatingLineEdit {
+class QWORKBENCH_UTILS_EXPORT FileNameValidatingLineEdit : public BaseValidatingLineEdit
+{
Q_OBJECT
Q_DISABLE_COPY(FileNameValidatingLineEdit)
@@ -51,6 +53,7 @@ protected:
virtual bool validate(const QString &value, QString *errorMessage) const;
};
-}
-}
+} // namespace Utils
+} // namespace Core
+
#endif // FILENAMEVALIDATINGLINEEDIT_H
diff --git a/src/libs/utils/filesearch.cpp b/src/libs/utils/filesearch.cpp
index 9756984b4b..6bcbf26671 100644
--- a/src/libs/utils/filesearch.cpp
+++ b/src/libs/utils/filesearch.cpp
@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#include "filesearch.h"
#include <QtCore/QFile>
@@ -44,162 +45,164 @@
using namespace Core::Utils;
namespace {
- void runFileSearch(QFutureInterface<FileSearchResult> &future,
- QString searchTerm,
- QStringList files,
- QTextDocument::FindFlags flags)
- {
- future.setProgressRange(0, files.size());
- int numFilesSearched = 0;
- int numMatches = 0;
-
- bool caseInsensitive = !(flags & QTextDocument::FindCaseSensitively);
- bool wholeWord = (flags & QTextDocument::FindWholeWords);
-
- QByteArray sa = searchTerm.toUtf8();
- int scMaxIndex = sa.length()-1;
- const char *sc = sa.constData();
-
- QByteArray sal = searchTerm.toLower().toUtf8();
- const char *scl = sal.constData();
-
- QByteArray sau = searchTerm.toUpper().toUtf8();
- const char *scu = sau.constData();
-
- int chunkSize = qMax(100000, sa.length());
-
- foreach (QString s, files) {
- if (future.isPaused())
- future.waitForResume();
- if (future.isCanceled()) {
- future.setProgressValueAndText(numFilesSearched,
- qApp->translate("FileSearch", "%1: canceled. %2 occurrences found in %3 files.").
- arg(searchTerm).arg(numMatches).arg(numFilesSearched));
- break;
- }
- QFile file(s);
- if (!file.open(QIODevice::ReadOnly))
- continue;
- int lineNr = 1;
- const char *startOfLastLine = NULL;
-
- bool firstChunk = true;
- while (!file.atEnd()) {
- if (!firstChunk)
- file.seek(file.pos()-sa.length()+1);
-
- const QByteArray chunk = file.read(chunkSize);
- const char *chunkPtr = chunk.constData();
- startOfLastLine = chunkPtr;
- for (const char *regionPtr = chunkPtr; regionPtr < chunkPtr + chunk.length()-scMaxIndex; ++regionPtr) {
- const char *regionEnd = regionPtr + scMaxIndex;
-
- if (*regionPtr == '\n') {
- startOfLastLine = regionPtr + 1;
- ++lineNr;
+
+void runFileSearch(QFutureInterface<FileSearchResult> &future,
+ QString searchTerm,
+ QStringList files,
+ QTextDocument::FindFlags flags)
+{
+ future.setProgressRange(0, files.size());
+ int numFilesSearched = 0;
+ int numMatches = 0;
+
+ bool caseInsensitive = !(flags & QTextDocument::FindCaseSensitively);
+ bool wholeWord = (flags & QTextDocument::FindWholeWords);
+
+ QByteArray sa = searchTerm.toUtf8();
+ int scMaxIndex = sa.length()-1;
+ const char *sc = sa.constData();
+
+ QByteArray sal = searchTerm.toLower().toUtf8();
+ const char *scl = sal.constData();
+
+ QByteArray sau = searchTerm.toUpper().toUtf8();
+ const char *scu = sau.constData();
+
+ int chunkSize = qMax(100000, sa.length());
+
+ foreach (QString s, files) {
+ if (future.isPaused())
+ future.waitForResume();
+ if (future.isCanceled()) {
+ future.setProgressValueAndText(numFilesSearched,
+ qApp->translate("FileSearch", "%1: canceled. %2 occurrences found in %3 files.").
+ arg(searchTerm).arg(numMatches).arg(numFilesSearched));
+ break;
+ }
+ QFile file(s);
+ if (!file.open(QIODevice::ReadOnly))
+ continue;
+ int lineNr = 1;
+ const char *startOfLastLine = NULL;
+
+ bool firstChunk = true;
+ while (!file.atEnd()) {
+ if (!firstChunk)
+ file.seek(file.pos()-sa.length()+1);
+
+ const QByteArray chunk = file.read(chunkSize);
+ const char *chunkPtr = chunk.constData();
+ startOfLastLine = chunkPtr;
+ for (const char *regionPtr = chunkPtr; regionPtr < chunkPtr + chunk.length()-scMaxIndex; ++regionPtr) {
+ const char *regionEnd = regionPtr + scMaxIndex;
+
+ if (*regionPtr == '\n') {
+ startOfLastLine = regionPtr + 1;
+ ++lineNr;
+ }
+ else if (
+ // case sensitive
+ (!caseInsensitive && *regionPtr == sc[0] && *regionEnd == sc[scMaxIndex])
+ ||
+ // case insensitive
+ (caseInsensitive && (*regionPtr == scl[0] || *regionPtr == scu[0])
+ && (*regionEnd == scl[scMaxIndex] || *regionEnd == scu[scMaxIndex]))
+ ) {
+ const char *afterRegion = regionEnd + 1;
+ const char *beforeRegion = regionPtr - 1;
+ bool equal = true;
+ if (wholeWord &&
+ ( ((*beforeRegion >= '0' && *beforeRegion <= '9') || *beforeRegion >= 'A')
+ || ((*afterRegion >= '0' && *afterRegion <= '9') || *afterRegion >= 'A')))
+ {
+ equal = false;
}
- else if (
- // case sensitive
- (!caseInsensitive && *regionPtr == sc[0] && *regionEnd == sc[scMaxIndex])
- ||
- // case insensitive
- (caseInsensitive && (*regionPtr == scl[0] || *regionPtr == scu[0])
- && (*regionEnd == scl[scMaxIndex] || *regionEnd == scu[scMaxIndex]))
- ) {
- const char *afterRegion = regionEnd + 1;
- const char *beforeRegion = regionPtr - 1;
- bool equal = true;
- if (wholeWord &&
- ( ((*beforeRegion >= '0' && *beforeRegion <= '9') || *beforeRegion >= 'A')
- || ((*afterRegion >= '0' && *afterRegion <= '9') || *afterRegion >= 'A')))
- {
- equal = false;
- }
- int regionIndex = 1;
- for (const char *regionCursor = regionPtr + 1; regionCursor < regionEnd; ++regionCursor, ++regionIndex) {
- if ( // case sensitive
- (!caseInsensitive && equal && *regionCursor != sc[regionIndex])
- ||
- // case insensitive
- (caseInsensitive && equal && *regionCursor != sc[regionIndex] && *regionCursor != scl[regionIndex] && *regionCursor != scu[regionIndex])
- ) {
- equal = false;
- }
+ int regionIndex = 1;
+ for (const char *regionCursor = regionPtr + 1; regionCursor < regionEnd; ++regionCursor, ++regionIndex) {
+ if ( // case sensitive
+ (!caseInsensitive && equal && *regionCursor != sc[regionIndex])
+ ||
+ // case insensitive
+ (caseInsensitive && equal && *regionCursor != sc[regionIndex] && *regionCursor != scl[regionIndex] && *regionCursor != scu[regionIndex])
+ ) {
+ equal = false;
}
- if (equal) {
- int textLength = chunk.length() - (startOfLastLine - chunkPtr);
- if (textLength > 0) {
- QByteArray res;
- res.reserve(256);
- int i = 0;
- int n = 0;
- while (startOfLastLine[i] != '\n' && startOfLastLine[i] != '\r' && i < textLength && n++ < 256)
- res.append(startOfLastLine[i++]);
- future.reportResult(FileSearchResult(QDir::toNativeSeparators(s), lineNr, QString(res),
- regionPtr - startOfLastLine, sa.length()));
- ++numMatches;
- }
+ }
+ if (equal) {
+ int textLength = chunk.length() - (startOfLastLine - chunkPtr);
+ if (textLength > 0) {
+ QByteArray res;
+ res.reserve(256);
+ int i = 0;
+ int n = 0;
+ while (startOfLastLine[i] != '\n' && startOfLastLine[i] != '\r' && i < textLength && n++ < 256)
+ res.append(startOfLastLine[i++]);
+ future.reportResult(FileSearchResult(QDir::toNativeSeparators(s), lineNr, QString(res),
+ regionPtr - startOfLastLine, sa.length()));
+ ++numMatches;
}
}
}
- firstChunk = false;
}
- ++numFilesSearched;
- future.setProgressValueAndText(numFilesSearched, qApp->translate("FileSearch", "%1: %2 occurrences found in %3 of %4 files.").
- arg(searchTerm).arg(numMatches).arg(numFilesSearched).arg(files.size()));
+ firstChunk = false;
}
- if (!future.isCanceled())
- future.setProgressValueAndText(numFilesSearched, qApp->translate("FileSearch", "%1: %2 occurrences found in %3 files.").
- arg(searchTerm).arg(numMatches).arg(numFilesSearched));
+ ++numFilesSearched;
+ future.setProgressValueAndText(numFilesSearched, qApp->translate("FileSearch", "%1: %2 occurrences found in %3 of %4 files.").
+ arg(searchTerm).arg(numMatches).arg(numFilesSearched).arg(files.size()));
}
+ if (!future.isCanceled())
+ future.setProgressValueAndText(numFilesSearched, qApp->translate("FileSearch", "%1: %2 occurrences found in %3 files.").
+ arg(searchTerm).arg(numMatches).arg(numFilesSearched));
+}
- void runFileSearchRegExp(QFutureInterface<FileSearchResult> &future,
- QString searchTerm,
- QStringList files,
- QTextDocument::FindFlags flags)
- {
- future.setProgressRange(0, files.size());
- int numFilesSearched = 0;
- int numMatches = 0;
- if (flags & QTextDocument::FindWholeWords)
- searchTerm = QString("\b%1\b").arg(searchTerm);
- Qt::CaseSensitivity caseSensitivity = (flags & QTextDocument::FindCaseSensitively) ? Qt::CaseSensitive : Qt::CaseInsensitive;
- QRegExp expression(searchTerm, caseSensitivity);
-
- foreach (QString s, files) {
- if (future.isPaused())
- future.waitForResume();
- if (future.isCanceled()) {
- future.setProgressValueAndText(numFilesSearched,
- qApp->translate("FileSearch", "%1: canceled. %2 occurrences found in %3 files.").
- arg(searchTerm).arg(numMatches).arg(numFilesSearched));
- break;
- }
- QFile file(s);
- if (!file.open(QIODevice::ReadOnly))
- continue;
- QTextStream stream(&file);
- int lineNr = 1;
- QString line;
- while (!stream.atEnd()) {
- line = stream.readLine();
- int pos = 0;
- while ((pos = expression.indexIn(line, pos)) != -1) {
- future.reportResult(FileSearchResult(QDir::toNativeSeparators(s), lineNr, line,
- pos, expression.matchedLength()));
- pos += expression.matchedLength();
- }
- ++lineNr;
+void runFileSearchRegExp(QFutureInterface<FileSearchResult> &future,
+ QString searchTerm,
+ QStringList files,
+ QTextDocument::FindFlags flags)
+{
+ future.setProgressRange(0, files.size());
+ int numFilesSearched = 0;
+ int numMatches = 0;
+ if (flags & QTextDocument::FindWholeWords)
+ searchTerm = QString("\b%1\b").arg(searchTerm);
+ Qt::CaseSensitivity caseSensitivity = (flags & QTextDocument::FindCaseSensitively) ? Qt::CaseSensitive : Qt::CaseInsensitive;
+ QRegExp expression(searchTerm, caseSensitivity);
+
+ foreach (QString s, files) {
+ if (future.isPaused())
+ future.waitForResume();
+ if (future.isCanceled()) {
+ future.setProgressValueAndText(numFilesSearched,
+ qApp->translate("FileSearch", "%1: canceled. %2 occurrences found in %3 files.").
+ arg(searchTerm).arg(numMatches).arg(numFilesSearched));
+ break;
+ }
+ QFile file(s);
+ if (!file.open(QIODevice::ReadOnly))
+ continue;
+ QTextStream stream(&file);
+ int lineNr = 1;
+ QString line;
+ while (!stream.atEnd()) {
+ line = stream.readLine();
+ int pos = 0;
+ while ((pos = expression.indexIn(line, pos)) != -1) {
+ future.reportResult(FileSearchResult(QDir::toNativeSeparators(s), lineNr, line,
+ pos, expression.matchedLength()));
+ pos += expression.matchedLength();
}
- ++numFilesSearched;
- future.setProgressValueAndText(numFilesSearched, qApp->translate("FileSearch", "%1: %2 occurrences found in %3 of %4 files.").
- arg(searchTerm).arg(numMatches).arg(numFilesSearched).arg(files.size()));
+ ++lineNr;
}
- if (!future.isCanceled())
- future.setProgressValueAndText(numFilesSearched, qApp->translate("FileSearch", "%1: %2 occurrences found in %3 files.").
- arg(searchTerm).arg(numMatches).arg(numFilesSearched));
+ ++numFilesSearched;
+ future.setProgressValueAndText(numFilesSearched, qApp->translate("FileSearch", "%1: %2 occurrences found in %3 of %4 files.").
+ arg(searchTerm).arg(numMatches).arg(numFilesSearched).arg(files.size()));
}
+ if (!future.isCanceled())
+ future.setProgressValueAndText(numFilesSearched, qApp->translate("FileSearch", "%1: %2 occurrences found in %3 files.").
+ arg(searchTerm).arg(numMatches).arg(numFilesSearched));
+}
+
} // namespace
diff --git a/src/libs/utils/filesearch.h b/src/libs/utils/filesearch.h
index 3b747fb548..4f6d260286 100644
--- a/src/libs/utils/filesearch.h
+++ b/src/libs/utils/filesearch.h
@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#ifndef FILESEARCH_H
#define FILESEARCH_H
@@ -63,7 +64,7 @@ QWORKBENCH_UTILS_EXPORT QFuture<FileSearchResult> findInFiles(const QString &sea
QWORKBENCH_UTILS_EXPORT QFuture<FileSearchResult> findInFilesRegExp(const QString &searchTerm, const QStringList &files,
QTextDocument::FindFlags flags);
-} //Utils
-} //Core
+} // namespace Utils
+} // namespace Core
-#endif
+#endif // FILESEARCH_H
diff --git a/src/libs/utils/filewizarddialog.cpp b/src/libs/utils/filewizarddialog.cpp
index 2843a304e5..d9454c52a1 100644
--- a/src/libs/utils/filewizarddialog.cpp
+++ b/src/libs/utils/filewizarddialog.cpp
@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#include "filewizarddialog.h"
#include "filewizardpage.h"
diff --git a/src/libs/utils/filewizarddialog.h b/src/libs/utils/filewizarddialog.h
index 6a4a7d9ba6..20dd98e350 100644
--- a/src/libs/utils/filewizarddialog.h
+++ b/src/libs/utils/filewizarddialog.h
@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#ifndef FILEWIZARDDIALOG_H
#define FILEWIZARDDIALOG_H
@@ -64,6 +65,7 @@ private:
FileWizardPage *m_filePage;
};
-}
-}
+} // namespace Utils
+} // namespace Core
+
#endif // FILEWIZARDDIALOG_H
diff --git a/src/libs/utils/filewizardpage.cpp b/src/libs/utils/filewizardpage.cpp
index a448ebe739..a796f7bafd 100644
--- a/src/libs/utils/filewizardpage.cpp
+++ b/src/libs/utils/filewizardpage.cpp
@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#include "filewizardpage.h"
#include "ui_filewizardpage.h"
diff --git a/src/libs/utils/filewizardpage.h b/src/libs/utils/filewizardpage.h
index b2ae28a9d0..984b10b5da 100644
--- a/src/libs/utils/filewizardpage.h
+++ b/src/libs/utils/filewizardpage.h
@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#ifndef FILEWIZARDPAGE_H
#define FILEWIZARDPAGE_H
@@ -81,6 +82,7 @@ private:
FileWizardPagePrivate *m_d;
};
-}
-}
+} // namespace Utils
+} // namespace Core
+
#endif // FILEWIZARDPAGE_H
diff --git a/src/libs/utils/linecolumnlabel.cpp b/src/libs/utils/linecolumnlabel.cpp
index c6028ab13f..3a25c36f96 100644
--- a/src/libs/utils/linecolumnlabel.cpp
+++ b/src/libs/utils/linecolumnlabel.cpp
@@ -30,14 +30,14 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#include "linecolumnlabel.h"
namespace Core {
namespace Utils {
-LineColumnLabel::LineColumnLabel(QWidget *parent) :
- QLabel(parent),
- m_unused(0)
+LineColumnLabel::LineColumnLabel(QWidget *parent)
+ : QLabel(parent), m_unused(0)
{
}
@@ -65,5 +65,5 @@ void LineColumnLabel::setMaxText(const QString &maxText)
m_maxText = maxText;
}
-}
-}
+} // namespace Utils
+} // namespace Core
diff --git a/src/libs/utils/linecolumnlabel.h b/src/libs/utils/linecolumnlabel.h
index d5dea084cc..ba7f9e4078 100644
--- a/src/libs/utils/linecolumnlabel.h
+++ b/src/libs/utils/linecolumnlabel.h
@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#ifndef LINECOLUMNLABEL_H
#define LINECOLUMNLABEL_H
@@ -42,7 +43,8 @@ namespace Utils {
/* A label suitable for displaying cursor positions, etc. with a fixed
* with derived from a sample text. */
-class QWORKBENCH_UTILS_EXPORT LineColumnLabel : public QLabel {
+class QWORKBENCH_UTILS_EXPORT LineColumnLabel : public QLabel
+{
Q_DISABLE_COPY(LineColumnLabel)
Q_OBJECT
Q_PROPERTY(QString maxText READ maxText WRITE setMaxText DESIGNABLE true)
@@ -62,7 +64,7 @@ private:
void *m_unused;
};
-}
-}
+} // namespace Utils
+} // namespace Core
#endif // LINECOLUMNLABEL_H
diff --git a/src/libs/utils/listutils.h b/src/libs/utils/listutils.h
index 3b688f336d..cbd307937d 100644
--- a/src/libs/utils/listutils.h
+++ b/src/libs/utils/listutils.h
@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#ifndef LISTUTILS_H
#define LISTUTILS_H
@@ -48,7 +49,7 @@ QList<T1> qwConvertList(const QList<T2> &list)
return convertedList;
}
-} // Utils
-} // Core
+} // namespace Utils
+} // namespace Core
#endif // LISTUTILS_H
diff --git a/src/libs/utils/newclasswidget.cpp b/src/libs/utils/newclasswidget.cpp
index 67cd1f8691..1224ba3270 100644
--- a/src/libs/utils/newclasswidget.cpp
+++ b/src/libs/utils/newclasswidget.cpp
@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#include "newclasswidget.h"
#include "ui_newclasswidget.h"
@@ -457,6 +458,5 @@ QStringList NewClassWidget::files() const
return rc;
}
-
} // namespace Utils
} // namespace Core
diff --git a/src/libs/utils/newclasswidget.h b/src/libs/utils/newclasswidget.h
index e534189d77..138f7bc9af 100644
--- a/src/libs/utils/newclasswidget.h
+++ b/src/libs/utils/newclasswidget.h
@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#ifndef NEWCLASSWIDGET_H
#define NEWCLASSWIDGET_H
diff --git a/src/libs/utils/pathchooser.cpp b/src/libs/utils/pathchooser.cpp
index 188aa3b126..16d26b0f56 100644
--- a/src/libs/utils/pathchooser.cpp
+++ b/src/libs/utils/pathchooser.cpp
@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#include "pathchooser.h"
#include "basevalidatinglineedit.h"
@@ -181,5 +182,5 @@ QString PathChooser::homePath()
#endif
}
-}
-}
+} // namespace Utils
+} // namespace Core
diff --git a/src/libs/utils/pathchooser.h b/src/libs/utils/pathchooser.h
index e09040c4c0..d8b33077ba 100644
--- a/src/libs/utils/pathchooser.h
+++ b/src/libs/utils/pathchooser.h
@@ -84,7 +84,7 @@ private:
PathChooserPrivate *m_d;
};
-}
-}
+} // namespace Utils
+} // namespace Core
#endif // PATHCHOOSER_H
diff --git a/src/libs/utils/projectintropage.cpp b/src/libs/utils/projectintropage.cpp
index bc17333fb9..4e9dd365a8 100644
--- a/src/libs/utils/projectintropage.cpp
+++ b/src/libs/utils/projectintropage.cpp
@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#include "projectintropage.h"
#include "filewizardpage.h"
#include "ui_projectintropage.h"
@@ -211,5 +212,5 @@ void ProjectIntroPage::hideStatusLabel()
displayStatusMessage(Hint, QString());
}
-}
-}
+} // namespace Utils
+} // namespace Core
diff --git a/src/libs/utils/projectintropage.h b/src/libs/utils/projectintropage.h
index 56dcc25327..a145590dfd 100644
--- a/src/libs/utils/projectintropage.h
+++ b/src/libs/utils/projectintropage.h
@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#ifndef PROJECTINTROPAGE_H
#define PROJECTINTROPAGE_H
@@ -55,7 +56,8 @@ struct ProjectIntroPagePrivate;
* layout, otherwise, QWizard will squeeze it due to its strange expanding
* hacks. */
-class QWORKBENCH_UTILS_EXPORT ProjectIntroPage : public QWizardPage {
+class QWORKBENCH_UTILS_EXPORT ProjectIntroPage : public QWizardPage
+{
Q_OBJECT
Q_DISABLE_COPY(ProjectIntroPage)
Q_PROPERTY(QString description READ description WRITE setPath DESIGNABLE true)
@@ -102,6 +104,7 @@ private:
ProjectIntroPagePrivate *m_d;
};
-}
-}
+} // namespace Utils
+} // namespace Core
+
#endif // PROJECTINTROPAGE_H
diff --git a/src/libs/utils/projectnamevalidatinglineedit.cpp b/src/libs/utils/projectnamevalidatinglineedit.cpp
index fb979d3934..b6c1ccd505 100644
--- a/src/libs/utils/projectnamevalidatinglineedit.cpp
+++ b/src/libs/utils/projectnamevalidatinglineedit.cpp
@@ -30,14 +30,15 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#include "projectnamevalidatinglineedit.h"
#include "filenamevalidatinglineedit.h"
namespace Core {
namespace Utils {
-ProjectNameValidatingLineEdit::ProjectNameValidatingLineEdit(QWidget *parent) :
- BaseValidatingLineEdit(parent)
+ProjectNameValidatingLineEdit::ProjectNameValidatingLineEdit(QWidget *parent)
+ : BaseValidatingLineEdit(parent)
{
}
@@ -62,5 +63,5 @@ bool ProjectNameValidatingLineEdit::validate(const QString &value, QString *erro
return validateProjectName(value, errorMessage);
}
-}
-}
+} // namespace Utils
+} // namespace Core
diff --git a/src/libs/utils/projectnamevalidatinglineedit.h b/src/libs/utils/projectnamevalidatinglineedit.h
index c677cea141..c42b8e4a35 100644
--- a/src/libs/utils/projectnamevalidatinglineedit.h
+++ b/src/libs/utils/projectnamevalidatinglineedit.h
@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#ifndef PROJECTNAMEVALIDATINGLINEEDIT_H
#define PROJECTNAMEVALIDATINGLINEEDIT_H
@@ -38,7 +39,8 @@
namespace Core {
namespace Utils {
-class QWORKBENCH_UTILS_EXPORT ProjectNameValidatingLineEdit : public BaseValidatingLineEdit {
+class QWORKBENCH_UTILS_EXPORT ProjectNameValidatingLineEdit : public BaseValidatingLineEdit
+{
Q_OBJECT
Q_DISABLE_COPY(ProjectNameValidatingLineEdit)
@@ -51,6 +53,7 @@ protected:
virtual bool validate(const QString &value, QString *errorMessage) const;
};
-}
-}
+} // namespace Utils
+} // namespace Core
+
#endif // PROJECTNAMEVALIDATINGLINEEDIT_H
diff --git a/src/libs/utils/qtcolorbutton.cpp b/src/libs/utils/qtcolorbutton.cpp
index 8b54bdda1d..8f67fc0975 100644
--- a/src/libs/utils/qtcolorbutton.cpp
+++ b/src/libs/utils/qtcolorbutton.cpp
@@ -30,12 +30,14 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#include "qtcolorbutton.h"
-#include <QtGui/QColorDialog>
-#include <QtGui/QPainter>
+
#include <QtCore/QMimeData>
-#include <QtGui/QDragEnterEvent>
#include <QtGui/QApplication>
+#include <QtGui/QColorDialog>
+#include <QtGui/QDragEnterEvent>
+#include <QtGui/QPainter>
namespace Core {
namespace Utils {
diff --git a/src/libs/utils/qtcolorbutton.h b/src/libs/utils/qtcolorbutton.h
index 07355c883e..930aef1579 100644
--- a/src/libs/utils/qtcolorbutton.h
+++ b/src/libs/utils/qtcolorbutton.h
@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#ifndef QTCOLORBUTTON_H
#define QTCOLORBUTTON_H
diff --git a/src/libs/utils/reloadpromptutils.cpp b/src/libs/utils/reloadpromptutils.cpp
index ca1d9e23de..9c4111a7db 100644
--- a/src/libs/utils/reloadpromptutils.cpp
+++ b/src/libs/utils/reloadpromptutils.cpp
@@ -30,7 +30,9 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#include "reloadpromptutils.h"
+
#include <QtGui/QMessageBox>
using namespace Core;
@@ -47,7 +49,8 @@ QWORKBENCH_UTILS_EXPORT Core::Utils::ReloadPromptAnswer
QWORKBENCH_UTILS_EXPORT Core::Utils::ReloadPromptAnswer
Core::Utils::reloadPrompt(const QString &title, const QString &prompt, QWidget *parent)
{
- switch (QMessageBox::question(parent, title, prompt, QMessageBox::Yes|QMessageBox::YesToAll|QMessageBox::No|QMessageBox::NoToAll,
+ switch (QMessageBox::question(parent, title, prompt,
+ QMessageBox::Yes|QMessageBox::YesToAll|QMessageBox::No|QMessageBox::NoToAll,
QMessageBox::YesToAll)) {
case QMessageBox::Yes:
return ReloadCurrent;
diff --git a/src/libs/utils/reloadpromptutils.h b/src/libs/utils/reloadpromptutils.h
index deaf4b920a..5d6fc87002 100644
--- a/src/libs/utils/reloadpromptutils.h
+++ b/src/libs/utils/reloadpromptutils.h
@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#ifndef RELOADPROMPTUTILS_H
#define RELOADPROMPTUTILS_H
diff --git a/src/libs/utils/settingsutils.cpp b/src/libs/utils/settingsutils.cpp
index ca8de01828..0f77b397cc 100644
--- a/src/libs/utils/settingsutils.cpp
+++ b/src/libs/utils/settingsutils.cpp
@@ -30,7 +30,9 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#include "settingsutils.h"
+
#include <QtCore/QString>
namespace Core {
@@ -41,13 +43,13 @@ QWORKBENCH_UTILS_EXPORT QString settingsKey(const QString &category)
QString rc(category);
const QChar underscore = QLatin1Char('_');
const int size = rc.size();
- for (int i = 0; i < size;i++) {
+ for (int i = 0; i < size; i++) {
const QChar c = rc.at(i);
- if (!c.isLetterOrNumber() && c != underscore)
+ if (!c.isLetterOrNumber() && c != underscore)
rc[i] = underscore;
}
return rc;
}
-}
-}
+} // namespace Utils
+} // namespace Core
diff --git a/src/libs/utils/settingsutils.h b/src/libs/utils/settingsutils.h
index 734a2f02f9..abce76ee2f 100644
--- a/src/libs/utils/settingsutils.h
+++ b/src/libs/utils/settingsutils.h
@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#ifndef SETTINGSTUTILS_H
#define SETTINGSTUTILS_H
diff --git a/src/libs/utils/submiteditorwidget.cpp b/src/libs/utils/submiteditorwidget.cpp
index aeafcd828d..b2c7995686 100644
--- a/src/libs/utils/submiteditorwidget.cpp
+++ b/src/libs/utils/submiteditorwidget.cpp
@@ -30,18 +30,20 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#include "submiteditorwidget.h"
#include "ui_submiteditorwidget.h"
#include <QtCore/QDebug>
#include <QtCore/QPointer>
-enum { debug= 0 };
+enum { debug = 0 };
namespace Core {
namespace Utils {
-struct SubmitEditorWidgetPrivate {
+struct SubmitEditorWidgetPrivate
+{
SubmitEditorWidgetPrivate();
Ui::SubmitEditorWidget m_ui;
diff --git a/src/libs/utils/submiteditorwidget.h b/src/libs/utils/submiteditorwidget.h
index 3c40ccecba..b034b549e4 100644
--- a/src/libs/utils/submiteditorwidget.h
+++ b/src/libs/utils/submiteditorwidget.h
@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#ifndef SUBMITEDITORWIDGET_H
#define SUBMITEDITORWIDGET_H
@@ -65,7 +66,8 @@ struct SubmitEditorWidgetPrivate;
* Care should be taken to ensure the widget is deleted properly when the
* editor closes. */
-class QWORKBENCH_UTILS_EXPORT SubmitEditorWidget : public QWidget {
+class QWORKBENCH_UTILS_EXPORT SubmitEditorWidget : public QWidget
+{
Q_OBJECT
Q_DISABLE_COPY(SubmitEditorWidget)
Q_PROPERTY(QString descriptionText READ descriptionText WRITE setDescriptionText DESIGNABLE true)
@@ -117,6 +119,7 @@ private:
SubmitEditorWidgetPrivate *m_d;
};
-}
-}
+} // namespace Utils
+} // namespace Core
+
#endif // SUBMITEDITORWIDGET_H
diff --git a/src/libs/utils/synchronousprocess.cpp b/src/libs/utils/synchronousprocess.cpp
index 71bcdffb6c..049fd0f574 100644
--- a/src/libs/utils/synchronousprocess.cpp
+++ b/src/libs/utils/synchronousprocess.cpp
@@ -352,5 +352,5 @@ void SynchronousProcess::processStdErr(bool emitSignals)
}
}
-}
-}
+} // namespace Utils
+} // namespace Core
diff --git a/src/libs/utils/synchronousprocess.h b/src/libs/utils/synchronousprocess.h
index 9458655d6b..356dec2643 100644
--- a/src/libs/utils/synchronousprocess.h
+++ b/src/libs/utils/synchronousprocess.h
@@ -30,15 +30,16 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
+
#ifndef SYNCHRONOUSPROCESS_H
#define SYNCHRONOUSPROCESS_H
+#include "utils_global.h"
+
#include <QtCore/QObject>
#include <QtCore/QProcess>
#include <QtCore/QStringList>
-#include "utils_global.h"
-
QT_BEGIN_NAMESPACE
class QTextCodec;
class QDebug;
@@ -51,7 +52,8 @@ namespace Utils {
struct SynchronousProcessPrivate;
/* Result of SynchronousProcess execution */
-struct QWORKBENCH_UTILS_EXPORT SynchronousProcessResponse {
+struct QWORKBENCH_UTILS_EXPORT SynchronousProcessResponse
+{
enum Result {
// Finished with return code 0
Finished,
@@ -87,7 +89,8 @@ QWORKBENCH_UTILS_EXPORT QDebug operator<<(QDebug str, const SynchronousProcessRe
* stdOutBufferedSignalsEnabled()/setStdErrBufferedSignalsEnabled().
* They would typically be used for log windows. */
-class QWORKBENCH_UTILS_EXPORT SynchronousProcess : public QObject {
+class QWORKBENCH_UTILS_EXPORT SynchronousProcess : public QObject
+{
Q_OBJECT
public:
SynchronousProcess();
@@ -134,6 +137,7 @@ private:
SynchronousProcessPrivate *m_d;
};
-}
-}
+} // namespace Utils
+} // namespace Core
+
#endif
diff --git a/src/libs/utils/utils_global.h b/src/libs/utils/utils_global.h
index 3a91f77a2b..fa967e6397 100644
--- a/src/libs/utils/utils_global.h
+++ b/src/libs/utils/utils_global.h
@@ -30,18 +30,6 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
-/****************************************************************************
-**
-** Copyright (C) 1992-$THISYEAR$ Trolltech AS. All rights reserved.
-**
-** This file is part of the $MODULE$ of the Qt Toolkit.
-**
-** $LICENSE$
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-****************************************************************************/
#ifndef UTILS_GLOBAL_H
#define UTILS_GLOBAL_H