diff options
Diffstat (limited to 'src')
117 files changed, 766 insertions, 765 deletions
diff --git a/src/assistant/assistant.pro b/src/assistant/assistant.pro index 65ac5aa65..34590d69e 100644 --- a/src/assistant/assistant.pro +++ b/src/assistant/assistant.pro @@ -1,7 +1,7 @@ TEMPLATE = subdirs SUBDIRS += clucene \ - help \ + help \ assistant \ qhelpgenerator \ qcollectiongenerator \ diff --git a/src/assistant/assistant/aboutdialog.h b/src/assistant/assistant/aboutdialog.h index 315d5af99..8be9b9add 100644 --- a/src/assistant/assistant/aboutdialog.h +++ b/src/assistant/assistant/aboutdialog.h @@ -59,7 +59,7 @@ public: AboutLabel(QWidget *parent = 0); void setText(const QString &text, const QByteArray &resources); QSize minimumSizeHint() const; - + private: QVariant loadResource(int type, const QUrl &name); void setSource(const QUrl &url); diff --git a/src/assistant/assistant/contentwindow.cpp b/src/assistant/assistant/contentwindow.cpp index a511de982..9f85ac51f 100644 --- a/src/assistant/assistant/contentwindow.cpp +++ b/src/assistant/assistant/contentwindow.cpp @@ -176,7 +176,7 @@ void ContentWindow::showContextMenu(const QPoint &pos) QAction *newTab = menu.addAction(tr("Open Link in New Tab")); if (!HelpViewer::canOpenPage(itm->url().path())) newTab->setEnabled(false); - + menu.move(m_contentWidget->mapToGlobal(pos)); QAction *action = menu.exec(); diff --git a/src/assistant/assistant/helpenginewrapper.h b/src/assistant/assistant/helpenginewrapper.h index 994d2067d..6346adc99 100644 --- a/src/assistant/assistant/helpenginewrapper.h +++ b/src/assistant/assistant/helpenginewrapper.h @@ -96,7 +96,7 @@ public: const QStringList customFilters() const; QUrl findFile(const QUrl &url) const; QByteArray fileData(const QUrl &url) const; - QMap<QString, QUrl> linksForIdentifier(const QString &id) const; + QMap<QString, QUrl> linksForIdentifier(const QString &id) const; const QStringList filterAttributes() const; const QStringList filterAttributes(const QString &filterName) const; QString error() const; diff --git a/src/assistant/assistant/indexwindow.cpp b/src/assistant/assistant/indexwindow.cpp index b0aeb72ff..4cfdf4060 100644 --- a/src/assistant/assistant/indexwindow.cpp +++ b/src/assistant/assistant/indexwindow.cpp @@ -213,7 +213,7 @@ void IndexWindow::open(QHelpIndexWidget* indexWidget, const QModelIndex &index) QUrl url; if (links.count() > 1) { TopicChooser tc(this, keyword, links); - if (tc.exec() == QDialog::Accepted) + if (tc.exec() == QDialog::Accepted) url = tc.link(); } else if (links.count() == 1) { url = links.constBegin().value(); diff --git a/src/assistant/assistant/preferencesdialog.h b/src/assistant/assistant/preferencesdialog.h index d7ee5da0a..f3344f0ae 100644 --- a/src/assistant/assistant/preferencesdialog.h +++ b/src/assistant/assistant/preferencesdialog.h @@ -73,7 +73,7 @@ private slots: void appFontSettingChanged(int index); void browserFontSettingToggled(bool on); void browserFontSettingChanged(int index); - + void setBlankPage(); void setCurrentPage(); void setDefaultPage(); diff --git a/src/assistant/assistant/remotecontrol_win.h b/src/assistant/assistant/remotecontrol_win.h index 1251b03a7..a892d69c1 100644 --- a/src/assistant/assistant/remotecontrol_win.h +++ b/src/assistant/assistant/remotecontrol_win.h @@ -54,7 +54,7 @@ class StdInListenerWin : public QThread public: StdInListenerWin(QObject *parent); ~StdInListenerWin(); - + signals: void receivedCommand(const QString &cmd); diff --git a/src/assistant/clucene/clucene.pro b/src/assistant/clucene/clucene.pro index 49bdb9d6f..5f152689c 100644 --- a/src/assistant/clucene/clucene.pro +++ b/src/assistant/clucene/clucene.pro @@ -33,8 +33,8 @@ CONFIG(exceptions_off) { win32-g++*:QMAKE_CXXFLAGS_CXX11 = -std=gnu++0x win32-msvc.net | win32-msvc2* { - QMAKE_CFLAGS_RELEASE -= -O2 - QMAKE_CXXFLAGS_RELEASE -= -O2 + QMAKE_CFLAGS_RELEASE -= -O2 + QMAKE_CXXFLAGS_RELEASE -= -O2 } # the following define could be set globally in case we need it elsewhere diff --git a/src/assistant/clucene/license.txt b/src/assistant/clucene/license.txt index 9ef3d701d..75657f7b4 100644 --- a/src/assistant/clucene/license.txt +++ b/src/assistant/clucene/license.txt @@ -146,7 +146,7 @@ such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. - + 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an diff --git a/src/assistant/clucene/qanalyzer.cpp b/src/assistant/clucene/qanalyzer.cpp index 1bd67d10e..ae666f01d 100644 --- a/src/assistant/clucene/qanalyzer.cpp +++ b/src/assistant/clucene/qanalyzer.cpp @@ -184,12 +184,12 @@ QCLuceneKeywordAnalyzer::~QCLuceneKeywordAnalyzer() QCLucenePerFieldAnalyzerWrapper::QCLucenePerFieldAnalyzerWrapper( - QCLuceneAnalyzer *defaultAnalyzer) + QCLuceneAnalyzer *defaultAnalyzer) : QCLuceneAnalyzer() { - d->analyzer = new + d->analyzer = new lucene::analysis::PerFieldAnalyzerWrapper(defaultAnalyzer->d->analyzer); - + analyzers.append(defaultAnalyzer); defaultAnalyzer->d->deleteCLuceneAnalyzer = false; } @@ -199,10 +199,10 @@ QCLucenePerFieldAnalyzerWrapper::~QCLucenePerFieldAnalyzerWrapper() qDeleteAll(analyzers); } -void QCLucenePerFieldAnalyzerWrapper::addAnalyzer(const QString &fieldName, +void QCLucenePerFieldAnalyzerWrapper::addAnalyzer(const QString &fieldName, QCLuceneAnalyzer *analyzer) { - lucene::analysis::PerFieldAnalyzerWrapper *analyzerWrapper = + lucene::analysis::PerFieldAnalyzerWrapper *analyzerWrapper = static_cast<lucene::analysis::PerFieldAnalyzerWrapper*> (d->analyzer); if (analyzerWrapper == 0) diff --git a/src/assistant/clucene/qanalyzer_p.h b/src/assistant/clucene/qanalyzer_p.h index d53f0c654..4c858c01c 100644 --- a/src/assistant/clucene/qanalyzer_p.h +++ b/src/assistant/clucene/qanalyzer_p.h @@ -76,7 +76,7 @@ public: virtual ~QCLuceneAnalyzer(); qint32 positionIncrementGap(const QString &fieldName) const; - QCLuceneTokenStream tokenStream(const QString &fieldName, + QCLuceneTokenStream tokenStream(const QString &fieldName, const QCLuceneReader &reader) const; protected: diff --git a/src/assistant/clucene/qclucene_global_p.h b/src/assistant/clucene/qclucene_global_p.h index 6d8e8197c..292de0813 100644 --- a/src/assistant/clucene/qclucene_global_p.h +++ b/src/assistant/clucene/qclucene_global_p.h @@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE // W A R N I N G // ------------- // -// adjustments here, need to be done in +// adjustments here, need to be done in // QTDIR/src/3rdparty/clucene/src/CLucene/StdHeader.h as well // #if defined(_LUCENE_DONTIMPLEMENT_NS_MACROS) diff --git a/src/assistant/clucene/qdocument.cpp b/src/assistant/clucene/qdocument.cpp index 87ce943d0..77f942544 100644 --- a/src/assistant/clucene/qdocument.cpp +++ b/src/assistant/clucene/qdocument.cpp @@ -90,7 +90,7 @@ QCLuceneField* QCLuceneDocument::getField(const QString &name) const } } delete [] fieldName; - + return field; } @@ -99,7 +99,7 @@ QString QCLuceneDocument::get(const QString &name) const QCLuceneField* field = getField(name); if (field) return field->stringValue(); - + return QString(); } diff --git a/src/assistant/clucene/qfield.cpp b/src/assistant/clucene/qfield.cpp index b62cdc758..bcdbc5de5 100644 --- a/src/assistant/clucene/qfield.cpp +++ b/src/assistant/clucene/qfield.cpp @@ -65,7 +65,7 @@ QCLuceneField::QCLuceneField(const QString &name, const QString &value, int conf delete [] fieldValue; } -QCLuceneField::QCLuceneField(const QString &name, QCLuceneReader *reader, +QCLuceneField::QCLuceneField(const QString &name, QCLuceneReader *reader, int configs) : d(new QCLuceneFieldPrivate()) , reader(reader) diff --git a/src/assistant/clucene/qfield_p.h b/src/assistant/clucene/qfield_p.h index 5bce06f99..16c3496d3 100644 --- a/src/assistant/clucene/qfield_p.h +++ b/src/assistant/clucene/qfield_p.h @@ -63,47 +63,47 @@ private: class Q_CLUCENE_EXPORT QCLuceneField { public: - enum Store { - STORE_YES = 1, - STORE_NO = 2, - STORE_COMPRESS = 4 - }; - - enum Index { - INDEX_NO = 16, - INDEX_TOKENIZED = 32, - INDEX_UNTOKENIZED = 64, - INDEX_NONORMS = 128 - }; - - enum TermVector { - TERMVECTOR_NO = 256, - TERMVECTOR_YES = 512, - TERMVECTOR_WITH_POSITIONS = 1024, - TERMVECTOR_WITH_OFFSETS = 2048 - }; - - QCLuceneField(const QString &name, const QString &value, int configs); - QCLuceneField(const QString &name, QCLuceneReader *reader, int configs); + enum Store { + STORE_YES = 1, + STORE_NO = 2, + STORE_COMPRESS = 4 + }; + + enum Index { + INDEX_NO = 16, + INDEX_TOKENIZED = 32, + INDEX_UNTOKENIZED = 64, + INDEX_NONORMS = 128 + }; + + enum TermVector { + TERMVECTOR_NO = 256, + TERMVECTOR_YES = 512, + TERMVECTOR_WITH_POSITIONS = 1024, + TERMVECTOR_WITH_OFFSETS = 2048 + }; + + QCLuceneField(const QString &name, const QString &value, int configs); + QCLuceneField(const QString &name, QCLuceneReader *reader, int configs); ~QCLuceneField(); QString name() const; QString stringValue() const; QCLuceneReader* readerValue() const; - bool isStored() const; - bool isIndexed() const; - bool isTokenized() const; - bool isCompressed() const; - void setConfig(int termVector); - bool isTermVectorStored() const; - bool isStoreOffsetWithTermVector() const; - bool isStorePositionWithTermVector() const; - qreal getBoost() const; - void setBoost(qreal value); - bool isBinary() const; - bool getOmitNorms() const; - void setOmitNorms(bool omitNorms); - QString toString() const; + bool isStored() const; + bool isIndexed() const; + bool isTokenized() const; + bool isCompressed() const; + void setConfig(int termVector); + bool isTermVectorStored() const; + bool isStoreOffsetWithTermVector() const; + bool isStorePositionWithTermVector() const; + qreal getBoost() const; + void setBoost(qreal value); + bool isBinary() const; + bool getOmitNorms() const; + void setOmitNorms(bool omitNorms); + QString toString() const; protected: QCLuceneField(); diff --git a/src/assistant/clucene/qhits_p.h b/src/assistant/clucene/qhits_p.h index 2b857233b..8dc8cb1a3 100644 --- a/src/assistant/clucene/qhits_p.h +++ b/src/assistant/clucene/qhits_p.h @@ -65,16 +65,16 @@ private: class Q_CLUCENE_EXPORT QCLuceneHits { public: - QCLuceneHits(const QCLuceneSearcher &searcher, const QCLuceneQuery &query, + QCLuceneHits(const QCLuceneSearcher &searcher, const QCLuceneQuery &query, const QCLuceneFilter &filter); - QCLuceneHits(const QCLuceneSearcher &searcher, const QCLuceneQuery &query, + QCLuceneHits(const QCLuceneSearcher &searcher, const QCLuceneQuery &query, const QCLuceneFilter &filter, const QCLuceneSort &sort); virtual ~QCLuceneHits(); QCLuceneDocument document(const qint32 index); qint32 length() const; - qint32 id (const qint32 index); - qreal score(const qint32 index); + qint32 id(const qint32 index); + qreal score(const qint32 index); protected: friend class QCLuceneSearcher; diff --git a/src/assistant/clucene/qindexreader.cpp b/src/assistant/clucene/qindexreader.cpp index 60fe10d41..2740aa55d 100644 --- a/src/assistant/clucene/qindexreader.cpp +++ b/src/assistant/clucene/qindexreader.cpp @@ -74,7 +74,7 @@ QCLuceneIndexReader QCLuceneIndexReader::open(const QString &path) QCLuceneIndexReader indexReader; indexReader.d->reader = IndexReader::open(path); - + return indexReader; } diff --git a/src/assistant/clucene/qindexreader_p.h b/src/assistant/clucene/qindexreader_p.h index 4baf0e48e..c0849126d 100644 --- a/src/assistant/clucene/qindexreader_p.h +++ b/src/assistant/clucene/qindexreader_p.h @@ -67,34 +67,34 @@ class Q_CLUCENE_EXPORT QCLuceneIndexReader { public: enum FieldOption { - ALL = 1, - INDEXED = 2, - UNINDEXED = 4, - INDEXED_WITH_TERMVECTOR = 8, - INDEXED_NO_TERMVECTOR = 16, - TERMVECTOR = 32, - TERMVECTOR_WITH_POSITION = 64, - TERMVECTOR_WITH_OFFSET = 128, - TERMVECTOR_WITH_POSITION_OFFSET = 256 - }; + ALL = 1, + INDEXED = 2, + UNINDEXED = 4, + INDEXED_WITH_TERMVECTOR = 8, + INDEXED_NO_TERMVECTOR = 16, + TERMVECTOR = 32, + TERMVECTOR_WITH_POSITION = 64, + TERMVECTOR_WITH_OFFSET = 128, + TERMVECTOR_WITH_POSITION_OFFSET = 256 + }; virtual ~QCLuceneIndexReader(); static bool isLuceneFile(const QString &filename); static bool indexExists(const QString &directory); static QCLuceneIndexReader open(const QString &path); - + static void unlock(const QString &path); static bool isLocked(const QString &directory); - static quint64 lastModified(const QString &directory); - static qint64 getCurrentVersion(const QString &directory); + static quint64 lastModified(const QString &directory); + static qint64 getCurrentVersion(const QString &directory); void close(); bool isCurrent(); - void undeleteAll(); - qint64 getVersion(); - void deleteDocument(qint32 docNum); + void undeleteAll(); + qint64 getVersion(); + void deleteDocument(qint32 docNum); bool hasNorms(const QString &field); qint32 deleteDocuments(const QCLuceneTerm &term); bool document(qint32 index, QCLuceneDocument &document); diff --git a/src/assistant/clucene/qindexwriter.cpp b/src/assistant/clucene/qindexwriter.cpp index d07ee475a..ab3425697 100644 --- a/src/assistant/clucene/qindexwriter.cpp +++ b/src/assistant/clucene/qindexwriter.cpp @@ -50,7 +50,7 @@ QCLuceneIndexWriter::QCLuceneIndexWriter(const QString &path, : d(new QCLuceneIndexWriterPrivate()) , analyzer(analyzer) { - d->writer = new lucene::index::IndexWriter(path, + d->writer = new lucene::index::IndexWriter(path, analyzer.d->analyzer, create, closeDir); } @@ -83,7 +83,7 @@ void QCLuceneIndexWriter::addIndexes(const QList<QCLuceneIndexReader*> &readers) { using namespace lucene::index; IndexReader** readerArray = new IndexReader*[readers.count()]; - + for (int i = 0; i < readers.count(); ++i) readerArray[i] = (readers.at(i))->d->reader; @@ -91,7 +91,7 @@ void QCLuceneIndexWriter::addIndexes(const QList<QCLuceneIndexReader*> &readers) delete [] readerArray; } -void QCLuceneIndexWriter::addDocument(QCLuceneDocument &doc, +void QCLuceneIndexWriter::addDocument(QCLuceneDocument &doc, QCLuceneAnalyzer &analyzer) { if (doc.d->document) diff --git a/src/assistant/clucene/qindexwriter_p.h b/src/assistant/clucene/qindexwriter_p.h index 20ac8b309..f6d4317e0 100644 --- a/src/assistant/clucene/qindexwriter_p.h +++ b/src/assistant/clucene/qindexwriter_p.h @@ -73,44 +73,44 @@ public: DEFAULT_MAX_MERGE_DOCS = 0x7FFFFFFFL }; - QCLuceneIndexWriter(const QString &path, QCLuceneAnalyzer &analyzer, - bool create, bool closeDir = true); + QCLuceneIndexWriter(const QString &path, QCLuceneAnalyzer &analyzer, + bool create, bool closeDir = true); virtual ~QCLuceneIndexWriter(); - void close(); - void optimize(); + void close(); + void optimize(); qint32 docCount(); QCLuceneAnalyzer getAnalyzer(); - + void addIndexes(const QList<QCLuceneIndexReader*> &readers); void addDocument(QCLuceneDocument &doc, QCLuceneAnalyzer &analyzer); - qint32 getMaxFieldLength() const; - void setMaxFieldLength(qint32 value); - + qint32 getMaxFieldLength() const; + void setMaxFieldLength(qint32 value); + qint32 getMaxBufferedDocs() const; void setMaxBufferedDocs(qint32 value); - - qint64 getWriteLockTimeout() const; + + qint64 getWriteLockTimeout() const; void setWriteLockTimeout(qint64 writeLockTimeout); - + qint64 getCommitLockTimeout() const; - void setCommitLockTimeout(qint64 commitLockTimeout); + void setCommitLockTimeout(qint64 commitLockTimeout); - qint32 getMergeFactor() const; - void setMergeFactor(qint32 value); + qint32 getMergeFactor() const; + void setMergeFactor(qint32 value); qint32 getTermIndexInterval() const; - void setTermIndexInterval(qint32 interval); - - qint32 getMinMergeDocs() const; - void setMinMergeDocs(qint32 value); + void setTermIndexInterval(qint32 interval); + + qint32 getMinMergeDocs() const; + void setMinMergeDocs(qint32 value); - qint32 getMaxMergeDocs() const; - void setMaxMergeDocs(qint32 value); + qint32 getMaxMergeDocs() const; + void setMaxMergeDocs(qint32 value); bool getUseCompoundFile() const; - void setUseCompoundFile(bool value); + void setUseCompoundFile(bool value); protected: QSharedDataPointer<QCLuceneIndexWriterPrivate> d; diff --git a/src/assistant/clucene/qquery.cpp b/src/assistant/clucene/qquery.cpp index 350868c02..93f33bae6 100644 --- a/src/assistant/clucene/qquery.cpp +++ b/src/assistant/clucene/qquery.cpp @@ -73,10 +73,10 @@ QString QCLuceneQuery::getQueryName() const bool QCLuceneQuery::instanceOf(const QString &other) const { - if (other == getQueryName()) - return true; + if (other == getQueryName()) + return true; - return false; + return false; } QString QCLuceneQuery::toString(const QString &field) const @@ -160,7 +160,7 @@ QCLuceneTerm QCLuceneRangeQuery::getUpperTerm() const bool QCLuceneRangeQuery::isInclusive() const { - lucene::search::RangeQuery *query = + lucene::search::RangeQuery *query = static_cast<lucene::search::RangeQuery*> (d->query); if (query == 0) @@ -171,7 +171,7 @@ bool QCLuceneRangeQuery::isInclusive() const QString QCLuceneRangeQuery::getField() const { - lucene::search::RangeQuery *query = + lucene::search::RangeQuery *query = static_cast<lucene::search::RangeQuery*> (d->query); if (query == 0) @@ -222,7 +222,7 @@ QString QCLuceneBooleanQuery::getClassName() quint32 QCLuceneBooleanQuery::getClauseCount() const { - lucene::search::BooleanQuery *query = + lucene::search::BooleanQuery *query = static_cast<lucene::search::BooleanQuery*> (d->query); if (query == 0) @@ -233,7 +233,7 @@ quint32 QCLuceneBooleanQuery::getClauseCount() const quint32 QCLuceneBooleanQuery::getMaxClauseCount() const { - lucene::search::BooleanQuery *query = + lucene::search::BooleanQuery *query = static_cast<lucene::search::BooleanQuery*> (d->query); if (query == 0) @@ -244,7 +244,7 @@ quint32 QCLuceneBooleanQuery::getMaxClauseCount() const void QCLuceneBooleanQuery::setMaxClauseCount(quint32 maxClauseCount) { - lucene::search::BooleanQuery *query = + lucene::search::BooleanQuery *query = static_cast<lucene::search::BooleanQuery*> (d->query); if (query == 0) @@ -254,14 +254,14 @@ void QCLuceneBooleanQuery::setMaxClauseCount(quint32 maxClauseCount) } void QCLuceneBooleanQuery::add(QCLuceneQuery *query, bool required, bool prohibited) -{ - add(query, false, required, prohibited); +{ + add(query, false, required, prohibited); } -void QCLuceneBooleanQuery::add(QCLuceneQuery *query, bool delQuery, +void QCLuceneBooleanQuery::add(QCLuceneQuery *query, bool delQuery, bool required, bool prohibited) { - lucene::search::BooleanQuery *booleanQuery = + lucene::search::BooleanQuery *booleanQuery = static_cast<lucene::search::BooleanQuery*> (d->query); if (booleanQuery == 0) @@ -294,7 +294,7 @@ QString QCLucenePhraseQuery::getClassName() qint32 QCLucenePhraseQuery::getSlop() const { - lucene::search::PhraseQuery *phraseQuery = + lucene::search::PhraseQuery *phraseQuery = static_cast<lucene::search::PhraseQuery*> (d->query); if (phraseQuery == 0) @@ -305,7 +305,7 @@ qint32 QCLucenePhraseQuery::getSlop() const void QCLucenePhraseQuery::setSlop(const qint32 slop) { - lucene::search::PhraseQuery *phraseQuery = + lucene::search::PhraseQuery *phraseQuery = static_cast<lucene::search::PhraseQuery*> (d->query); if (phraseQuery == 0) @@ -316,7 +316,7 @@ void QCLucenePhraseQuery::setSlop(const qint32 slop) void QCLucenePhraseQuery::addTerm(const QCLuceneTerm &term) { - lucene::search::PhraseQuery *phraseQuery = + lucene::search::PhraseQuery *phraseQuery = static_cast<lucene::search::PhraseQuery*> (d->query); if (phraseQuery == 0) @@ -328,7 +328,7 @@ void QCLucenePhraseQuery::addTerm(const QCLuceneTerm &term) void QCLucenePhraseQuery::addTerm(const QCLuceneTerm &term, qint32 position) { - lucene::search::PhraseQuery *phraseQuery = + lucene::search::PhraseQuery *phraseQuery = static_cast<lucene::search::PhraseQuery*> (d->query); if (phraseQuery == 0) @@ -341,7 +341,7 @@ void QCLucenePhraseQuery::addTerm(const QCLuceneTerm &term, qint32 position) QString QCLucenePhraseQuery::getFieldName() const { - lucene::search::PhraseQuery *phraseQuery = + lucene::search::PhraseQuery *phraseQuery = static_cast<lucene::search::PhraseQuery*> (d->query); if (phraseQuery == 0) diff --git a/src/assistant/clucene/qquery_p.h b/src/assistant/clucene/qquery_p.h index 291d426dc..0b084432f 100644 --- a/src/assistant/clucene/qquery_p.h +++ b/src/assistant/clucene/qquery_p.h @@ -76,7 +76,7 @@ public: qreal getBoost() const; QString getQueryName() const; bool instanceOf(const QString &other) const; - QString toString(const QString &field) const; + QString toString(const QString &field) const; quint32 hashCode() const; QString toString() const; bool equals(const QCLuceneQuery &other) const; @@ -102,8 +102,8 @@ public: ~QCLucenePrefixQuery(); static QString getClassName(); - - QCLuceneTerm getPrefix() const; + + QCLuceneTerm getPrefix() const; private: QCLuceneTerm prefix; @@ -112,13 +112,13 @@ private: class Q_CLUCENE_EXPORT QCLuceneRangeQuery : public QCLuceneQuery { public: - QCLuceneRangeQuery(const QCLuceneTerm &lowerTerm, + QCLuceneRangeQuery(const QCLuceneTerm &lowerTerm, const QCLuceneTerm &upperTerm, bool inclusive); ~QCLuceneRangeQuery(); static QString getClassName(); - - QCLuceneTerm getLowerTerm() const; + + QCLuceneTerm getLowerTerm() const; QCLuceneTerm getUpperTerm() const; bool isInclusive() const; @@ -136,8 +136,8 @@ public: ~QCLuceneTermQuery(); static QString getClassName(); - - QCLuceneTerm getTerm() const; + + QCLuceneTerm getTerm() const; private: QCLuceneTerm term; @@ -172,7 +172,7 @@ public: qint32 getSlop() const; void setSlop(const qint32 slop); - + void addTerm(const QCLuceneTerm &term); void addTerm(const QCLuceneTerm &term, qint32 position); diff --git a/src/assistant/clucene/qqueryparser.cpp b/src/assistant/clucene/qqueryparser.cpp index 2b934849c..a71fbae97 100644 --- a/src/assistant/clucene/qqueryparser.cpp +++ b/src/assistant/clucene/qqueryparser.cpp @@ -141,13 +141,13 @@ QCLuceneQuery* QCLuceneMultiFieldQueryParser::parse(const QString &query, QCLuceneQuery* QCLuceneMultiFieldQueryParser::parse(const QString &query, const QStringList &fieldList, - QList<FieldFlags> flags, + QList<FieldFlags> flags, QCLuceneAnalyzer &analyzer) { QCLuceneBooleanQuery *retValue = new QCLuceneBooleanQuery(); qint32 i = 0; foreach (const QString &field, fieldList) { - QCLuceneQuery *q = QCLuceneQueryParser::parse(query, field, analyzer); + QCLuceneQuery *q = QCLuceneQueryParser::parse(query, field, analyzer); if (q) { qint32 flag = flags.at(i); switch (flag) { diff --git a/src/assistant/clucene/qqueryparser_p.h b/src/assistant/clucene/qqueryparser_p.h index 362d829c7..5b2527632 100644 --- a/src/assistant/clucene/qqueryparser_p.h +++ b/src/assistant/clucene/qqueryparser_p.h @@ -71,7 +71,7 @@ public: QCLuceneQuery* parse(const QString &query); QCLuceneQuery* parse(QCLuceneReader &reader); - static QCLuceneQuery* parse(const QString &query, const QString &field, + static QCLuceneQuery* parse(const QString &query, const QString &field, QCLuceneAnalyzer &analyzer); QCLuceneAnalyzer getAnalyzer(); QString getField(); @@ -94,7 +94,7 @@ public: PROHIBITED_FIELD = 2 }; - QCLuceneMultiFieldQueryParser(const QStringList &fieldList, + QCLuceneMultiFieldQueryParser(const QStringList &fieldList, QCLuceneAnalyzer &analyzer); ~QCLuceneMultiFieldQueryParser(); diff --git a/src/assistant/clucene/qsearchable_p.h b/src/assistant/clucene/qsearchable_p.h index d4aa715dd..4c374d65c 100644 --- a/src/assistant/clucene/qsearchable_p.h +++ b/src/assistant/clucene/qsearchable_p.h @@ -93,7 +93,7 @@ public: QCLuceneHits search(const QCLuceneQuery &query); QCLuceneHits search(const QCLuceneQuery &query, const QCLuceneFilter &filter); QCLuceneHits search(const QCLuceneQuery &query, const QCLuceneSort &sort); - QCLuceneHits search(const QCLuceneQuery &query, const QCLuceneFilter &filter, + QCLuceneHits search(const QCLuceneQuery &query, const QCLuceneFilter &filter, const QCLuceneSort &sort); protected: diff --git a/src/assistant/clucene/qterm_p.h b/src/assistant/clucene/qterm_p.h index 74eb603ef..77bb11de5 100644 --- a/src/assistant/clucene/qterm_p.h +++ b/src/assistant/clucene/qterm_p.h @@ -73,17 +73,17 @@ public: virtual ~QCLuceneTerm(); QString field() const; - QString text() const; - - void set(const QString &field, const QString &text); - void set(const QCLuceneTerm &fieldTerm, const QString &text); - void set(const QString &field, const QString &text, bool internField); + QString text() const; + + void set(const QString &field, const QString &text); + void set(const QCLuceneTerm &fieldTerm, const QString &text); + void set(const QString &field, const QString &text, bool internField); bool equals(const QCLuceneTerm &other) const; qint32 compareTo(const QCLuceneTerm &other) const; - - QString toString() const; - quint32 hashCode() const; + + QString toString() const; + quint32 hashCode() const; quint32 textLength() const; protected: diff --git a/src/assistant/clucene/qtoken.cpp b/src/assistant/clucene/qtoken.cpp index 18c23115b..1bc3b561e 100644 --- a/src/assistant/clucene/qtoken.cpp +++ b/src/assistant/clucene/qtoken.cpp @@ -52,13 +52,13 @@ QCLuceneToken::QCLuceneToken() d->token = new lucene::analysis::Token(); } -QCLuceneToken::QCLuceneToken(const QString &text, qint32 startOffset, +QCLuceneToken::QCLuceneToken(const QString &text, qint32 startOffset, qint32 endOffset, const QString &defaultTyp) : d(new QCLuceneTokenPrivate()) , tokenText(QStringToTChar(text)) , tokenType(QStringToTChar(defaultTyp)) { - d->token = new lucene::analysis::Token(tokenText, int32_t(startOffset), + d->token = new lucene::analysis::Token(tokenText, int32_t(startOffset), int32_t(endOffset), tokenType); } diff --git a/src/assistant/clucene/qtoken_p.h b/src/assistant/clucene/qtoken_p.h index 0e774dc4e..e7c2a65dd 100644 --- a/src/assistant/clucene/qtoken_p.h +++ b/src/assistant/clucene/qtoken_p.h @@ -65,12 +65,12 @@ class Q_CLUCENE_EXPORT QCLuceneToken { public: QCLuceneToken(); - QCLuceneToken(const QString &text, qint32 startOffset, + QCLuceneToken(const QString &text, qint32 startOffset, qint32 endOffset, const QString &defaultTyp = QLatin1String("word")); - + virtual ~QCLuceneToken(); - void set(const QString &text, qint32 startOffset, + void set(const QString &text, qint32 startOffset, qint32 endOffset, const QString &defaultTyp = QLatin1String("word")); quint32 bufferLength() const; diff --git a/src/assistant/clucene/qtokenizer.cpp b/src/assistant/clucene/qtokenizer.cpp index 32eab930b..2bd3d8b2d 100644 --- a/src/assistant/clucene/qtokenizer.cpp +++ b/src/assistant/clucene/qtokenizer.cpp @@ -55,7 +55,7 @@ bool QCLuceneTokenizer::next(QCLuceneToken &token) QCLuceneStandardTokenizer::QCLuceneStandardTokenizer(const QCLuceneReader &reader) : QCLuceneTokenizer(reader) { - d->tokenStream = + d->tokenStream = new lucene::analysis::standard::StandardTokenizer(reader.d->reader); } @@ -64,10 +64,10 @@ QCLuceneStandardTokenizer::~QCLuceneStandardTokenizer() // nothing todo } -bool QCLuceneStandardTokenizer::readApostrophe(const QString &string, +bool QCLuceneStandardTokenizer::readApostrophe(const QString &string, QCLuceneToken &token) { - lucene::analysis::standard::StandardTokenizer *stdTokenizer = + lucene::analysis::standard::StandardTokenizer *stdTokenizer = static_cast<lucene::analysis::standard::StandardTokenizer*> (d->tokenStream); if (stdTokenizer == 0) @@ -77,13 +77,13 @@ bool QCLuceneStandardTokenizer::readApostrophe(const QString &string, lucene::util::StringBuffer buffer(value); bool retValue = stdTokenizer->ReadApostrophe(&buffer, token.d->token); delete [] value; - + return retValue; } bool QCLuceneStandardTokenizer::readAt(const QString &string, QCLuceneToken &token) { - lucene::analysis::standard::StandardTokenizer *stdTokenizer = + lucene::analysis::standard::StandardTokenizer *stdTokenizer = static_cast<lucene::analysis::standard::StandardTokenizer*> (d->tokenStream); if (stdTokenizer == 0) @@ -93,14 +93,14 @@ bool QCLuceneStandardTokenizer::readAt(const QString &string, QCLuceneToken &tok lucene::util::StringBuffer buffer(value); bool retValue = stdTokenizer->ReadAt(&buffer, token.d->token); delete [] value; - + return retValue; } -bool QCLuceneStandardTokenizer::readCompany(const QString &string, +bool QCLuceneStandardTokenizer::readCompany(const QString &string, QCLuceneToken &token) { - lucene::analysis::standard::StandardTokenizer *stdTokenizer = + lucene::analysis::standard::StandardTokenizer *stdTokenizer = static_cast<lucene::analysis::standard::StandardTokenizer*> (d->tokenStream); if (stdTokenizer == 0) @@ -110,7 +110,7 @@ bool QCLuceneStandardTokenizer::readCompany(const QString &string, lucene::util::StringBuffer buffer(value); bool retValue = stdTokenizer->ReadCompany(&buffer, token.d->token); delete [] value; - + return retValue; } diff --git a/src/assistant/clucene/qtokenstream.cpp b/src/assistant/clucene/qtokenstream.cpp index bcceb9a5c..79819f226 100644 --- a/src/assistant/clucene/qtokenstream.cpp +++ b/src/assistant/clucene/qtokenstream.cpp @@ -61,7 +61,7 @@ void QCLuceneTokenStream::close() bool QCLuceneTokenStream::next(QCLuceneToken &token) { - return d->tokenStream->next(token.d->token); + return d->tokenStream->next(token.d->token); } QT_END_NAMESPACE diff --git a/src/assistant/help/qhelpcollectionhandler_p.h b/src/assistant/help/qhelpcollectionhandler_p.h index 744dfa14d..5ee7b1d84 100644 --- a/src/assistant/help/qhelpcollectionhandler_p.h +++ b/src/assistant/help/qhelpcollectionhandler_p.h @@ -101,7 +101,7 @@ public: bool addFilterAttributes(const QStringList &attributes); QStringList filterAttributes() const; QStringList filterAttributes(const QString &filterName) const; - + int registerNamespace(const QString &nspace, const QString &fileName); bool registerVirtualFolder(const QString &folderName, int namespaceId); void optimizeDatabase(const QString &fileName); diff --git a/src/assistant/help/qhelpdatainterface.cpp b/src/assistant/help/qhelpdatainterface.cpp index fa3af6fd6..20485c322 100644 --- a/src/assistant/help/qhelpdatainterface.cpp +++ b/src/assistant/help/qhelpdatainterface.cpp @@ -103,7 +103,7 @@ QList<QHelpDataContentItem*> QHelpDataContentItem::children() const bool QHelpDataIndexItem::operator==(const QHelpDataIndexItem & other) const { - return (other.name == name) + return (other.name == name) && (other.reference == reference); } diff --git a/src/assistant/help/qhelpdatainterface_p.h b/src/assistant/help/qhelpdatainterface_p.h index ebb2bc172..81714a57b 100644 --- a/src/assistant/help/qhelpdatainterface_p.h +++ b/src/assistant/help/qhelpdatainterface_p.h @@ -85,7 +85,7 @@ struct QHELP_EXPORT QHelpDataIndexItem { QString name; QString identifier; QString reference; - + bool operator==(const QHelpDataIndexItem & other) const; }; diff --git a/src/assistant/help/qhelpdbreader.cpp b/src/assistant/help/qhelpdbreader.cpp index 6262dfed5..ca669cbf1 100644 --- a/src/assistant/help/qhelpdbreader.cpp +++ b/src/assistant/help/qhelpdbreader.cpp @@ -546,13 +546,13 @@ QSet<int> QHelpDBReader::indexIds(const QStringList &attributes) const "a.FilterAttributeId=b.Id AND b.Name='%1'")) .arg(attributes.at(i))); } - + if (!m_query->exec(query)) return ids; while (m_query->next()) ids.insert(m_query->value(0).toInt()); - + return ids; } @@ -573,7 +573,7 @@ bool QHelpDBReader::createAttributesCache(const QStringList &attributes, if (m_viewAttributes.count() || needUpdate) { m_viewAttributes.clear(); - m_indicesCache = indexIds; + m_indicesCache = indexIds; } foreach (const QString &s, attributes) m_viewAttributes.insert(s); diff --git a/src/assistant/help/qhelpdbreader_p.h b/src/assistant/help/qhelpdbreader_p.h index 3b8014425..e4d867282 100644 --- a/src/assistant/help/qhelpdbreader_p.h +++ b/src/assistant/help/qhelpdbreader_p.h @@ -68,7 +68,7 @@ class QHelpDBReader : public QObject Q_OBJECT public: - QHelpDBReader(const QString &dbName); + QHelpDBReader(const QString &dbName); QHelpDBReader(const QString &dbName, const QString &uniqueId, QObject *parent); ~QHelpDBReader(); diff --git a/src/assistant/help/qhelpenginecore.h b/src/assistant/help/qhelpenginecore.h index 76a384fb2..202b1850d 100644 --- a/src/assistant/help/qhelpenginecore.h +++ b/src/assistant/help/qhelpenginecore.h @@ -60,7 +60,7 @@ class QHELP_EXPORT QHelpEngineCore : public QObject Q_PROPERTY(bool autoSaveFilter READ autoSaveFilter WRITE setAutoSaveFilter) Q_PROPERTY(QString collectionFile READ collectionFile WRITE setCollectionFile) Q_PROPERTY(QString currentFilter READ currentFilter WRITE setCurrentFilter) - + public: explicit QHelpEngineCore(const QString &collectionFile, QObject *parent = 0); virtual ~QHelpEngineCore(); diff --git a/src/assistant/help/qhelpsearchindexwriter_default.cpp b/src/assistant/help/qhelpsearchindexwriter_default.cpp index ebfae3fc9..ec2c267aa 100644 --- a/src/assistant/help/qhelpsearchindexwriter_default.cpp +++ b/src/assistant/help/qhelpsearchindexwriter_default.cpp @@ -207,7 +207,7 @@ void QHelpSearchIndexWriter::run() const QLatin1String key("DefaultSearchNamespaces"); const QString collectionFile(this->m_collectionFile); const QString indexPath = m_indexFilesFolder; - + mutex.unlock(); QHelpEngineCore engine(collectionFile, 0); @@ -255,7 +255,7 @@ void QHelpSearchIndexWriter::run() // get rid of duplicated files if (url.hasFragment()) url.setFragment(QString()); - + QString s = url.toString(); if (s.endsWith(QLatin1String(".html")) || s.endsWith(QLatin1String(".htm")) diff --git a/src/assistant/qhelpconverter/conversionwizard.h b/src/assistant/qhelpconverter/conversionwizard.h index 0fe30e2be..c15df556e 100644 --- a/src/assistant/qhelpconverter/conversionwizard.h +++ b/src/assistant/qhelpconverter/conversionwizard.h @@ -77,7 +77,7 @@ private: void initializePage(int id); QStringList getUnreferencedFiles(const QStringList &files); bool eventFilter(QObject *obj, QEvent *e); - + AdpReader m_adpReader; InputPage *m_inputPage; GeneralPage *m_generalPage; diff --git a/src/assistant/qhelpconverter/doc/filterpage.html b/src/assistant/qhelpconverter/doc/filterpage.html index 7b3781bd5..f95f3b294 100644 --- a/src/assistant/qhelpconverter/doc/filterpage.html +++ b/src/assistant/qhelpconverter/doc/filterpage.html @@ -3,7 +3,7 @@ <p>The help system offers the possibility to filter all installed documentations for certain <b>attributes</b>. Commonly specified attributes are e.g. the company and product name as well as the product version.</p> -<p>The help engine and Assistant use <b>custom filters</b> to do the actual +<p>The help engine and Assistant use <b>custom filters</b> to do the actual documentation filtering. A custom filter is basically just a alias name for a list of filter attributes. So, if e.g. the custom filter "MyFilter" lists the attributes "mycompany, myproduct" then only the documentation with those diff --git a/src/assistant/qhelpconverter/doc/identifierpage.html b/src/assistant/qhelpconverter/doc/identifierpage.html index 952b88de8..714b51c56 100644 --- a/src/assistant/qhelpconverter/doc/identifierpage.html +++ b/src/assistant/qhelpconverter/doc/identifierpage.html @@ -4,7 +4,7 @@ be used to specify keywords which should not be shown in the index. Identifiers are especially help full when using context sensitive help and one keyword has more links assigned to it.</p> -<p>E.g. consider the keyword "replace" in Qt. It is +<p>E.g. consider the keyword "replace" in Qt. It is included, among others, in QString and QList. To be able to retrieve the proper documentation, there is an identifier "QString::replace" and one "QList::replace".</p> diff --git a/src/assistant/qhelpconverter/finishpage.h b/src/assistant/qhelpconverter/finishpage.h index 810b4702a..e7fbc72f0 100644 --- a/src/assistant/qhelpconverter/finishpage.h +++ b/src/assistant/qhelpconverter/finishpage.h @@ -55,7 +55,7 @@ class FinishPage : public QWizardPage public: FinishPage(QWidget *parent = 0); void appendMessage(const QString &msg); - + private: QTextEdit *m_textEdit; }; diff --git a/src/assistant/qhelpconverter/identifierpage.cpp b/src/assistant/qhelpconverter/identifierpage.cpp index 82ff597ea..8e7ca8d58 100644 --- a/src/assistant/qhelpconverter/identifierpage.cpp +++ b/src/assistant/qhelpconverter/identifierpage.cpp @@ -51,7 +51,7 @@ IdentifierPage::IdentifierPage(QWidget *parent) "the keywords found in the .adp or .dcf file.")); m_ui.setupUi(this); - + connect(m_ui.identifierCheckBox, SIGNAL(toggled(bool)), this, SLOT(setupButtons(bool))); @@ -64,7 +64,7 @@ void IdentifierPage::setupButtons(bool checked) { m_ui.globalButton->setEnabled(checked); m_ui.fileNameButton->setEnabled(checked); - m_ui.prefixLineEdit->setEnabled(checked + m_ui.prefixLineEdit->setEnabled(checked && m_ui.globalButton->isChecked()); } diff --git a/src/assistant/qhelpconverter/identifierpage.h b/src/assistant/qhelpconverter/identifierpage.h index ae8daa012..07b7cbb6c 100644 --- a/src/assistant/qhelpconverter/identifierpage.h +++ b/src/assistant/qhelpconverter/identifierpage.h @@ -53,12 +53,12 @@ class IdentifierPage : public QWizardPage public: IdentifierPage(QWidget *parent = 0); - + private slots: void setupButtons(bool checked); private: - Ui::IdentifierPage m_ui; + Ui::IdentifierPage m_ui; }; QT_END_NAMESPACE diff --git a/src/assistant/qhelpconverter/inputpage.h b/src/assistant/qhelpconverter/inputpage.h index 5ea1bfb7e..54c4952e0 100644 --- a/src/assistant/qhelpconverter/inputpage.h +++ b/src/assistant/qhelpconverter/inputpage.h @@ -55,7 +55,7 @@ class InputPage : public QWizardPage public: explicit InputPage(AdpReader *reader, QWidget *parent = 0); - + private slots: void getFileName(); diff --git a/src/assistant/qhelpconverter/main.cpp b/src/assistant/qhelpconverter/main.cpp index 8ca718908..07c0b1b7b 100644 --- a/src/assistant/qhelpconverter/main.cpp +++ b/src/assistant/qhelpconverter/main.cpp @@ -70,7 +70,7 @@ int main(int argc, char *argv[]) QFileInfo fi(QString::fromLocal8Bit(argv[1])); if (fi.exists()) w.setAdpFileName(fi.absoluteFilePath()); - } + } w.show(); return app.exec(); } diff --git a/src/assistant/qhelpconverter/outputpage.cpp b/src/assistant/qhelpconverter/outputpage.cpp index ba52e1236..df4bc71cd 100644 --- a/src/assistant/qhelpconverter/outputpage.cpp +++ b/src/assistant/qhelpconverter/outputpage.cpp @@ -98,7 +98,7 @@ bool OutputPage::checkFile(const QString &fileName, const QString &title) QFile fi(m_path + QDir::separator() + fileName); if (!fi.exists()) return true; - + if (QMessageBox::warning(this, title, tr("The specified file %1 already exist.\n\nDo you want to remove it?") .arg(fileName), tr("Remove"), tr("Cancel")) == 0) { diff --git a/src/assistant/qhelpconverter/pathpage.h b/src/assistant/qhelpconverter/pathpage.h index 9f51344ce..37fb66752 100644 --- a/src/assistant/qhelpconverter/pathpage.h +++ b/src/assistant/qhelpconverter/pathpage.h @@ -56,7 +56,7 @@ public: void setPath(const QString &path); QStringList paths() const; QStringList filters() const; - + private slots: void addPath(); void removePath(); diff --git a/src/assistant/qhelpconverter/qhcpwriter.cpp b/src/assistant/qhelpconverter/qhcpwriter.cpp index 653697bcc..2eea7a932 100644 --- a/src/assistant/qhelpconverter/qhcpwriter.cpp +++ b/src/assistant/qhelpconverter/qhcpwriter.cpp @@ -52,7 +52,7 @@ QhcpWriter::QhcpWriter() void QhcpWriter::setHelpProjectFile(const QString &qhpFile) { - m_qhpFile = qhpFile; + m_qhpFile = qhpFile; } void QhcpWriter::setProperties(const QMap<QString, QString> props) @@ -70,7 +70,7 @@ bool QhcpWriter::writeFile(const QString &fileName) QFile out(fileName); if (!out.open(QIODevice::WriteOnly)) return false; - + setDevice(&out); writeStartDocument(); writeStartElement(QLatin1String("QHelpCollectionProject")); @@ -127,7 +127,7 @@ void QhcpWriter::writeDocuments() out.append(QLatin1String(".qch")); writeStartElement(QLatin1String("docFiles")); - + writeStartElement(QLatin1String("generate")); writeStartElement(QLatin1String("file")); writeTextElement(QLatin1String("input"), m_qhpFile); diff --git a/src/assistant/qhelpconverter/qhpwriter.h b/src/assistant/qhelpconverter/qhpwriter.h index f751099e5..99df3bb2f 100644 --- a/src/assistant/qhelpconverter/qhpwriter.h +++ b/src/assistant/qhelpconverter/qhpwriter.h @@ -60,7 +60,7 @@ public: void setCustomFilters(const QList<CustomFilter> filters); void setFiles(const QStringList &files); void generateIdentifiers(IdentifierPrefix prefix, - const QString prefixString = QString()); + const QString prefixString = QString()); bool writeFile(const QString &fileName); private: diff --git a/src/assistant/shared/helpgenerator.h b/src/assistant/shared/helpgenerator.h index df43b7c28..c502b4418 100644 --- a/src/assistant/shared/helpgenerator.h +++ b/src/assistant/shared/helpgenerator.h @@ -63,7 +63,7 @@ public: private slots: void printStatus(const QString &msg); void printWarning(const QString &msg); - + private: QHelpGenerator *generator; }; diff --git a/src/designer/data/generate_header.xsl b/src/designer/data/generate_header.xsl index 660e23d08..579e01eae 100644 --- a/src/designer/data/generate_header.xsl +++ b/src/designer/data/generate_header.xsl @@ -163,7 +163,7 @@ <xsl:text>,</xsl:text> </xsl:if> <xsl:text>&endl;</xsl:text> - + </xsl:for-each> <xsl:text> };&endl;</xsl:text> </xsl:if> diff --git a/src/designer/data/ui3.xsd b/src/designer/data/ui3.xsd index 06f325ef3..5bf417dca 100644 --- a/src/designer/data/ui3.xsd +++ b/src/designer/data/ui3.xsd @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> - + <xs:element name="UI"> <xs:complexType> <xs:choice maxOccurs="unbounded"> @@ -66,7 +66,7 @@ </xs:complexType> </xs:element> <xs:element name="includes"> - <xs:complexType> + <xs:complexType> <xs:sequence maxOccurs="unbounded"> <xs:element name="include"> <xs:complexType> @@ -77,7 +77,7 @@ </xs:extension> </xs:simpleContent> </xs:complexType> - </xs:element> + </xs:element> </xs:sequence> </xs:complexType> </xs:element> @@ -133,7 +133,7 @@ </xs:complexType> </xs:element> <xs:element name="slots"> - <xs:complexType> + <xs:complexType> <xs:sequence maxOccurs="unbounded"> <xs:element name="slot"> <xs:complexType> @@ -206,7 +206,7 @@ <xs:element name="spacer" type="spacer" /> </xs:choice> </xs:complexType> - + <xs:complexType name="widget"> <xs:choice maxOccurs="unbounded"> <xs:element name="class" type="xs:string" /> @@ -220,7 +220,7 @@ <xs:attribute name="row" type="xs:integer" /> <!-- ### remove me --> <xs:attribute name="column" type="xs:integer" /> <!-- ### remove me --> </xs:complexType> - + <xs:complexType name="spacer"> <xs:sequence maxOccurs="unbounded"> <xs:element name="property" type="property" /> @@ -238,7 +238,7 @@ <xs:element name="blue" type="xs:integer" /> </xs:sequence> </xs:complexType> - + <xs:complexType name="colorGroup"> <xs:choice maxOccurs="unbounded"> <xs:element name="color" type="color" /> @@ -272,7 +272,7 @@ <xs:element name="y" type="xs:integer" /> </xs:sequence> </xs:complexType> - + <xs:complexType name="rect"> <xs:sequence> <xs:element name="x" type="xs:integer" /> @@ -297,7 +297,7 @@ <xs:element name="height" type="xs:integer" /> </xs:sequence> </xs:complexType> - + <xs:complexType name="date"> <xs:sequence> <xs:element name="year" type="xs:integer" /> @@ -313,7 +313,7 @@ <xs:element name="second" type="xs:integer" /> </xs:sequence> </xs:complexType> - + <xs:complexType name="dateTime"> <xs:sequence> <xs:element name="hour" type="xs:integer" /> @@ -349,5 +349,5 @@ <xs:attribute name="name" type="xs:string" /> <xs:attribute name="stdset" type="xs:integer" /> </xs:complexType> - + </xs:schema>
\ No newline at end of file diff --git a/src/designer/src/components/formeditor/formwindowcursor.cpp b/src/designer/src/components/formeditor/formwindowcursor.cpp index 294373fe3..85665a9a1 100644 --- a/src/designer/src/components/formeditor/formwindowcursor.cpp +++ b/src/designer/src/components/formeditor/formwindowcursor.cpp @@ -169,12 +169,12 @@ void FormWindowCursor::setProperty(const QString &name, const QVariant &value) // build selection const int N = selectedWidgetCount(); Q_ASSERT(N); - + SetPropertyCommand::ObjectList selection; - for (int i=0; i<N; ++i) + for (int i=0; i<N; ++i) selection.push_back(selectedWidget(i)); - + SetPropertyCommand* setPropertyCommand = new SetPropertyCommand(m_formWindow); if (setPropertyCommand->init(selection, name, value, current())) { m_formWindow->commandHistory()->push(setPropertyCommand); diff --git a/src/designer/src/components/formeditor/formwindowmanager.cpp b/src/designer/src/components/formeditor/formwindowmanager.cpp index 457d15638..8761849d6 100644 --- a/src/designer/src/components/formeditor/formwindowmanager.cpp +++ b/src/designer/src/components/formeditor/formwindowmanager.cpp @@ -816,7 +816,7 @@ static inline bool hasManagedLayoutItems(const QDesignerFormEditorInterface *cor { if (const QLayout *ml = LayoutInfo::managedLayout(core, w)) { // Try to find managed items, ignore dummy grid spacers - const int count = ml->count(); + const int count = ml->count(); for (int i = 0; i < count; i++) if (!LayoutInfo::isEmptyItem(ml->itemAt(i))) return true; diff --git a/src/designer/src/components/formeditor/formwindowsettings.h b/src/designer/src/components/formeditor/formwindowsettings.h index b6543e2b1..9bf2be7a3 100644 --- a/src/designer/src/components/formeditor/formwindowsettings.h +++ b/src/designer/src/components/formeditor/formwindowsettings.h @@ -45,7 +45,7 @@ #include <QtWidgets/QDialog> QT_BEGIN_NAMESPACE - + namespace Ui { class FormWindowSettings; } diff --git a/src/designer/src/components/formeditor/qmainwindow_container.cpp b/src/designer/src/components/formeditor/qmainwindow_container.cpp index 67ccaae59..cfaee7f71 100644 --- a/src/designer/src/components/formeditor/qmainwindow_container.cpp +++ b/src/designer/src/components/formeditor/qmainwindow_container.cpp @@ -88,7 +88,7 @@ void QMainWindowContainer::setCurrentIndex(int index) namespace { // Pair of <area,break_before> typedef QPair<Qt::ToolBarArea,bool> ToolBarData; - + ToolBarData toolBarData(QToolBar *me) { const QMainWindow *mw = qobject_cast<const QMainWindow*>(me->parentWidget()); if (!mw || !mw->layout() || mw->layout()->indexOf(me) == -1) @@ -96,7 +96,7 @@ namespace { return ToolBarData(mw->toolBarArea(me), mw->toolBarBreak(me)); } -Qt::DockWidgetArea dockWidgetArea(QDockWidget *me) +Qt::DockWidgetArea dockWidgetArea(QDockWidget *me) { if (const QMainWindow *mw = qobject_cast<const QMainWindow*>(me->parentWidget())) { // Make sure that me is actually managed by mw, otherwise diff --git a/src/designer/src/components/objectinspector/objectinspector.cpp b/src/designer/src/components/objectinspector/objectinspector.cpp index bfd867658..dfa6cfdf7 100644 --- a/src/designer/src/components/objectinspector/objectinspector.cpp +++ b/src/designer/src/components/objectinspector/objectinspector.cpp @@ -262,7 +262,7 @@ ObjectInspector::ObjectInspectorPrivate::ObjectInspectorPrivate(QDesignerFormEdi m_treeView->setContextMenuPolicy(Qt::CustomContextMenu); } - + ObjectInspector::ObjectInspectorPrivate::~ObjectInspectorPrivate() { delete m_treeView->itemDelegate(); diff --git a/src/designer/src/components/propertyeditor/paletteeditor.cpp b/src/designer/src/components/propertyeditor/paletteeditor.cpp index cf4ba20e7..9924c4bd7 100644 --- a/src/designer/src/components/propertyeditor/paletteeditor.cpp +++ b/src/designer/src/components/propertyeditor/paletteeditor.cpp @@ -59,7 +59,7 @@ namespace qdesigner_internal { enum { BrushRole = 33 }; -PaletteEditor::PaletteEditor(QDesignerFormEditorInterface *core, QWidget *parent) : +PaletteEditor::PaletteEditor(QDesignerFormEditorInterface *core, QWidget *parent) : QDialog(parent), m_currentColorGroup(QPalette::Active), m_paletteModel(new PaletteModel(this)), @@ -238,7 +238,7 @@ QPalette PaletteEditor::getPalette(QDesignerFormEditorInterface *core, QWidget* ////////////////////// -PaletteModel::PaletteModel(QObject *parent) : +PaletteModel::PaletteModel(QObject *parent) : QAbstractTableModel(parent), m_compute(true) { @@ -419,7 +419,7 @@ BrushEditor::BrushEditor(QDesignerFormEditorInterface *core, QWidget *parent) : QWidget(parent), m_button(new QtColorButton(this)), m_changed(false), - m_core(core) + m_core(core) { QLayout *layout = new QHBoxLayout(this); layout->setMargin(0); @@ -500,12 +500,12 @@ void RoleEditor::emitResetProperty() setEdited(false); emit changed(this); } - + ////////////////////////// ColorDelegate::ColorDelegate(QDesignerFormEditorInterface *core, QObject *parent) : QItemDelegate(parent), m_core(core) -{ +{ } QWidget *ColorDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &, @@ -593,8 +593,8 @@ void ColorDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opt, painter->restore(); } QItemDelegate::paint(painter, option, index); - - + + const QColor color = static_cast<QRgb>(QApplication::style()->styleHint(QStyle::SH_Table_GridLineColor, &option)); const QPen oldPen = painter->pen(); painter->setPen(QPen(color)); diff --git a/src/designer/src/components/propertyeditor/previewframe.h b/src/designer/src/components/propertyeditor/previewframe.h index b494321d5..933c7b1fd 100644 --- a/src/designer/src/components/propertyeditor/previewframe.h +++ b/src/designer/src/components/propertyeditor/previewframe.h @@ -60,7 +60,7 @@ public: void setPreviewPalette(const QPalette &palette); void setSubWindowActive(bool active); - + private: // The user can on some platforms close the mdi child by invoking the system menu. // Ensure a child is present. diff --git a/src/designer/src/components/taskmenu/menutaskmenu.h b/src/designer/src/components/taskmenu/menutaskmenu.h index 186a364e3..301c32bcd 100644 --- a/src/designer/src/components/taskmenu/menutaskmenu.h +++ b/src/designer/src/components/taskmenu/menutaskmenu.h @@ -57,7 +57,7 @@ namespace qdesigner_internal { class PromotionTaskMenu; // The QMenu task menu provides promotion and a remove option. The actual -// menu context options are not forwarded since they make only sense +// menu context options are not forwarded since they make only sense // when a menu is being edited/visible. class MenuTaskMenu : public QObject, public QDesignerTaskMenuExtension diff --git a/src/designer/src/designer/appfontdialog.h b/src/designer/src/designer/appfontdialog.h index 9d01266e5..9fa57a430 100644 --- a/src/designer/src/designer/appfontdialog.h +++ b/src/designer/src/designer/appfontdialog.h @@ -54,7 +54,7 @@ class QToolButton; class QItemSelection; class QDesignerSettingsInterface; -// AppFontWidget: Manages application fonts which the user can load and +// AppFontWidget: Manages application fonts which the user can load and // provides API for saving/restoring them. class AppFontWidget : public QGroupBox diff --git a/src/designer/src/designer/newform.cpp b/src/designer/src/designer/newform.cpp index 76b426901..a256d8074 100644 --- a/src/designer/src/designer/newform.cpp +++ b/src/designer/src/designer/newform.cpp @@ -96,7 +96,7 @@ NewForm::NewForm(QDesignerWorkbench *workbench, QWidget *parentWidget, const QSt m_buttonBox = createButtonBox(); vBoxLayout->addWidget(m_buttonBox); setLayout(vBoxLayout); - + resize(500, 400); slotCurrentTemplateChanged(m_newFormWidget->hasCurrentTemplate()); } diff --git a/src/designer/src/designer/qdesigner_server.cpp b/src/designer/src/designer/qdesigner_server.cpp index 4508b4a4e..00f3722d4 100644 --- a/src/designer/src/designer/qdesigner_server.cpp +++ b/src/designer/src/designer/qdesigner_server.cpp @@ -131,7 +131,7 @@ QDesignerClient::QDesignerClient(quint16 port, QObject *parent) m_socket->connectToHost(QHostAddress::LocalHost, port); connect(m_socket, SIGNAL(readyRead()), this, SLOT(readFromSocket())); - + } QDesignerClient::~QDesignerClient() diff --git a/src/designer/src/lib/sdk/abstractmetadatabase.cpp b/src/designer/src/lib/sdk/abstractmetadatabase.cpp index a2af2b334..753de8840 100644 --- a/src/designer/src/lib/sdk/abstractmetadatabase.cpp +++ b/src/designer/src/lib/sdk/abstractmetadatabase.cpp @@ -150,7 +150,7 @@ QDesignerMetaDataBaseInterface::~QDesignerMetaDataBaseInterface() \sa tabOrder() */ - + /*! \fn bool QDesignerMetaDataBaseItemInterface::enabled() const diff --git a/src/designer/src/lib/sdk/abstractmetadatabase.h b/src/designer/src/lib/sdk/abstractmetadatabase.h index 80aae6bf3..0802e02d3 100644 --- a/src/designer/src/lib/sdk/abstractmetadatabase.h +++ b/src/designer/src/lib/sdk/abstractmetadatabase.h @@ -62,12 +62,12 @@ public: virtual QString name() const = 0; virtual void setName(const QString &name) = 0; - + virtual QList<QWidget*> tabOrder() const = 0; virtual void setTabOrder(const QList<QWidget*> &tabOrder) = 0; - + virtual bool enabled() const = 0; - virtual void setEnabled(bool b) = 0; + virtual void setEnabled(bool b) = 0; }; @@ -85,7 +85,7 @@ public: virtual QList<QObject*> objects() const = 0; virtual QDesignerFormEditorInterface *core() const = 0; - + Q_SIGNALS: void changed(); }; diff --git a/src/designer/src/lib/sdk/abstractpromotioninterface.cpp b/src/designer/src/lib/sdk/abstractpromotioninterface.cpp index 9cedb069a..ab2406eff 100644 --- a/src/designer/src/lib/sdk/abstractpromotioninterface.cpp +++ b/src/designer/src/lib/sdk/abstractpromotioninterface.cpp @@ -81,28 +81,28 @@ QDesignerPromotionInterface::~QDesignerPromotionInterface() Returns a set of promoted classed that are referenced by the currently opened forms. */ -/*! +/*! \fn virtual bool QDesignerPromotionInterface::addPromotedClass(const QString &baseClass, const QString &className, const QString &includeFile, QString *errorMessage) Add a promoted class named \a with the base class \a and include file \a includeFile. Returns \c true on success or \c false along with an error message in \a errorMessage on failure. */ -/*! +/*! \fn virtual bool QDesignerPromotionInterface::removePromotedClass(const QString &className, QString *errorMessage) Remove the promoted class named \a className unless it is referenced by a form. Returns \c true on success or \c false along with an error message in \a errorMessage on failure. */ -/*! +/*! \fn virtual bool QDesignerPromotionInterface::changePromotedClassName(const QString &oldClassName, const QString &newClassName, QString *errorMessage) Change the class name of a promoted class from \a oldClassName to \a newClassName. Returns \c true on success or \c false along with an error message in \a errorMessage on failure. */ -/*! +/*! \fn virtual bool QDesignerPromotionInterface::setPromotedClassIncludeFile(const QString &className, const QString &includeFile, QString *errorMessage) Change the include file of a promoted class named \a className to be \a includeFile. Returns \c true on success or \c false along diff --git a/src/designer/src/lib/sdk/abstractwidgetdatabase.cpp b/src/designer/src/lib/sdk/abstractwidgetdatabase.cpp index 84818bb81..31d4ec7b1 100644 --- a/src/designer/src/lib/sdk/abstractwidgetdatabase.cpp +++ b/src/designer/src/lib/sdk/abstractwidgetdatabase.cpp @@ -99,9 +99,9 @@ int QDesignerWidgetDataBaseInterface::indexOf(QDesignerWidgetDataBaseItemInterfa */ void QDesignerWidgetDataBaseInterface::insert(int index, QDesignerWidgetDataBaseItemInterface *item) { - if (debugWidgetDataBase) - qDebug() << "insert at " << index << ' ' << item->name() << " derived from " << item->extends(); - + if (debugWidgetDataBase) + qDebug() << "insert at " << index << ' ' << item->name() << " derived from " << item->extends(); + m_items.insert(index, item); } @@ -109,7 +109,7 @@ void QDesignerWidgetDataBaseInterface::insert(int index, QDesignerWidgetDataBase */ void QDesignerWidgetDataBaseInterface::append(QDesignerWidgetDataBaseItemInterface *item) { - if (debugWidgetDataBase) + if (debugWidgetDataBase) qDebug() << "append " << item->name() << " derived from " << item->extends(); m_items.append(item); } diff --git a/src/designer/src/lib/shared/csshighlighter_p.h b/src/designer/src/lib/shared/csshighlighter_p.h index 2f0745d83..cf99d9d75 100644 --- a/src/designer/src/lib/shared/csshighlighter_p.h +++ b/src/designer/src/lib/shared/csshighlighter_p.h @@ -71,7 +71,7 @@ protected: void highlight(const QString&, int, int, int/*State*/); private: - enum State { Selector, Property, Value, Pseudo, Pseudo1, Pseudo2, Quote, + enum State { Selector, Property, Value, Pseudo, Pseudo1, Pseudo2, Quote, MaybeComment, Comment, MaybeCommentEnd }; }; diff --git a/src/designer/src/lib/shared/formwindowbase.cpp b/src/designer/src/lib/shared/formwindowbase.cpp index 4feda3f1e..315f7de90 100644 --- a/src/designer/src/lib/shared/formwindowbase.cpp +++ b/src/designer/src/lib/shared/formwindowbase.cpp @@ -47,7 +47,7 @@ #include "qdesigner_menu_p.h" #include "qdesigner_menubar_p.h" #include "shared_settings_p.h" -#include "grid_p.h" +#include "grid_p.h" #include "deviceprofile_p.h" #include "qdesigner_utils_p.h" #include "spacer_widget_p.h" diff --git a/src/designer/src/lib/shared/formwindowbase_p.h b/src/designer/src/lib/shared/formwindowbase_p.h index a75dca8c8..f42b6c775 100644 --- a/src/designer/src/lib/shared/formwindowbase_p.h +++ b/src/designer/src/lib/shared/formwindowbase_p.h @@ -185,7 +185,7 @@ private slots: private: void syncGridFeature(); - FormWindowBasePrivate *m_d; + FormWindowBasePrivate *m_d; }; } // namespace qdesigner_internal diff --git a/src/designer/src/lib/shared/metadatabase.cpp b/src/designer/src/lib/shared/metadatabase.cpp index 75e103fb2..a6b985163 100644 --- a/src/designer/src/lib/shared/metadatabase.cpp +++ b/src/designer/src/lib/shared/metadatabase.cpp @@ -227,7 +227,7 @@ QDESIGNER_SHARED_EXPORT bool promoteWidget(QDesignerFormEditorInterface *core,QW qDebug() << "WARNING: Recursive promotion of " << oldCustomClassName << " to " << customClassName << ". A plugin is missing."; } - item->setCustomClassName(customClassName); + item->setCustomClassName(customClassName); if (debugMetaDatabase) { qDebug() << "Promoting " << widget->metaObject()->className() << " to " << customClassName; } @@ -267,7 +267,7 @@ QDESIGNER_SHARED_EXPORT QString promotedCustomClassName(QDesignerFormEditorInter return QString(); return item->customClassName(); } - + QDESIGNER_SHARED_EXPORT QString promotedExtends(QDesignerFormEditorInterface *core, QWidget* widget) { const QString customClassName = promotedCustomClassName(core,widget); diff --git a/src/designer/src/lib/shared/metadatabase_p.h b/src/designer/src/lib/shared/metadatabase_p.h index f0361b501..5d1f1a14c 100644 --- a/src/designer/src/lib/shared/metadatabase_p.h +++ b/src/designer/src/lib/shared/metadatabase_p.h @@ -126,7 +126,7 @@ private: // promotion convenience QDESIGNER_SHARED_EXPORT bool promoteWidget(QDesignerFormEditorInterface *core,QWidget *widget,const QString &customClassName); - QDESIGNER_SHARED_EXPORT void demoteWidget(QDesignerFormEditorInterface *core,QWidget *widget); + QDESIGNER_SHARED_EXPORT void demoteWidget(QDesignerFormEditorInterface *core,QWidget *widget); QDESIGNER_SHARED_EXPORT bool isPromoted(QDesignerFormEditorInterface *core, QWidget* w); QDESIGNER_SHARED_EXPORT QString promotedCustomClassName(QDesignerFormEditorInterface *core, QWidget* w); QDESIGNER_SHARED_EXPORT QString promotedExtends(QDesignerFormEditorInterface *core, QWidget* w); diff --git a/src/designer/src/lib/shared/morphmenu.cpp b/src/designer/src/lib/shared/morphmenu.cpp index 8a4778418..25cbe6050 100644 --- a/src/designer/src/lib/shared/morphmenu.cpp +++ b/src/designer/src/lib/shared/morphmenu.cpp @@ -266,7 +266,7 @@ static void replaceWidgetListDynamicProperty(QWidget *parentWidget, } /* Morph a widget into another class. Use the static addMorphMacro() to - * add a respective command sequence to the undo stack as it emits signals + * add a respective command sequence to the undo stack as it emits signals * which cause other commands to be added. */ class MorphWidgetCommand : public QDesignerFormWindowCommand { diff --git a/src/designer/src/lib/shared/newactiondialog.cpp b/src/designer/src/lib/shared/newactiondialog.cpp index 1e77bfae1..27baddc0e 100644 --- a/src/designer/src/lib/shared/newactiondialog.cpp +++ b/src/designer/src/lib/shared/newactiondialog.cpp @@ -89,7 +89,7 @@ NewActionDialog::NewActionDialog(ActionEditor *parent) : m_actionEditor(parent) { m_ui->setupUi(this); - + m_ui->tooltipEditor->setTextPropertyValidationMode(ValidationRichText); connect(m_ui->toolTipToolButton, SIGNAL(clicked()), this, SLOT(slotEditToolTip())); diff --git a/src/designer/src/lib/shared/previewmanager.cpp b/src/designer/src/lib/shared/previewmanager.cpp index bb9349821..1cdad96e7 100644 --- a/src/designer/src/lib/shared/previewmanager.cpp +++ b/src/designer/src/lib/shared/previewmanager.cpp @@ -177,7 +177,7 @@ private slots: protected: // Fit the widget in case the orientation changes (transposing screensize) - virtual void fitWidget(const QSize &size); + virtual void fitWidget(const QSize &size); // Calculate the complete transformation for the skin // (base class implementation provides rotation). virtual QMatrix skinTransform() const; @@ -193,7 +193,7 @@ private: }; PreviewDeviceSkin::PreviewDeviceSkin(const DeviceSkinParameters ¶meters, QWidget *parent) : - DeviceSkin(parameters, parent), + DeviceSkin(parameters, parent), m_screenSize(parameters.screenSize()), m_direction(DirectionUp), m_directionUpAction(0), @@ -257,7 +257,7 @@ void PreviewDeviceSkin::slotPopupMenu() connect(directionGroup, SIGNAL(triggered(QAction*)), this, SLOT(slotDirection(QAction*))); directionGroup->setExclusive(true); m_directionUpAction = createCheckableActionIntData(tr("&Portrait"), DirectionUp, m_direction, directionGroup, this); - //: Rotate form preview counter-clockwise + //: Rotate form preview counter-clockwise m_directionLeftAction = createCheckableActionIntData(tr("Landscape (&CCW)"), DirectionLeft, m_direction, directionGroup, this); //: Rotate form preview clockwise m_directionRightAction = createCheckableActionIntData(tr("&Landscape (CW)"), DirectionRight, m_direction, directionGroup, this); @@ -299,7 +299,7 @@ void PreviewDeviceSkin::fitWidget(const QSize &size) QMatrix PreviewDeviceSkin::skinTransform() const { - QMatrix newTransform; + QMatrix newTransform; switch (m_direction) { case DirectionUp: break; @@ -352,7 +352,7 @@ signals: void zoomPercentChanged(int); protected: - virtual void populateContextMenu(QMenu *m); + virtual void populateContextMenu(QMenu *m); virtual QMatrix skinTransform() const; virtual void fitWidget(const QSize &size); @@ -389,7 +389,7 @@ static inline QSize scaleSize(int zoomPercent, const QSize &size) } void ZoomablePreviewDeviceSkin::setPreview(QWidget *formWidget) -{ +{ m_zoomWidget->setWidget(formWidget); m_zoomWidget->resize(scaleSize(zoomPercent(), screenSize())); } @@ -408,7 +408,7 @@ void ZoomablePreviewDeviceSkin::setZoomPercent(int zp) if (m_zoomMenu->zoom() != zp) m_zoomMenu->setZoom(zp); - QApplication::setOverrideCursor(Qt::WaitCursor); + QApplication::setOverrideCursor(Qt::WaitCursor); m_zoomWidget->setZoom(zp); setTransform(skinTransform()); QApplication::restoreOverrideCursor(); diff --git a/src/designer/src/lib/shared/qdesigner_propertysheet.cpp b/src/designer/src/lib/shared/qdesigner_propertysheet.cpp index 363e9253f..2d897b906 100644 --- a/src/designer/src/lib/shared/qdesigner_propertysheet.cpp +++ b/src/designer/src/lib/shared/qdesigner_propertysheet.cpp @@ -1476,7 +1476,7 @@ enum DesignableState { PropertyIsDesignable, PropertyNotDesignable }; static inline DesignableState designableState(const QDesignerMetaPropertyInterface *p, const QObject *object) -{ +{ if (p->attributes(object) & QDesignerMetaPropertyInterface::DesignableAttribute) return PropertyIsDesignable; return (p->attributes() & QDesignerMetaPropertyInterface::DesignableAttribute) ? diff --git a/src/designer/src/lib/shared/qdesigner_widgetitem.cpp b/src/designer/src/lib/shared/qdesigner_widgetitem.cpp index 2b576eab8..da10982b1 100644 --- a/src/designer/src/lib/shared/qdesigner_widgetitem.cpp +++ b/src/designer/src/lib/shared/qdesigner_widgetitem.cpp @@ -304,7 +304,7 @@ const QLayout *QDesignerWidgetItem::containingLayout() const return m_cachedContainingLayout; } -void QDesignerWidgetItem::layoutChanged() +void QDesignerWidgetItem::layoutChanged() { if (DebugWidgetItem) qDebug() << Q_FUNC_INFO; @@ -312,7 +312,7 @@ void QDesignerWidgetItem::layoutChanged() } bool QDesignerWidgetItem::eventFilter(QObject * /* watched */, QEvent *event) -{ +{ if (event->type() == QEvent::ParentChange) layoutChanged(); return false; diff --git a/src/designer/src/lib/shared/sheet_delegate.cpp b/src/designer/src/lib/shared/sheet_delegate.cpp index 8b71466d4..a9d0d1ca3 100644 --- a/src/designer/src/lib/shared/sheet_delegate.cpp +++ b/src/designer/src/lib/shared/sheet_delegate.cpp @@ -118,7 +118,7 @@ void SheetDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, // draw text QRect textrect = QRect(r.left() + i*2, r.top(), r.width() - ((5*i)/2), r.height()); - QString text = elidedText(option.fontMetrics, textrect.width(), Qt::ElideMiddle, + QString text = elidedText(option.fontMetrics, textrect.width(), Qt::ElideMiddle, model->data(index, Qt::DisplayRole).toString()); m_view->style()->drawItemText(painter, textrect, Qt::AlignCenter, option.palette, m_view->isEnabled(), text); diff --git a/src/designer/src/lib/shared/zoomwidget_p.h b/src/designer/src/lib/shared/zoomwidget_p.h index 8e3f8a9ed..3e6d0b01d 100644 --- a/src/designer/src/lib/shared/zoomwidget_p.h +++ b/src/designer/src/lib/shared/zoomwidget_p.h @@ -143,7 +143,7 @@ private: int m_zoom; qreal m_zoomFactor; - bool m_zoomContextMenuEnabled; + bool m_zoomContextMenuEnabled; bool m_resizeBlocked; ZoomMenu *m_zoomMenu; }; diff --git a/src/designer/src/lib/uilib/abstractformbuilder.cpp b/src/designer/src/lib/uilib/abstractformbuilder.cpp index 1849bd0d3..7dde47ca5 100644 --- a/src/designer/src/lib/uilib/abstractformbuilder.cpp +++ b/src/designer/src/lib/uilib/abstractformbuilder.cpp @@ -2455,7 +2455,7 @@ void QAbstractFormBuilder::loadListWidgetExtraInfo(DomWidget *ui_widget, QListWi loadItemPropsNFlags<QListWidgetItem>(this, item, properties); #else loadItemPropsNFlags(this, item, properties); -#endif +#endif } DomProperty *currentRow = propertyMap(ui_widget->elementProperty()).value(strings.currentRowProperty); diff --git a/src/designer/src/lib/uilib/customwidget.qdoc b/src/designer/src/lib/uilib/customwidget.qdoc index 2fab9868a..815a8ae00 100644 --- a/src/designer/src/lib/uilib/customwidget.qdoc +++ b/src/designer/src/lib/uilib/customwidget.qdoc @@ -64,7 +64,7 @@ \QD constructs instances of the custom widget by calling the plugin's createWidget() function with a suitable parent widget. Plugins must construct and return an instance of a custom widget with the specified - parent widget. + parent widget. Exporting your custom widget plugin to \QD using the Q_PLUGIN_METADATA() macro. For example, if a library called \c libcustomwidgetplugin.so diff --git a/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp b/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp index f2c12eb2d..6b03b4796 100644 --- a/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp +++ b/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp @@ -181,7 +181,7 @@ void QAxWidgetPropertySheet::reloadPropertySheet(const struct SavedProperties &p foundGeometry = true; continue; } - if (name == QLatin1String(controlPropertyName)) { + if (name == QLatin1String(controlPropertyName)) { sheet->setChanged(index, !i.value().toString().isEmpty()); continue; } diff --git a/src/linguist/lrelease/lrelease.1 b/src/linguist/lrelease/lrelease.1 index 0c4e66705..c73666edf 100644 --- a/src/linguist/lrelease/lrelease.1 +++ b/src/linguist/lrelease/lrelease.1 @@ -36,7 +36,7 @@ .\" .\" .\" $QT_END_LICENSE$ -.\" +.\" .SH NAME lrelease \- generate Qt message files from Qt Linguist translation files .SH SYNOPSIS diff --git a/src/linguist/lupdate/java.cpp b/src/linguist/lupdate/java.cpp index aad608e82..d09710a1b 100644 --- a/src/linguist/lupdate/java.cpp +++ b/src/linguist/lupdate/java.cpp @@ -305,11 +305,11 @@ static int getToken() if (yyCh == QLatin1Char('+')) { yyCh = getChar(); return Tok_PlusPlus; - } + } if( yyCh == QLatin1Char('=') ){ yyCh = getChar(); return Tok_PlusEq; - } + } return Tok_Plus; case '0': case '1': diff --git a/src/linguist/qdoc.conf b/src/linguist/qdoc.conf index 76ca7f212..ec0ba7a4f 100644 --- a/src/linguist/qdoc.conf +++ b/src/linguist/qdoc.conf @@ -1,15 +1,15 @@ -SOURCEDIRS = $QTDIR/tools/linguist/doc +SOURCEDIRS = $QTDIR/tools/linguist/doc DOCDIRS = $QTDIR/tools/linguist/doc EXAMPLEDIRS = $QTDIR/tools/linguist/tutorial -OUTPUTDIR = $QTDIR/tools/linguist/doc/html -BASE = file:$QTDIR/tools/linguist/doc/html/ +OUTPUTDIR = $QTDIR/tools/linguist/doc/html +BASE = file:$QTDIR/tools/linguist/doc/html/ COMPANY = Digia Plc and/or its subsidiary(-ies) -PRODUCT = Qt Linguist -VERSIONSYM = QT_VERSION_STR -DEFINE = QT_QDOC QT_.*_SUPPORT _WS_.*_ -FALSE = 0 1 -INTERNAL = no -STYLE = "h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; } +PRODUCT = Qt Linguist +VERSIONSYM = QT_VERSION_STR +DEFINE = QT_QDOC QT_.*_SUPPORT _WS_.*_ +FALSE = 0 1 +INTERNAL = no +STYLE = "h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; } a:link { color: #af4f00; text-decoration: none } a:visited { color: #8f2f00; text-decoration: none } body { background: #ffffff; color: black; }" diff --git a/src/linguist/shared/formats.pri b/src/linguist/shared/formats.pri index 985f6dbb8..e5f388f2a 100644 --- a/src/linguist/shared/formats.pri +++ b/src/linguist/shared/formats.pri @@ -19,4 +19,4 @@ SOURCES += \ $$PWD/qph.cpp \ $$PWD/po.cpp \ $$PWD/ts.cpp \ - $$PWD/xliff.cpp + $$PWD/xliff.cpp diff --git a/src/linguist/shared/simtexth.h b/src/linguist/shared/simtexth.h index d276cdf87..37dbd1380 100644 --- a/src/linguist/shared/simtexth.h +++ b/src/linguist/shared/simtexth.h @@ -55,7 +55,7 @@ struct Candidate { Candidate() {} Candidate(const QString& source0, const QString &target0) - : source(source0), target(target0) + : source(source0), target(target0) {} QString source; @@ -115,8 +115,8 @@ static inline int getSimilarityScore(const QString &str1, const QString &str2) } CandidateList similarTextHeuristicCandidates( const Translator *tor, - const QString &text, - int maxCandidates ); + const QString &text, + int maxCandidates ); QT_END_NAMESPACE diff --git a/src/linguist/shared/ts.dtd b/src/linguist/shared/ts.dtd index 83ba0a21b..f1c6d3d33 100644 --- a/src/linguist/shared/ts.dtd +++ b/src/linguist/shared/ts.dtd @@ -1,5 +1,5 @@ -<!-- - ! +<!-- + ! ! Some notes to the DTD: ! ! The location element is set as optional since it was introduced first in Qt 4.2. @@ -7,7 +7,7 @@ ! The vanished message type was introduced first in Qt 5.2. ! --> -<!-- +<!-- ! Macro used in order to escape byte entities not allowed in an xml document ! for instance, only #x9, #xA and #xD are allowed characters below #x20. --> @@ -72,7 +72,7 @@ ! For subsequent locations, it is the filename used for the previous location. ! A single TS file has either all absolute or all relative locations. --> -<!ATTLIST location +<!ATTLIST location filename CDATA #IMPLIED line CDATA #IMPLIED> <!ELEMENT source %evilstring;> diff --git a/src/macdeployqt/tests/tst_deployment_mac.cpp b/src/macdeployqt/tests/tst_deployment_mac.cpp index 0071ea245..f7d994cbe 100644 --- a/src/macdeployqt/tests/tst_deployment_mac.cpp +++ b/src/macdeployqt/tests/tst_deployment_mac.cpp @@ -55,10 +55,10 @@ void tst_deployment_mac::testParseOtoolLibraryLine() { { QString line = " /Users/foo/build/qt-4.4/lib/QtGui.framework/Versions/4/QtGui (compatibility version 4.4.0, current version 4.4.0)"; - FrameworkInfo info = parseOtoolLibraryLine(line); + FrameworkInfo info = parseOtoolLibraryLine(line); // qDebug() << info; - QCOMPARE(info.frameworkDirectory, QLatin1String("/Users/foo/build/qt-4.4/lib/")); - QCOMPARE(info.frameworkName, QLatin1String("QtGui.framework")); + QCOMPARE(info.frameworkDirectory, QLatin1String("/Users/foo/build/qt-4.4/lib/")); + QCOMPARE(info.frameworkName, QLatin1String("QtGui.framework")); QCOMPARE(info.frameworkPath, QLatin1String("/Users/foo/build/qt-4.4/lib/QtGui.framework")); QCOMPARE(info.binaryDirectory, QLatin1String("Versions/4")); QCOMPARE(info.binaryName, QLatin1String("QtGui")); @@ -71,10 +71,10 @@ void tst_deployment_mac::testParseOtoolLibraryLine() } { QString line = " /Users/foo/build/qt-4.4/lib/phonon.framework/Versions/4/phonon (compatibility version 4.1.0, current version 4.1.0)"; - FrameworkInfo info = parseOtoolLibraryLine(line); + FrameworkInfo info = parseOtoolLibraryLine(line); // qDebug() << info; - QCOMPARE(info.frameworkDirectory, QLatin1String("/Users/foo/build/qt-4.4/lib/")); - QCOMPARE(info.frameworkName, QLatin1String("phonon.framework")); + QCOMPARE(info.frameworkDirectory, QLatin1String("/Users/foo/build/qt-4.4/lib/")); + QCOMPARE(info.frameworkName, QLatin1String("phonon.framework")); QCOMPARE(info.frameworkPath, QLatin1String("/Users/foo/build/qt-4.4/lib/phonon.framework")); QCOMPARE(info.binaryDirectory, QLatin1String("Versions/4")); QCOMPARE(info.binaryName, QLatin1String("phonon")); @@ -88,10 +88,10 @@ void tst_deployment_mac::testParseOtoolLibraryLine() { QString line = " /usr/local/Qt-4.4.0/lib/phonon.framework/Versions/4/phonon (compatibility version 4.1.0, current version 4.1.0)"; - FrameworkInfo info = parseOtoolLibraryLine(line); + FrameworkInfo info = parseOtoolLibraryLine(line); // qDebug() << info; - QCOMPARE(info.frameworkDirectory, QLatin1String("/usr/local/Qt-4.4.0/lib/")); - QCOMPARE(info.frameworkName, QLatin1String("phonon.framework")); + QCOMPARE(info.frameworkDirectory, QLatin1String("/usr/local/Qt-4.4.0/lib/")); + QCOMPARE(info.frameworkName, QLatin1String("phonon.framework")); QCOMPARE(info.frameworkPath, QLatin1String("/usr/local/Qt-4.4.0/lib/phonon.framework")); QCOMPARE(info.binaryDirectory, QLatin1String("Versions/4")); QCOMPARE(info.binaryName, QLatin1String("phonon")); @@ -105,10 +105,10 @@ void tst_deployment_mac::testParseOtoolLibraryLine() { QString line = " QtGui.framework/Versions/4/QtGui (compatibility version 4.1.0, current version 4.1.0)"; - FrameworkInfo info = parseOtoolLibraryLine(line); + FrameworkInfo info = parseOtoolLibraryLine(line); // qDebug() << info; - QCOMPARE(info.frameworkDirectory, QLatin1String("/Library/Frameworks/")); - QCOMPARE(info.frameworkName, QLatin1String("QtGui.framework")); + QCOMPARE(info.frameworkDirectory, QLatin1String("/Library/Frameworks/")); + QCOMPARE(info.frameworkName, QLatin1String("QtGui.framework")); QCOMPARE(info.frameworkPath, QLatin1String("/Library/Frameworks/QtGui.framework")); QCOMPARE(info.binaryDirectory, QLatin1String("Versions/4")); QCOMPARE(info.binaryName, QLatin1String("QtGui")); @@ -122,10 +122,10 @@ void tst_deployment_mac::testParseOtoolLibraryLine() { QString line = " phonon.framework/Versions/4/QtGui (compatibility version 4.1.0, current version 4.1.0)"; - FrameworkInfo info = parseOtoolLibraryLine(line); + FrameworkInfo info = parseOtoolLibraryLine(line); // qDebug() << info; - QCOMPARE(info.frameworkDirectory, QLatin1String("/Library/Frameworks/")); - QCOMPARE(info.frameworkName, QLatin1String("phonon.framework")); + QCOMPARE(info.frameworkDirectory, QLatin1String("/Library/Frameworks/")); + QCOMPARE(info.frameworkName, QLatin1String("phonon.framework")); QCOMPARE(info.frameworkPath, QLatin1String("/Library/Frameworks/phonon.framework")); QCOMPARE(info.binaryDirectory, QLatin1String("Versions/4")); QCOMPARE(info.binaryName, QLatin1String("phonon")); @@ -139,11 +139,11 @@ void tst_deployment_mac::testParseOtoolLibraryLine() { QString line = " /Users/foo/build/qt-4.4/lib/libQtCLucene.4.dylib (compatibility version 4.4.0, current version 4.4.0)"; - FrameworkInfo info = parseOtoolLibraryLine(line); + FrameworkInfo info = parseOtoolLibraryLine(line); // qDebug() << info; - QCOMPARE(info.frameworkDirectory, QLatin1String("/Users/foo/build/qt-4.4/lib/")); + QCOMPARE(info.frameworkDirectory, QLatin1String("/Users/foo/build/qt-4.4/lib/")); QCOMPARE(info.binaryName, QLatin1String("libQtCLucene.4.dylib")); - QCOMPARE(info.frameworkName, QLatin1String("libQtCLucene.4.dylib")); + QCOMPARE(info.frameworkName, QLatin1String("libQtCLucene.4.dylib")); QCOMPARE(info.frameworkPath, QLatin1String("/Users/foo/build/qt-4.4/lib/libQtCLucene.4.dylib")); QCOMPARE(info.installName, QLatin1String("/Users/foo/build/qt-4.4/lib/libQtCLucene.4.dylib")); QCOMPARE(info.deployedInstallName, QLatin1String("@executable_path/../Frameworks/libQtCLucene.4.dylib")); @@ -154,9 +154,9 @@ void tst_deployment_mac::testParseOtoolLibraryLine() QString line = "libQtCLucene.4.dylib (compatibility version 4.4.0, current version 4.4.0)"; FrameworkInfo info = parseOtoolLibraryLine(line); // qDebug() << info; - QCOMPARE(info.frameworkDirectory, QLatin1String("/usr/lib/")); + QCOMPARE(info.frameworkDirectory, QLatin1String("/usr/lib/")); QCOMPARE(info.binaryName, QLatin1String("libQtCLucene.4.dylib")); - QCOMPARE(info.frameworkName, QLatin1String("libQtCLucene.4.dylib")); + QCOMPARE(info.frameworkName, QLatin1String("libQtCLucene.4.dylib")); QCOMPARE(info.frameworkPath, QLatin1String("/usr/lib/libQtCLucene.4.dylib")); QCOMPARE(info.installName, QLatin1String("libQtCLucene.4.dylib")); QCOMPARE(info.deployedInstallName, QLatin1String("@executable_path/../Frameworks/libQtCLucene.4.dylib")); @@ -166,7 +166,7 @@ void tst_deployment_mac::testParseOtoolLibraryLine() { QString line = "/foo"; //invalid FrameworkInfo info = parseOtoolLibraryLine(line); - QCOMPARE(info.frameworkName, QString()); + QCOMPARE(info.frameworkName, QString()); } } @@ -175,18 +175,18 @@ void tst_deployment_mac::testgetQtFrameworks() { { QStringList otool = QStringList() - << "/Users/foo/build/qt-4.4/lib/phonon.framework/Versions/4/phonon (compatibility version 4.1.0, current version 4.1.0)" - << "/Users/foo/build/qt-4.4/lib/QtGui.framework/Versions/4/QtGui (compatibility version 4.4.0, current version 4.4.0)" - << "/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 136.0.0)" - << "/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 949.27.0)" - << "/Users/foo/build/qt-4.4/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.4.0, current version 4.4.0)" - << "/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)" - << "/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.0.0)" - << "/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)" - << "/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)" + << "/Users/foo/build/qt-4.4/lib/phonon.framework/Versions/4/phonon (compatibility version 4.1.0, current version 4.1.0)" + << "/Users/foo/build/qt-4.4/lib/QtGui.framework/Versions/4/QtGui (compatibility version 4.4.0, current version 4.4.0)" + << "/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 136.0.0)" + << "/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 949.27.0)" + << "/Users/foo/build/qt-4.4/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.4.0, current version 4.4.0)" + << "/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)" + << "/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.0.0)" + << "/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)" + << "/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)" << " " ; - + QList<FrameworkInfo> frameworks = getQtFrameworks(otool); QCOMPARE(frameworks.count(), 3); QCOMPARE(frameworks.at(0).binaryName, QLatin1String("phonon")); @@ -196,18 +196,18 @@ void tst_deployment_mac::testgetQtFrameworks() { QStringList otool = QStringList() << "QtHelp.framework/Versions/4/QtHelp (compatibility version 4.4.0, current version 4.4.0)" - << "libQtCLucene.4.dylib (compatibility version 4.4.0, current version 4.4.0)" - << "QtSql.framework/Versions/4/QtSql (compatibility version 4.4.0, current version 4.4.0)" - << "QtXml.framework/Versions/4/QtXml (compatibility version 4.4.0, current version 4.4.0)" - << "QtGui.framework/Versions/4/QtGui (compatibility version 4.4.0, current version 4.4.0)" - << "/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 128.0.0)" - << "/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 824.42.0)" - << "QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.4.0, current version 4.4.0)" - << "QtCore.framework/Versions/4/QtCore (compatibility version 4.4.0, current version 4.4.0)" - << "/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)" - << "/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.6)" - << "/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)" - << "/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)" + << "libQtCLucene.4.dylib (compatibility version 4.4.0, current version 4.4.0)" + << "QtSql.framework/Versions/4/QtSql (compatibility version 4.4.0, current version 4.4.0)" + << "QtXml.framework/Versions/4/QtXml (compatibility version 4.4.0, current version 4.4.0)" + << "QtGui.framework/Versions/4/QtGui (compatibility version 4.4.0, current version 4.4.0)" + << "/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 128.0.0)" + << "/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 824.42.0)" + << "QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.4.0, current version 4.4.0)" + << "QtCore.framework/Versions/4/QtCore (compatibility version 4.4.0, current version 4.4.0)" + << "/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)" + << "/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.6)" + << "/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)" + << "/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)" ; QList<FrameworkInfo> frameworks = getQtFrameworks(otool); diff --git a/src/makeqpf/Blocks.txt b/src/makeqpf/Blocks.txt index 9cc87547f..ad8474bd5 100644 --- a/src/makeqpf/Blocks.txt +++ b/src/makeqpf/Blocks.txt @@ -17,13 +17,13 @@ # Note: When comparing block names, casing, whitespace, hyphens, # and underbars are ignored. # For example, "Latin Extended-A" and "latin extended a" are equivalent. -# For more information on the comparison of property values, +# For more information on the comparison of property values, # see UCD.html. # # All code points not explicitly listed for Block # have the value No_Block. -# Property: Block +# Property: Block # # @missing: 0000..10FFFF; No_Block diff --git a/src/makeqpf/qpf2.cpp b/src/makeqpf/qpf2.cpp index 3221dc8d6..06cc6a303 100644 --- a/src/makeqpf/qpf2.cpp +++ b/src/makeqpf/qpf2.cpp @@ -490,8 +490,8 @@ void QPF::addGlyphs(QFontEngine *fe, const QList<CharacterRange> &ranges) QByteArray glyphs; if (options & RenderGlyphs) { // this is only a rough estimation - glyphs.reserve(glyphCount - * (sizeof(QFontEngineQPF::Glyph) + glyphs.reserve(glyphCount + * (sizeof(QFontEngineQPF::Glyph) + qRound(fe->maxCharWidth() * (fe->ascent() + fe->descent()).toReal()))); QGlyphLayoutArray<10> layout; @@ -638,7 +638,7 @@ const uchar *QPF::dumpHeader(const uchar *data) { const QFontEngineQPF::Header *header = reinterpret_cast<const QFontEngineQPF::Header *>(data); qDebug() << "Header:"; - qDebug() << "magic =" + qDebug() << "magic =" << header->magic[0] << header->magic[1] << header->magic[2] diff --git a/src/qconfig/feature.cpp b/src/qconfig/feature.cpp index 8dc91d786..5f1b86056 100644 --- a/src/qconfig/feature.cpp +++ b/src/qconfig/feature.cpp @@ -74,7 +74,7 @@ void Feature::clear() static QString listToHtml(const QString &title, const QStringList &list) { if (list.isEmpty()) - return QString(); + return QString(); QString str; QTextStream stream(&str); @@ -82,7 +82,7 @@ static QString listToHtml(const QString &title, const QStringList &list) stream << "<h3>" << title << ":</h3>"; stream << "<ul>"; foreach (QString l, list) - stream << "<li>" << l << "</li>"; + stream << "<li>" << l << "</li>"; stream << "</ul>"; return str; @@ -131,13 +131,13 @@ QString Feature::toHtml() const const QString linkColor = QApplication::palette().color(QPalette::Link).name(); stream << "<h2><font size=\"+2\" color=\"" << linkColor << "\">" << key() << "</font></h2>" - << "<h2><font size=\"+2\">" << title() << "</font></h2>"; + << "<h2><font size=\"+2\">" << title() << "</font></h2>"; if (!description().isEmpty()) stream << "<p>" << description() << "</p>"; stream << listToHtml("Section", QStringList(section())) - << listToHtml("Requires", dependencies()) - << listToHtml("Required for", supports()) - << listToHtml("See also", relations()); + << listToHtml("Requires", dependencies()) + << listToHtml("Required for", supports()) + << listToHtml("See also", relations()); return linkify(str); } @@ -215,7 +215,7 @@ void Feature::setEnabled(bool on) d->enabled = on; foreach (Feature *f, supports()) - f->updateSelectable(); + f->updateSelectable(); emit changed(); } diff --git a/src/qconfig/feature.h b/src/qconfig/feature.h index 6da6d2fc2..c7374f949 100644 --- a/src/qconfig/feature.h +++ b/src/qconfig/feature.h @@ -56,8 +56,8 @@ class FeaturePrivate { public: FeaturePrivate(const QString &k) - : key(k), enabled(true), selectable(true) {}; - + : key(k), enabled(true), selectable(true) {}; + const QString key; QString section; QString title; @@ -71,7 +71,7 @@ public: class Feature : public QObject { - Q_OBJECT + Q_OBJECT public: static Feature* getInstance(const QString &key); @@ -86,36 +86,36 @@ public: void setSection(const QString §ion); QString section() const { return d->section; } - void setDescription(const QString &description); + void setDescription(const QString &description); QString description() const { return d->description; }; void addRelation(const QString &key); void setRelations(const QStringList &keys); - QList<Feature*> relations() const; + QList<Feature*> relations() const; void addDependency(const QString &dependency); void setDependencies(const QStringList &dependencies); QList<Feature*> dependencies() const; - QList<Feature*> supports() const; + QList<Feature*> supports() const; QString getDocumentation() const; void setEnabled(bool on); bool enabled() const { return d->enabled; }; bool selectable() const { return d->selectable; } - - QString toHtml() const; - - ~Feature(); + + QString toHtml() const; + + ~Feature(); signals: void changed(); - + private: Feature(const QString &key); void updateSelectable(); - + static QMap<QString, Feature*> instances; FeaturePrivate *d; }; diff --git a/src/qconfig/featuretreemodel.cpp b/src/qconfig/featuretreemodel.cpp index b9722655a..f24633316 100644 --- a/src/qconfig/featuretreemodel.cpp +++ b/src/qconfig/featuretreemodel.cpp @@ -71,11 +71,11 @@ Node::~Node() Node* Node::find(const Feature *f) const { if (this->feature == f) - return const_cast<Node*>(this); + return const_cast<Node*>(this); foreach (Node *n, children) - if (Node *m = n->find(f)) - return m; + if (Node *m = n->find(f)) + return m; return 0; } @@ -95,8 +95,8 @@ bool Node::insert(Node *n) Feature *f = const_cast<Feature*>(n->feature); if (feature->supports().contains(f)) { children.append(n); - qSort(children.begin(), children.end(), nodePtrLessThan); - n->parent = this; + qSort(children.begin(), children.end(), nodePtrLessThan); + n->parent = this; return true; } foreach (Node *child, children) @@ -118,8 +118,8 @@ FeatureTreeModel::FeatureTreeModel(QObject *parent) FeatureTreeModel::~FeatureTreeModel() { foreach (QString section, sections.keys()) - while (!sections[section].isEmpty()) - delete sections[section].takeFirst(); + while (!sections[section].isEmpty()) + delete sections[section].takeFirst(); } /* @@ -155,14 +155,14 @@ void FeatureTreeModel::addFeature(Feature *feature) // try insert any toplevel nodes as child of this one foreach (Node *n, sections[section]) - if (node->insert(n)) - sections[section].removeAll(n); + if (node->insert(n)) + sections[section].removeAll(n); // try insert this node as a child of any existing node foreach (Node *n, sections[section]) - if (n->insert(node)) { + if (n->insert(node)) { emit layoutChanged(); - return; + return; } // not a child, insert as a toplevel node @@ -172,13 +172,13 @@ void FeatureTreeModel::addFeature(Feature *feature) } QModelIndex FeatureTreeModel::createIndex(int row, int column, - const QModelIndex &parent, - const Node *node) const + const QModelIndex &parent, + const Node *node) const { QModelIndex index = QAbstractItemModel::createIndex(row, column, - (void*)node); + (void*)node); if (parent.isValid()) - parentMap[index] = parent; + parentMap[index] = parent; if (node) featureIndexMap[node->feature] = index; return index; @@ -190,25 +190,25 @@ QModelIndex FeatureTreeModel::index(int row, int column, if (!parent.isValid()) { // index is a section if (row < sections.size() && column == 0) return QAbstractItemModel::createIndex(row, column); - return QModelIndex(); + return QModelIndex(); } if (isSection(parent)) { // index is a toplevel feature const int parentRow = parent.row(); if (parentRow < sections.size()) { QString section = sections.keys().at(parentRow); - QList<Node*> nodes = sections[section]; + QList<Node*> nodes = sections[section]; if (row < nodes.size() && column < 2) return createIndex(row, column, parent, nodes.at(row)); } - return QModelIndex(); + return QModelIndex(); } // parent is a feature Node *parentNode = static_cast<Node*>(parent.internalPointer()); QList<Node*> children = parentNode->children; if (row < children.size() && column < 2) - return createIndex(row, column, parent, children.at(row)); + return createIndex(row, column, parent, children.at(row)); return QModelIndex(); } @@ -247,7 +247,7 @@ QModelIndex FeatureTreeModel::parent(const QModelIndex &index) const return QModelIndex(); if (parentMap.contains(index)) - return parentMap.value(index); + return parentMap.value(index); return QModelIndex(); } @@ -257,8 +257,8 @@ int FeatureTreeModel::rowCount(const QModelIndex &parent) const return sections.size(); if (isSection(parent)) { - const QString section = sections.keys().at(parent.row()); - return sections[section].size(); + const QString section = sections.keys().at(parent.row()); + return sections[section].size(); } const Node *node = static_cast<Node*>(parent.internalPointer()); @@ -286,36 +286,36 @@ QVariant FeatureTreeModel::data(const QModelIndex &index, int role) const const Node *node = static_cast<Node*>(index.internalPointer()); switch (role) { - case Qt::DisplayRole: { - if (node == 0) // index is a section - return sections.keys().at(index.row()); - if (index.column() == 0) - return node->feature->key(); - Q_ASSERT(index.column() == 1); - return node->feature->title(); - } - case Qt::CheckStateRole: { - if (node && index.column() == 0) - return (node->feature->enabled() ? - Qt::Checked : Qt::Unchecked); - break; - } - case Qt::TextColorRole: { - if (node && index.column() == 0) // feature key - if (node->feature->selectable()) - return QApplication::palette().color(QPalette::Link); - break; - } - case Qt::TextAlignmentRole: - case Qt::BackgroundColorRole: - case Qt::FontRole: - case Qt::ToolTipRole: // TODO - case Qt::StatusTipRole: // TODO - case Qt::WhatsThisRole: // TODO - case Qt::DecorationRole: - case Qt::EditRole: - default: - break; + case Qt::DisplayRole: { + if (node == 0) // index is a section + return sections.keys().at(index.row()); + if (index.column() == 0) + return node->feature->key(); + Q_ASSERT(index.column() == 1); + return node->feature->title(); + } + case Qt::CheckStateRole: { + if (node && index.column() == 0) + return (node->feature->enabled() ? + Qt::Checked : Qt::Unchecked); + break; + } + case Qt::TextColorRole: { + if (node && index.column() == 0) // feature key + if (node->feature->selectable()) + return QApplication::palette().color(QPalette::Link); + break; + } + case Qt::TextAlignmentRole: + case Qt::BackgroundColorRole: + case Qt::FontRole: + case Qt::ToolTipRole: // TODO + case Qt::StatusTipRole: // TODO + case Qt::WhatsThisRole: // TODO + case Qt::DecorationRole: + case Qt::EditRole: + default: + break; } return QVariant(); } @@ -345,20 +345,20 @@ bool FeatureTreeModel::setData(const QModelIndex &index, Qt::ItemFlags FeatureTreeModel::flags(const QModelIndex &index) const { if (!index.isValid() || index.internalPointer() == 0) - return Qt::ItemIsEnabled | Qt::ItemIsSelectable; + return Qt::ItemIsEnabled | Qt::ItemIsSelectable; const Node *node = static_cast<Node*>(index.internalPointer()); const Feature *feature = node->feature; Qt::ItemFlags flags = Qt::ItemIsUserCheckable | Qt::ItemIsSelectable; if (feature->selectable()) - flags |= Qt::ItemIsEnabled; + flags |= Qt::ItemIsEnabled; return flags; } QVariant FeatureTreeModel::headerData(int section, Qt::Orientation orientation, - int role) const + int role) const { if (orientation == Qt::Horizontal && role == Qt::DisplayRole) { if (section == 0) @@ -373,9 +373,9 @@ QVariant FeatureTreeModel::headerData(int section, Qt::Orientation orientation, Feature* FeatureTreeModel::getFeature(const QModelIndex &index) const { if (!index.isValid()) - return 0; + return 0; if (isSection(index)) - return 0; + return 0; Node *node = static_cast<Node*>(index.internalPointer()); return const_cast<Feature*>(node->feature); } @@ -396,7 +396,7 @@ void FeatureTreeModel::readConfig(QTextStream &stream) static QRegExp regexp("\\s*#\\s*define\\s+QT_NO_(\\S+)\\s*"); while (!stream.atEnd()) { - QString line = stream.readLine(); + QString line = stream.readLine(); if (regexp.exactMatch(line)) { Feature *f = Feature::getInstance(regexp.cap(1)); f->setEnabled(false); diff --git a/src/qconfig/featuretreemodel.h b/src/qconfig/featuretreemodel.h index 014d4412a..279d8222a 100644 --- a/src/qconfig/featuretreemodel.h +++ b/src/qconfig/featuretreemodel.h @@ -63,7 +63,7 @@ public: ~FeatureTreeModel(); void clear(); - + QVariant data(const QModelIndex &index, int role) const; bool setData(const QModelIndex &index, const QVariant &value, int role); Qt::ItemFlags flags(const QModelIndex &index) const; @@ -71,32 +71,32 @@ public: int role = Qt::DisplayRole) const; QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const; - QModelIndex index(const Feature *feature) const; + QModelIndex index(const Feature *feature) const; QModelIndex parent(const QModelIndex &index) const; int rowCount(const QModelIndex &parent = QModelIndex()) const; int columnCount(const QModelIndex &parent = QModelIndex()) const; - void addFeature(Feature *feature); + void addFeature(Feature *feature); Feature* getFeature(const QModelIndex &index) const; void readConfig(QTextStream &stream); void writeConfig(QTextStream &stream) const; - + public slots: void featureChanged(); - + private: QModelIndex createIndex(int row, int column, const QModelIndex &parent, - const Node *feature) const; + const Node *feature) const; QModelIndex index(const QModelIndex &parent, const Feature *feature) const; bool contains(const QString §ion, const Feature *f) const; Node* find(const QString §ion, const Feature *f) const; - QStringList findDisabled(const QModelIndex &parent) const; - + QStringList findDisabled(const QModelIndex &parent) const; + QMap<QString, QList<Node*> > sections; mutable QHash<QModelIndex, QModelIndex> parentMap; - mutable QHash<const Feature*, QModelIndex> featureIndexMap; + mutable QHash<const Feature*, QModelIndex> featureIndexMap; }; QT_END_NAMESPACE diff --git a/src/qconfig/main.cpp b/src/qconfig/main.cpp index 62b13cc51..7ee6f66f4 100644 --- a/src/qconfig/main.cpp +++ b/src/qconfig/main.cpp @@ -188,7 +188,7 @@ Main::Main() connect(textBrowser, SIGNAL(featureClicked(QString)), this, SLOT(showInfo(QString))); connect(featureTree, SIGNAL(activated(QModelIndex)), - this, SLOT(showInfo(QModelIndex))); + this, SLOT(showInfo(QModelIndex))); connect(featureModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(modelChanged())); connect(featureTree, SIGNAL(clicked(QModelIndex)), @@ -385,9 +385,9 @@ void Main::saveConfig() QFile file(configFile); if (!file.open(QIODevice::WriteOnly)) { - QMessageBox::warning(this,"Warning", + QMessageBox::warning(this,"Warning", "Cannot write to file " + configFile); - return; + return; } QTextStream stream(&file); @@ -403,12 +403,12 @@ void Main::saveConfig() void Main::loadConfig(const QString &filename) { if (!QFileInfo(filename).isFile()) - return; + return; QFile file(filename); if (!file.open(QIODevice::ReadOnly)) { - QMessageBox::warning(this,"Warning", "Cannot open file " + filename); - return; + QMessageBox::warning(this,"Warning", "Cannot open file " + filename); + return; } QTextStream stream(&file); @@ -428,8 +428,8 @@ void Main::loadFeatures(const QString &filename) QFile file(filename); if (!file.open(QIODevice::ReadOnly)) { - QMessageBox::warning(this,"Warning", "Cannot open file " + filename); - return; + QMessageBox::warning(this,"Warning", "Cannot open file " + filename); + return; } Feature *feature = 0; @@ -437,43 +437,43 @@ void Main::loadFeatures(const QString &filename) updateStatus(numFeatures); QTextStream s(&file); for (QString line = s.readLine(); !s.atEnd(); line = s.readLine()) { - line = line.simplified(); - if (line.isEmpty()) - continue; - if (line.startsWith('#')) - continue; - - int colon = line.indexOf(':'); - if (colon < 0) { // assume description + line = line.simplified(); + if (line.isEmpty()) + continue; + if (line.startsWith('#')) + continue; + + int colon = line.indexOf(':'); + if (colon < 0) { // assume description QString description = feature->description().simplified(); description += " " + line; feature->setDescription(description); - continue; - } + continue; + } - QString tag = line.left(colon); - QString value = line.mid(colon+1).simplified(); - if (tag == "Feature") { + QString tag = line.left(colon); + QString value = line.mid(colon+1).simplified(); + if (tag == "Feature") { if (feature) featureModel->addFeature(feature); feature = Feature::getInstance(value); updateStatus(++numFeatures); - } else if (tag == "Requires") { + } else if (tag == "Requires") { Q_ASSERT(feature); feature->setDependencies(value.split(' ', QString::SkipEmptyParts)); - } else if (tag == "Name") { - Q_ASSERT(feature); + } else if (tag == "Name") { + Q_ASSERT(feature); feature->setTitle(value); - } else if (tag == "Section") { - Q_ASSERT(feature); + } else if (tag == "Section") { + Q_ASSERT(feature); feature->setSection(value); - } else if (tag == "SeeAlso") { - Q_ASSERT(feature); + } else if (tag == "SeeAlso") { + Q_ASSERT(feature); feature->setRelations(value.split(' ', QString::SkipEmptyParts)); } else if (tag == "Description") { Q_ASSERT(feature); feature->setDescription(value); - } + } } if (feature) featureModel->addFeature(feature); @@ -492,7 +492,7 @@ void Main::showInfo(const QModelIndex &index) model = static_cast<FeatureTreeModel*>(featureTree->model()); if (const Feature *feature = model->getFeature(index)) - textBrowser->setHtml(feature->toHtml()); + textBrowser->setHtml(feature->toHtml()); // Ensure index is visible QModelIndex parent = model->parent(index); @@ -544,10 +544,10 @@ int main(int argc, char** argv) + "/src/corelib/global"; for (int i = 1; i < argc; ++i) { - QString arg = argv[i]; - if (arg == "-f" && i+1 < argc) + QString arg = argv[i]; + if (arg == "-f" && i+1 < argc) m.loadFeatures(argv[++i]); - else if (arg == "-c" && i+1 < argc) + else if (arg == "-c" && i+1 < argc) m.loadConfig(argv[++i]); } m.resize(m.sizeHint() + QSize(500,300)); diff --git a/src/qconfig/qconfig.pro b/src/qconfig/qconfig.pro index ad0edd726..aa64dde32 100644 --- a/src/qconfig/qconfig.pro +++ b/src/qconfig/qconfig.pro @@ -1,6 +1,6 @@ QT += widgets -HEADERS = feature.h featuretreemodel.h graphics.h -SOURCES = main.cpp feature.cpp featuretreemodel.cpp +HEADERS = feature.h featuretreemodel.h graphics.h +SOURCES = main.cpp feature.cpp featuretreemodel.cpp load(qt_app) diff --git a/src/qtconcurrent/codegenerator/example/main.cpp b/src/qtconcurrent/codegenerator/example/main.cpp index b1659dca1..4e69cec07 100644 --- a/src/qtconcurrent/codegenerator/example/main.cpp +++ b/src/qtconcurrent/codegenerator/example/main.cpp @@ -47,23 +47,23 @@ int main() // The code generator works on items. Each item has a generate() function: Item item(""); qDebug() << item.generate(); // produces "". - + // There are several Item subclasses. Text items contains a text string which they // reproduce when generate is called: Text text(" Hi there"); qDebug() << text.generate(); // produces " Hi there". - + // Items can be concatenated: Item sentence = text + Text(" Bye there") ; qDebug() << sentence.generate(); // produces "Hi there Bye there". - // (Internally, this creates a tree of items, and generate is called recursively + // (Internally, this creates a tree of items, and generate is called recursively // for items that have children.) // Repeater items repeat their content when generate is called: Repeater repeater = text; repeater.setRepeatCount(3); qDebug() << repeater.generate(); // produces "Hi there Hi there Hi there". - + // Counters evaluate to the current repeat index. Repeater repeater2 = text + Counter(); repeater2.setRepeatCount(3); diff --git a/src/qtconcurrent/codegenerator/src/codegenerator.cpp b/src/qtconcurrent/codegenerator/src/codegenerator.cpp index 82c1e6cba..87088c1f0 100644 --- a/src/qtconcurrent/codegenerator/src/codegenerator.cpp +++ b/src/qtconcurrent/codegenerator/src/codegenerator.cpp @@ -81,7 +81,7 @@ int BaseGenerator::repeatCount(GeneratorStack * const stack) const GroupGenerator const * const group = static_cast<GroupGenerator const * const>(generator); return group->currentRepeat; } break; -*/ +*/ default: break; } @@ -90,7 +90,7 @@ int BaseGenerator::repeatCount(GeneratorStack * const stack) const } QByteArray RepeaterGenerator::generate(GeneratorStack * const stack) -{ +{ GeneratorStacker stacker(stack, this); QByteArray generated; for (int i = repeatOffset; i < repeatCount + repeatOffset; ++i) { @@ -101,7 +101,7 @@ QByteArray RepeaterGenerator::generate(GeneratorStack * const stack) }; QByteArray GroupGenerator::generate(GeneratorStack * const stack) -{ +{ const int repeatCount = currentCount(stack); GeneratorStacker stacker(stack, this); QByteArray generated; @@ -134,7 +134,7 @@ const Compound operator+(const Item &a, const char * const text) const Compound operator+(const char * const text, const Item &b) { - return Compound(Text(text), b); + return Compound(Text(text), b); } }
\ No newline at end of file diff --git a/src/qtconcurrent/codegenerator/src/codegenerator.h b/src/qtconcurrent/codegenerator/src/codegenerator.h index 0f1bf23e9..02fe44d5c 100644 --- a/src/qtconcurrent/codegenerator/src/codegenerator.h +++ b/src/qtconcurrent/codegenerator/src/codegenerator.h @@ -51,7 +51,7 @@ namespace CodeGenerator enum GeneratorType {NoopType, CompoundType, TextType, RepeaterType, CounterType, GroupType}; class BaseGenerator; typedef QStack<BaseGenerator *> GeneratorStack; - + template <typename ValueType> class Stacker { public: @@ -61,7 +61,7 @@ namespace CodeGenerator QStack<ValueType> *stack; }; typedef Stacker<BaseGenerator *> GeneratorStacker; - + class BaseGenerator { public: @@ -70,7 +70,7 @@ namespace CodeGenerator virtual QByteArray generate(GeneratorStack *stack) { Q_UNUSED(stack); return QByteArray(); }; int currentCount(GeneratorStack *stack) const; int repeatCount(GeneratorStack *stack) const; - GeneratorType type; + GeneratorType type; }; class Item @@ -84,34 +84,34 @@ namespace CodeGenerator // QExplicitlySharedDataPointer<BaseGenerator> generator; BaseGenerator * const generator; }; - + class CompoundGenerator : public BaseGenerator { public: - CompoundGenerator(BaseGenerator * const a, BaseGenerator * const b) + CompoundGenerator(BaseGenerator * const a, BaseGenerator * const b) : BaseGenerator(CompoundType), a(a), b(b) {} virtual QByteArray generate(GeneratorStack *stack) { return a->generate(stack) + b->generate(stack); }; - protected: + protected: BaseGenerator * const a; BaseGenerator * const b; }; - + class Compound : public Item { public: Compound(const Item &a, const Item &b) : Item(new CompoundGenerator(a.generator, b.generator)) {} }; - + class TextGenerator : public BaseGenerator { public: TextGenerator(const QByteArray &text) : BaseGenerator(TextType), text(text) {} virtual QByteArray generate(GeneratorStack *) { return text; }; - protected: + protected: QByteArray text; }; - + class Text : public Item { public: Text(const QByteArray &text) : Item(new TextGenerator(text)) {} @@ -121,7 +121,7 @@ namespace CodeGenerator class RepeaterGenerator : public BaseGenerator { public: - RepeaterGenerator(BaseGenerator * const childGenerator) + RepeaterGenerator(BaseGenerator * const childGenerator) : BaseGenerator(RepeaterType), repeatCount(1), repeatOffset(0), childGenerator(childGenerator) {} virtual QByteArray generate(GeneratorStack *stack); @@ -130,22 +130,22 @@ namespace CodeGenerator int currentRepeat; BaseGenerator * const childGenerator; }; - + class Repeater : public Item { public: Repeater(const Item &item) : Item(new RepeaterGenerator(item.generator)) {} - void setRepeatCount(int count) + void setRepeatCount(int count) { static_cast<RepeaterGenerator * const>(generator)->repeatCount = count; } void setRepeatOffset(int offset) { static_cast<RepeaterGenerator * const>(generator)->repeatOffset = offset; } }; - + class CounterGenerator : public BaseGenerator { public: CounterGenerator() : BaseGenerator(CounterType), offset(0), increment(1), reverse(false) {} QByteArray generate(GeneratorStack *stack) - { + { if (reverse) return QByteArray::number(repeatCount(stack) - (currentCount(stack) * increment) + offset + 1); else @@ -155,7 +155,7 @@ namespace CodeGenerator int increment; bool reverse; }; - + class Counter : public Item { public: Counter() : Item(new CounterGenerator()) {} @@ -168,12 +168,12 @@ namespace CodeGenerator { static_cast<CounterGenerator *>(generator)->reverse = reverse; } }; - + class GroupGenerator : public BaseGenerator { public: GroupGenerator(BaseGenerator * const childGenerator) - : BaseGenerator(GroupType), currentRepeat(0), childGenerator(childGenerator), + : BaseGenerator(GroupType), currentRepeat(0), childGenerator(childGenerator), separator(new BaseGenerator()), prefix(new BaseGenerator()), postfix(new BaseGenerator()) { } virtual QByteArray generate(GeneratorStack *stack); int currentRepeat; @@ -182,20 +182,20 @@ namespace CodeGenerator BaseGenerator *prefix; BaseGenerator *postfix; }; - + class Group : public Item { public: Group(const Item &item) : Item(new GroupGenerator(item.generator)) { setSeparator(", "); } - void setSeparator(const Item &separator) + void setSeparator(const Item &separator) { static_cast<GroupGenerator *>(generator)->separator = separator.generator; } - void setPrefix(const Item &prefix) + void setPrefix(const Item &prefix) { static_cast<GroupGenerator *>(generator)->prefix = prefix.generator; } - void setPostfix(const Item &postfix) + void setPostfix(const Item &postfix) { static_cast<GroupGenerator *>(generator)->postfix = postfix.generator; } }; - const Compound operator+(const Item &a, const Item &b); + const Compound operator+(const Item &a, const Item &b); const Compound operator+(const Item &a, const char * const text); const Compound operator+(const char * const text, const Item &b); diff --git a/src/qtestlib/wince/cetcpsync/qtcesterconnection.cpp b/src/qtestlib/wince/cetcpsync/qtcesterconnection.cpp index 3ac32d359..d4072564c 100644 --- a/src/qtestlib/wince/cetcpsync/qtcesterconnection.cpp +++ b/src/qtestlib/wince/cetcpsync/qtcesterconnection.cpp @@ -91,12 +91,12 @@ bool QtCesterConnection::copyFileToDevice(const QString &localSource, const QStr qDebug() << "Could not open File!"; return false; } - + QTcpSocket* socket = 0; if (!_initCommand(socket, COMMAND_CREATE_FILE)) { END_ERROR(socket, "Could not initialized command"); } - + CreateFileOptions option; strcpy(option.fileName, qPrintable(deviceDest)); #ifdef Q_OS_WIN @@ -116,7 +116,7 @@ bool QtCesterConnection::copyFileToDevice(const QString &localSource, const QStr #endif option.fileSize = info.size(); option.overwriteExisting = !failIfExists; - + if (!_sendData(socket, (char*) &option, sizeof(option))) { END_ERROR(socket, "Could not send options..."); } @@ -124,7 +124,7 @@ bool QtCesterConnection::copyFileToDevice(const QString &localSource, const QStr if (!_checkResult(socket)) { END_ERROR(socket, "Server did not accept configuration"); } - + int bytesWritten = 0; const int bufferSize = 1024; QByteArray data; @@ -159,7 +159,7 @@ bool QtCesterConnection::copyDirectoryToDevice(const QString &localSource, const if (!info.exists() || !info.isDir()) { END_ERROR(socket, "Input directory invalid"); } - + createDirectory(deviceDest, true); QDir dir(localSource); QFileInfoList list = dir.entryInfoList(QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot); @@ -185,31 +185,31 @@ bool QtCesterConnection::copyFileFromDevice(const QString &deviceSource, const Q if (targetFile.exists() && failIfExists) { END_ERROR(socket, "Local file not supposed to be overwritten"); } - + if (!targetFile.open(QIODevice::WriteOnly | QIODevice::Truncate)) { END_ERROR(socket, "Could not open local file for writing"); } - + if (!_initCommand(socket, COMMAND_READ_FILE)) { END_ERROR(socket, "Could not establish connection"); } - + ReadFileOptions option; strcpy(option.fileName, qPrintable(deviceSource)); if (!_sendData(socket, (char*) &option, sizeof(option))) { END_ERROR(socket, "Could not send options"); } - + QByteArray data; if (!_receiveData(socket, data)) { END_ERROR(socket, "Did not receive any data"); } - + ReadFileReply* reply = (ReadFileReply*) data.data(); if (!reply->fileValid) { END_ERROR(socket, "Requested file invalid"); } - + int fileSize = reply->fileSize; int currentSize = 0; // ### TODO: make a little bit more error-prone @@ -219,12 +219,12 @@ bool QtCesterConnection::copyFileFromDevice(const QString &deviceSource, const Q currentSize += data.size(); targetFile.write(data); } while(currentSize < fileSize); - + _freeSocket(socket); targetFile.close(); return true; } - + bool QtCesterConnection::copyDirectoryFromDevice(const QString& /*deviceSource*/ , const QString& /*localDest*/ , bool /*recursive*/) @@ -240,7 +240,7 @@ bool QtCesterConnection::copyFile(const QString &srcFile, const QString &destFil if (!_initCommand(socket, COMMAND_COPY_FILE)) { END_ERROR(socket, "Could not establish connection for copy"); } - + CopyFileOptions option; strcpy(option.from, qPrintable(srcFile)); strcpy(option.to, qPrintable(destFile)); @@ -248,11 +248,11 @@ bool QtCesterConnection::copyFile(const QString &srcFile, const QString &destFil if (!_sendData(socket, (char*) &option, sizeof(option))) { END_ERROR(socket, "Could not send copy options"); } - + if (!_checkResult(socket)) { END_ERROR(socket, "Copy failed"); } - + _freeSocket(socket); return true; } @@ -264,7 +264,7 @@ bool QtCesterConnection::copyDirectory(const QString &srcDirectory, const QStrin if (!_initCommand(socket, COMMAND_COPY_DIRECTORY)) { END_ERROR(socket, "Could not establish connection for dir copy"); } - + CopyDirectoryOptions option; strcpy(option.from, qPrintable(srcDirectory)); strcpy(option.to, qPrintable(destDirectory)); @@ -272,11 +272,11 @@ bool QtCesterConnection::copyDirectory(const QString &srcDirectory, const QStrin if (!_sendData(socket, (char*) &option, sizeof(option))) { END_ERROR(socket, "Could not send dir copy options"); } - + if (!_checkResult(socket)) { END_ERROR(socket, "Dir Copy failed"); } - + _freeSocket(socket); return true; } @@ -287,18 +287,18 @@ bool QtCesterConnection::deleteFile(const QString &fileName) if (!_initCommand(socket, COMMAND_DELETE_FILE)) { END_ERROR(socket, "Could not establish connection for file deletion"); } - + DeleteFileOptions option; strcpy(option.fileName, qPrintable(fileName)); if (!_sendData(socket, (char*) &option, sizeof(option))) { END_ERROR(socket, "Could not send file options"); } - + if (!_checkResult(socket)) { //END_ERROR(socket, "File Deletion failed"); // This is actually not an error so ignore it. } - + _freeSocket(socket); return true; } @@ -309,7 +309,7 @@ bool QtCesterConnection::deleteDirectory(const QString &directory, bool recursiv if (!_initCommand(socket, COMMAND_DELETE_DIRECTORY)) { END_ERROR(socket, "Could not establish connection for dir deletion"); } - + DeleteDirectoryOptions option; strcpy(option.dirName, qPrintable(directory)); option.recursive = recursive; @@ -317,12 +317,12 @@ bool QtCesterConnection::deleteDirectory(const QString &directory, bool recursiv if (!_sendData(socket, (char*) &option, sizeof(option))) { END_ERROR(socket, "Could not send dir options"); } - + if (!_checkResult(socket)) { // we do not write an error as this will fail a lot on recursive. END_ERROR(socket, 0); } - + _freeSocket(socket); return true; } @@ -365,19 +365,19 @@ bool QtCesterConnection::execute(QString program, if (!_sendData(socket, COMMAND_SUCCESS, strlen(COMMAND_SUCCESS))) { END_ERROR(socket, "Could not trigger startup"); } - + const int waitTime = 60 * 60 * 1000; if (!socket->waitForReadyRead(waitTime)) { END_ERROR(socket, "Process timed out"); } - + QByteArray result = socket->readAll(); if (result != COMMAND_SUCCESS) { if (returnValue) *returnValue = -1; // just some at least END_ERROR(socket, "Application did not start or returned error"); } - + if (returnValue) *returnValue = 0; _freeSocket(socket); @@ -388,23 +388,23 @@ bool QtCesterConnection::createDirectory(const QString &path, bool deleteBefore) { if (deleteBefore) deleteDirectory(path, true, true); - + QTcpSocket* socket = 0; if (!_initCommand(socket, COMMAND_CREATE_DIRECTORY)) { END_ERROR(socket, "Could not establish connection for dir creation"); } - + CreateDirectoryOptions option; strcpy(option.dirName, qPrintable(path)); option.recursively = true; if (!_sendData(socket, (char*) &option, sizeof(option))) { END_ERROR(socket, "Could not send dir options"); } - + if (!_checkResult(socket)) { END_ERROR(socket, "Dir creation failed"); } - + _freeSocket(socket); return true; } @@ -413,29 +413,29 @@ bool QtCesterConnection::timeStampForLocalFileTime(FILETIME* fTime) const { if (!fTime) return false; - + FILETIME copyTime = *fTime; LocalFileTimeToFileTime(©Time, ©Time); - + QTcpSocket* socket = 0; if (!_initCommand(socket, COMMAND_TIME_STAMP)) { END_ERROR(socket, "Could not establish time stamp connection"); } - + if (!_sendData(socket, (char*) ©Time, sizeof(copyTime))) { END_ERROR(socket, "Could not send stamp time"); } - + QByteArray data; if (!_receiveData(socket, data)) { END_ERROR(socket, "Did not receive time stamp or connection interrupted"); } - + copyTime = *((FILETIME*)data.data()); if (copyTime.dwLowDateTime == -1 && copyTime.dwHighDateTime == -1) { END_ERROR(socket, "remote Time stamp failed!"); } - + *fTime = copyTime; _freeSocket(socket); return true; @@ -445,29 +445,29 @@ bool QtCesterConnection::fileCreationTime(const QString &fileName, FILETIME* dev { if (!deviceCreationTime) return false; - + QTcpSocket* socket = 0; if (!_initCommand(socket, COMMAND_FILE_TIME)) { END_ERROR(socket, "Could not establish connection for file time access"); } - + FileTimeOptions option; strcpy(option.fileName, qPrintable(fileName)); if (!_sendData(socket, (char*) &option, sizeof(option))) { END_ERROR(socket, "Could not send file time name"); } - + QByteArray data; if (!_receiveData(socket, data)) { END_ERROR(socket, "File Time request failed"); } - + FILETIME* resultTime = (FILETIME*) data.data(); if (resultTime->dwLowDateTime == -1 && resultTime->dwHighDateTime == -1) { END_ERROR(socket, 0); debugOutput("Could not access file time", 0); } - + *deviceCreationTime = *resultTime; _freeSocket(socket); return true; @@ -482,7 +482,7 @@ bool QtCesterConnection::_createSocket(QTcpSocket*& result) const exit(0); } sock->connectToHost(QHostAddress(QString(ipAddress)), 12145); - + if (!sock->waitForConnected()) { qDebug() << "connection timeout..."; result = NULL; @@ -514,8 +514,8 @@ bool QtCesterConnection::_initCommand(QTcpSocket*& sock, const char* command) co if (!_createSocket(socket)) { END_ERROR(socket, "Could not connect to server"); } - - if (!_sendData(socket, command, strlen(command)) || + + if (!_sendData(socket, command, strlen(command)) || !_checkResult(socket)) { END_ERROR(socket, "Cound not send command"); } diff --git a/src/qtestlib/wince/cetcpsync/remoteconnection.h b/src/qtestlib/wince/cetcpsync/remoteconnection.h index 4e3b736a2..88c16deec 100644 --- a/src/qtestlib/wince/cetcpsync/remoteconnection.h +++ b/src/qtestlib/wince/cetcpsync/remoteconnection.h @@ -64,7 +64,7 @@ public: // For "intelligent deployment" we need to investigate on filetimes on the device virtual bool timeStampForLocalFileTime(FILETIME*) const = 0; virtual bool fileCreationTime(const QString &fileName, FILETIME*) const = 0; - + // These functions only work on files existing on the device virtual bool copyFile(const QString&, const QString&, bool failIfExists = false) = 0; virtual bool copyDirectory(const QString&, const QString&, bool recursive = true) = 0; diff --git a/src/qtestlib/wince/cetcpsyncserver/commands.cpp b/src/qtestlib/wince/cetcpsyncserver/commands.cpp index c615122ec..a79ddbf5e 100644 --- a/src/qtestlib/wince/cetcpsyncserver/commands.cpp +++ b/src/qtestlib/wince/cetcpsyncserver/commands.cpp @@ -82,7 +82,7 @@ void AbstractCommand::commandFinished() debugOutput(1, "AbstractCommand::commandFinished()NOT SUPPOSED TO BE HERE"); } -void AbstractCommand::setSocket(QTcpSocket* socket) +void AbstractCommand::setSocket(QTcpSocket* socket) { debugOutput(0, "AbstractCommand::setSocket()"); Q_ASSERT(socket); @@ -91,9 +91,9 @@ void AbstractCommand::setSocket(QTcpSocket* socket) reportSuccess(); } -QTcpSocket* AbstractCommand::socket() -{ - return m_socket; +QTcpSocket* AbstractCommand::socket() +{ + return m_socket; } void AbstractCommand::_readData() @@ -158,7 +158,7 @@ void CreateFileCommand::dataReceived(QByteArray &data) m_file.close(); } } - + if (successful) reportSuccess(); else @@ -205,7 +205,7 @@ void CreateDirectoryCommand::dataReceived(QByteArray &data) success = dir.mkpath(options->dirName); else success = dir.mkdir(options->dirName); - + if (success) reportSuccess(); else @@ -246,7 +246,7 @@ void CopyFileCommand::dataReceived(QByteArray &data) if (success) if (!QFile::copy(options->from , options->to)) success = false; - + if (success) reportSuccess(); else @@ -423,7 +423,7 @@ ExecuteCommand::~ExecuteCommand() void ExecuteCommand::dataReceived(QByteArray &data) { debugOutput(0, "ExecuteCommand::dataReceived()"); - + if (m_argumentCount == 0) { ExecuteOptions* options = (ExecuteOptions*) data.data(); if (!QFileInfo(options->appName).exists()) { @@ -431,7 +431,7 @@ void ExecuteCommand::dataReceived(QByteArray &data) reportError(); return; } - + m_program = QLatin1String(options->appName); m_argumentCount = options->argumentsCount; m_waitFinished = options->waitForFinished; @@ -610,7 +610,7 @@ void FileTimeCommand::dataReceived(QByteArray &data) FILETIME resultTime; resultTime.dwLowDateTime = -1; resultTime.dwHighDateTime = -1; - + #ifdef Q_OS_WIN QString fileName = QLatin1String(option->fileName); HANDLE deviceHandle = CreateFile(fileName.utf16(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); @@ -653,10 +653,10 @@ void TimeStampCommand::dataReceived(QByteArray &data) FILETIME resultTime; resultTime.dwLowDateTime = -1; resultTime.dwHighDateTime = -1; - + #ifdef Q_OS_WIN FILETIME stampTime = *((FILETIME*)data.data()); - + QString tmpFile = QString::fromLatin1("\\qt_tmp_ftime_convert"); HANDLE remoteHandle = CreateFile(tmpFile.utf16(), GENERIC_WRITE, 0, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); if (remoteHandle != INVALID_HANDLE_VALUE) { diff --git a/src/qtestlib/wince/cetcpsyncserver/commands.h b/src/qtestlib/wince/cetcpsyncserver/commands.h index 3fd63eb7b..028945077 100644 --- a/src/qtestlib/wince/cetcpsyncserver/commands.h +++ b/src/qtestlib/wince/cetcpsyncserver/commands.h @@ -116,7 +116,7 @@ class CreateDirectoryCommand : public AbstractCommand public: CreateDirectoryCommand(); ~CreateDirectoryCommand(); - + public slots: void dataReceived(QByteArray&); void commandFinished(); @@ -130,7 +130,7 @@ class CopyFileCommand : public AbstractCommand public: CopyFileCommand(); ~CopyFileCommand(); - + public slots: void dataReceived(QByteArray&); void commandFinished(); diff --git a/src/qtestlib/wince/cetcpsyncserver/main.cpp b/src/qtestlib/wince/cetcpsyncserver/main.cpp index 8b55b5a36..867f0bc7a 100644 --- a/src/qtestlib/wince/cetcpsyncserver/main.cpp +++ b/src/qtestlib/wince/cetcpsyncserver/main.cpp @@ -55,7 +55,7 @@ void messageOutput(QtMsgType type, const QMessageLogContext &, const QString &ms int main(int argc, char **argv) { qInstallMessageHandler(messageOutput); - + QCoreApplication app(argc, argv); ConnectionManager manager; manager.init(); diff --git a/src/qtestlib/wince/cetest/deployment.cpp b/src/qtestlib/wince/cetest/deployment.cpp index bf10323f7..5aecefb2f 100644 --- a/src/qtestlib/wince/cetest/deployment.cpp +++ b/src/qtestlib/wince/cetest/deployment.cpp @@ -84,7 +84,7 @@ bool DeploymentHandler::deviceDeploy(const DeploymentList &deploymentList) copyList.append(deploymentList.at(i)); continue; } - + int res = CompareFileTime(&localCreationTime, &deviceCreationTime); if (res != 0) copyList.append(deploymentList.at(i)); @@ -253,7 +253,7 @@ void DeploymentHandler::initProjectDeploy(QMakeProject* project, DeploymentList if(dirstr.right(Option::dir_sep.length()) != Option::dir_sep) dirstr += Option::dir_sep; QFileInfo info(dirstr + filestr); - + static int addQMakeDeployCounter = 0; QStringList entryList = info.absoluteDir().entryList(QStringList() << info.fileName()); if (entryList.size() > 1) { @@ -270,7 +270,7 @@ void DeploymentHandler::initProjectDeploy(QMakeProject* project, DeploymentList } continue; } - + if (info.isDir()) { QDir additionalDir(dirstr + filestr); QStringList additionalEntries = additionalDir.entryList(QDir::NoDotAndDotDot | QDir::AllEntries | QDir::NoSymLinks); diff --git a/src/qtestlib/wince/cetest/main.cpp b/src/qtestlib/wince/cetest/main.cpp index 9ba218866..9b5219854 100644 --- a/src/qtestlib/wince/cetest/main.cpp +++ b/src/qtestlib/wince/cetest/main.cpp @@ -382,7 +382,7 @@ int main(int argc, char **argv) int retryCount = 21; while (--retryCount) { - if (!connection.connect()) + if (!connection.connect()) Sleep(SLEEP_RECONNECT); else break; diff --git a/src/qtestlib/wince/remotelib/commands.cpp b/src/qtestlib/wince/remotelib/commands.cpp index 181aaf028..dfd37a078 100644 --- a/src/qtestlib/wince/remotelib/commands.cpp +++ b/src/qtestlib/wince/remotelib/commands.cpp @@ -131,13 +131,13 @@ bool qRemoteExecute(const wchar_t* program, const wchar_t* arguments, int *retur \brief Reset the device. */ int qRemoteSoftReset(DWORD, BYTE*, DWORD*, BYTE**, IRAPIStream* stream) -{ - //POWER_STATE_ON On state - //POWER_STATE_OFF Off state - //POWER_STATE_CRITICAL Critical state - //POWER_STATE_BOOT Boot state - //POWER_STATE_IDLE Idle state - //POWER_STATE_SUSPEND Suspend state +{ + //POWER_STATE_ON On state + //POWER_STATE_OFF Off state + //POWER_STATE_CRITICAL Critical state + //POWER_STATE_BOOT Boot state + //POWER_STATE_IDLE Idle state + //POWER_STATE_SUSPEND Suspend state //POWER_STATE_RESET Reset state DWORD returnValue = SetSystemPowerState(0, POWER_STATE_RESET, POWER_FORCE); @@ -159,16 +159,16 @@ int qRemoteToggleUnattendedPowerMode(DWORD, BYTE*, DWORD*, BYTE**, IRAPIStream* if (S_OK != stream->Read(&toggleVal, sizeof(toggleVal), &bytesRead)) return -2; - //PPN_REEVALUATESTATE 0x0001 Reserved. Set dwData to zero (0). - //PPN_POWERCHANGE 0x0002 Reserved. Set dwData to zero (0). - //PPN_UNATTENDEDMODE 0x0003 Set dwData to TRUE or FALSE. + //PPN_REEVALUATESTATE 0x0001 Reserved. Set dwData to zero (0). + //PPN_POWERCHANGE 0x0002 Reserved. Set dwData to zero (0). + //PPN_UNATTENDEDMODE 0x0003 Set dwData to TRUE or FALSE. //PPN_SUSPENDKEYPRESSED or - //PPN_POWERBUTTONPRESSED 0x0004 Reserved. Set dwData to zero (0). - //PPN_SUSPENDKEYRELEASED 0x0005 Reserved. Set dwData to zero (0). - //PPN_APPBUTTONPRESSED 0x0006 Reserved. Set dwData to zero (0). - //PPN_OEMBASE Greater than or equal to 0x10000 + //PPN_POWERBUTTONPRESSED 0x0004 Reserved. Set dwData to zero (0). + //PPN_SUSPENDKEYRELEASED 0x0005 Reserved. Set dwData to zero (0). + //PPN_APPBUTTONPRESSED 0x0006 Reserved. Set dwData to zero (0). + //PPN_OEMBASE Greater than or equal to 0x10000 //You can define higher values, such as 0x10001, 0x10002, and so on. - // Reserved. Set dwData to zero (0). + // Reserved. Set dwData to zero (0). returnValue = PowerPolicyNotify(PPN_UNATTENDEDMODE, toggleVal); if (S_OK != stream->Write(&returnValue, sizeof(returnValue), &bytesRead)) @@ -192,16 +192,16 @@ int qRemotePowerButton(DWORD, BYTE*, DWORD*, BYTE**, IRAPIStream* stream) if (S_OK != stream->Read(&toggleVal, sizeof(toggleVal), &bytesRead)) return -2; - //PPN_REEVALUATESTATE 0x0001 Reserved. Set dwData to zero (0). - //PPN_POWERCHANGE 0x0002 Reserved. Set dwData to zero (0). - //PPN_UNATTENDEDMODE 0x0003 Set dwData to TRUE or FALSE. + //PPN_REEVALUATESTATE 0x0001 Reserved. Set dwData to zero (0). + //PPN_POWERCHANGE 0x0002 Reserved. Set dwData to zero (0). + //PPN_UNATTENDEDMODE 0x0003 Set dwData to TRUE or FALSE. //PPN_SUSPENDKEYPRESSED or - //PPN_POWERBUTTONPRESSED 0x0004 Reserved. Set dwData to zero (0). - //PPN_SUSPENDKEYRELEASED 0x0005 Reserved. Set dwData to zero (0). - //PPN_APPBUTTONPRESSED 0x0006 Reserved. Set dwData to zero (0). - //PPN_OEMBASE Greater than or equal to 0x10000 + //PPN_POWERBUTTONPRESSED 0x0004 Reserved. Set dwData to zero (0). + //PPN_SUSPENDKEYRELEASED 0x0005 Reserved. Set dwData to zero (0). + //PPN_APPBUTTONPRESSED 0x0006 Reserved. Set dwData to zero (0). + //PPN_OEMBASE Greater than or equal to 0x10000 //You can define higher values, such as 0x10001, 0x10002, and so on. - // Reserved. Set dwData to zero (0). + // Reserved. Set dwData to zero (0). returnValue = PowerPolicyNotify(PPN_SUSPENDKEYPRESSED, 0); if (S_OK != stream->Write(&returnValue, sizeof(returnValue), &bytesRead)) diff --git a/src/shared/deviceskin/deviceskin.cpp b/src/shared/deviceskin/deviceskin.cpp index 7677d515f..5e4ae43ec 100644 --- a/src/shared/deviceskin/deviceskin.cpp +++ b/src/shared/deviceskin/deviceskin.cpp @@ -99,14 +99,14 @@ QDebug &operator<<(QDebug &str, const DeviceSkinButtonArea &a) QDebug operator<<(QDebug str, const DeviceSkinParameters &p) { str << "Images " << p.skinImageUpFileName << ',' - << p.skinImageDownFileName<< ',' << p.skinImageClosedFileName - << ',' << p.skinCursorFileName <<"\nScreen: " << p.screenRect - << " back: " << p.backScreenRect << " closed: " << p.closedScreenRect - << " cursor: " << p.cursorHot << " Prefix: " << p.prefix - << " Joystick: " << p.joystick << " MouseHover" << p.hasMouseHover; + << p.skinImageDownFileName<< ',' << p.skinImageClosedFileName + << ',' << p.skinCursorFileName <<"\nScreen: " << p.screenRect + << " back: " << p.backScreenRect << " closed: " << p.closedScreenRect + << " cursor: " << p.cursorHot << " Prefix: " << p.prefix + << " Joystick: " << p.joystick << " MouseHover" << p.hasMouseHover; const int numAreas = p.buttonAreas.size(); for (int i = 0; i < numAreas; i++) - str << p.buttonAreas[i]; + str << p.buttonAreas[i]; return str; } @@ -151,7 +151,7 @@ bool DeviceSkinParameters::read(const QString &skinDirectory, ReadMode rm, QSt QTextStream ts(&f); const bool rc = read(ts, rm, errorMessage); if (!rc) - *errorMessage = DeviceSkin::tr("The skin configuration file '%1' could not be read: %2").arg(fn).arg(*errorMessage); + *errorMessage = DeviceSkin::tr("The skin configuration file '%1' could not be read: %2").arg(fn).arg(*errorMessage); return rc; } bool DeviceSkinParameters::read(QTextStream &ts, ReadMode rm, QString *errorMessage) @@ -329,10 +329,10 @@ bool DeviceSkinParameters::read(QTextStream &ts, ReadMode rm, QString *errorMess joystick = i; area.activeWhenClosed = closedAreas.contains(area.name) || area.keyCode == Qt::Key_Flip; // must be to work - area.toggleArea = toggleAreas.contains(area.name); - area.toggleActiveArea = toggleActiveAreas.contains(area.name); - if ( area.toggleArea ) - toggleAreaList += i; + area.toggleArea = toggleAreas.contains(area.name); + area.toggleActiveArea = toggleActiveAreas.contains(area.name); + if (area.toggleArea) + toggleAreaList += i; i++; } } @@ -342,7 +342,7 @@ bool DeviceSkinParameters::read(QTextStream &ts, ReadMode rm, QString *errorMess .arg(nareas).arg(i); } if (debugDeviceSkin) - qDebug() << *this; + qDebug() << *this; return true; } @@ -401,10 +401,10 @@ DeviceSkin::DeviceSkin(const DeviceSkinParameters ¶meters, QWidget *p ) : void DeviceSkin::skinKeyRepeat() { if ( m_view ) { - const DeviceSkinButtonArea &area = m_parameters.buttonAreas[buttonIndex]; - emit skinKeyReleaseEvent( area.keyCode,area.text, true ); - emit skinKeyPressEvent( area.keyCode, area.text, true ); - t_skinkey->start(key_repeat_period); + const DeviceSkinButtonArea &area = m_parameters.buttonAreas[buttonIndex]; + emit skinKeyReleaseEvent(area.keyCode,area.text, true); + emit skinKeyPressEvent(area.keyCode, area.text, true); + t_skinkey->start(key_repeat_period); } } @@ -412,16 +412,16 @@ void DeviceSkin::calcRegions() { const int numAreas = m_parameters.buttonAreas.size(); for (int i=0; i<numAreas; i++) { - QPolygon xa(m_parameters.buttonAreas[i].area.count()); - int n = m_parameters.buttonAreas[i].area.count(); - for (int p=0; p<n; p++) { - xa.setPoint(p,transform.map(m_parameters.buttonAreas[i].area[p])); - } - if ( n == 2 ) { - buttonRegions[i] = QRegion(xa.boundingRect()); - } else { - buttonRegions[i] = QRegion(xa); - } + QPolygon xa(m_parameters.buttonAreas[i].area.count()); + int n = m_parameters.buttonAreas[i].area.count(); + for (int p = 0; p < n; p++) { + xa.setPoint(p,transform.map(m_parameters.buttonAreas[i].area[p])); + } + if (n == 2) { + buttonRegions[i] = QRegion(xa.boundingRect()); + } else { + buttonRegions[i] = QRegion(xa); + } } } @@ -434,33 +434,33 @@ void DeviceSkin::loadImages() const bool hasClosedImage = !m_parameters.skinImageClosed.isNull(); if (hasClosedImage) - iclosed = m_parameters.skinImageClosed; + iclosed = m_parameters.skinImageClosed; QImage icurs; const bool hasCursorImage = !m_parameters.skinCursor.isNull(); if (hasCursorImage) - icurs = m_parameters.skinCursor; + icurs = m_parameters.skinCursor; if (!transform.isIdentity()) { - iup = iup.transformed(transform, Qt::SmoothTransformation); - idown = idown.transformed(transform, Qt::SmoothTransformation); - if (hasClosedImage) - iclosed = iclosed.transformed(transform, Qt::SmoothTransformation); - if (hasCursorImage) - icurs = icurs.transformed(transform, Qt::SmoothTransformation); + iup = iup.transformed(transform, Qt::SmoothTransformation); + idown = idown.transformed(transform, Qt::SmoothTransformation); + if (hasClosedImage) + iclosed = iclosed.transformed(transform, Qt::SmoothTransformation); + if (hasCursorImage) + icurs = icurs.transformed(transform, Qt::SmoothTransformation); } const Qt::ImageConversionFlags conv = Qt::ThresholdAlphaDither|Qt::AvoidDither; skinImageUp = QPixmap::fromImage(iup); skinImageDown = QPixmap::fromImage(idown, conv); if (hasClosedImage) - skinImageClosed = QPixmap::fromImage(iclosed, conv); + skinImageClosed = QPixmap::fromImage(iclosed, conv); if (hasCursorImage) - skinCursor = QPixmap::fromImage(icurs, conv); + skinCursor = QPixmap::fromImage(icurs, conv); setFixedSize( skinImageUp.size() ); if (!skinImageUp.mask()) - skinImageUp.setMask(skinImageUp.createHeuristicMask()); + skinImageUp.setMask(skinImageUp.createHeuristicMask()); if (!skinImageClosed.mask()) - skinImageClosed.setMask(skinImageClosed.createHeuristicMask()); + skinImageClosed.setMask(skinImageClosed.createHeuristicMask()); QWidget* parent = parentWidget(); parent->setMask( skinImageUp.mask() ); @@ -469,9 +469,9 @@ void DeviceSkin::loadImages() delete cursorw; cursorw = 0; if (hasCursorImage) { - cursorw = new qvfb_internal::CursorWindow(m_parameters.skinCursor, m_parameters.cursorHot, this); - if ( m_view ) - cursorw->setView(m_view); + cursorw = new qvfb_internal::CursorWindow(m_parameters.skinCursor, m_parameters.cursorHot, this); + if (m_view) + cursorw->setView(m_view); } } @@ -487,7 +487,7 @@ void DeviceSkin::setTransform( const QMatrix& wm ) loadImages(); if ( m_view ) { QPoint p = transform.map(QPolygon(m_parameters.screenRect)).boundingRect().topLeft(); - m_view->move(p); + m_view->move(p); } updateSecondaryScreen(); } @@ -524,7 +524,7 @@ void DeviceSkin::setView( QWidget *v ) m_view->setFocus(); m_view->move(transform.map(QPolygon(m_parameters.screenRect)).boundingRect().topLeft()); if ( cursorw ) - cursorw->setView(v); + cursorw->setView(v); } void DeviceSkin::setSecondaryView( QWidget *v ) @@ -537,9 +537,9 @@ void DeviceSkin::paintEvent( QPaintEvent *) { QPainter p( this ); if ( flipped_open ) { - p.drawPixmap( 0, 0, skinImageUp ); + p.drawPixmap(0, 0, skinImageUp); } else { - p.drawPixmap( 0, 0, skinImageClosed ); + p.drawPixmap(0, 0, skinImageClosed); } QList<int> toDraw; if ( buttonPressed == true ) { @@ -547,13 +547,13 @@ void DeviceSkin::paintEvent( QPaintEvent *) } foreach (int toggle, m_parameters.toggleAreaList) { const DeviceSkinButtonArea &ba = m_parameters.buttonAreas[toggle]; - if ( flipped_open || ba.activeWhenClosed ) { - if ( ba.toggleArea && ba.toggleActiveArea ) - toDraw += toggle; - } + if (flipped_open || ba.activeWhenClosed) { + if (ba.toggleArea && ba.toggleActiveArea) + toDraw += toggle; + } } foreach (int button, toDraw ) { - const DeviceSkinButtonArea &ba = m_parameters.buttonAreas[button]; + const DeviceSkinButtonArea &ba = m_parameters.buttonAreas[button]; const QRect r = buttonRegions[button].boundingRect(); if ( ba.area.count() > 2 ) p.setClipRegion(buttonRegions[button]); @@ -564,14 +564,14 @@ void DeviceSkin::paintEvent( QPaintEvent *) void DeviceSkin::mousePressEvent( QMouseEvent *e ) { if (e->button() == Qt::RightButton) { - emit popupMenu(); + emit popupMenu(); } else { - buttonPressed = false; + buttonPressed = false; - onjoyrelease = -1; - const int numAreas = m_parameters.buttonAreas.size(); + onjoyrelease = -1; + const int numAreas = m_parameters.buttonAreas.size(); for (int i = 0; i < numAreas ; i++) { - const DeviceSkinButtonArea &ba = m_parameters.buttonAreas[i]; + const DeviceSkinButtonArea &ba = m_parameters.buttonAreas[i]; if ( buttonRegions[i].contains( e->pos() ) ) { if ( flipped_open || ba.activeWhenClosed ) { if ( m_parameters.joystick == i ) { @@ -582,30 +582,30 @@ void DeviceSkin::mousePressEvent( QMouseEvent *e ) else startPress(i); break; - if (debugDeviceSkin)// Debug message to be sure we are clicking the right areas - qDebug()<< m_parameters.buttonAreas[i].name << " clicked"; + if (debugDeviceSkin)// Debug message to be sure we are clicking the right areas + qDebug()<< m_parameters.buttonAreas[i].name << " clicked"; } } } } - clickPos = e->pos(); -// This is handy for finding the areas to define rectangles for new skins - if (debugDeviceSkin) - qDebug()<< "Clicked in " << e->pos().x() << ',' << e->pos().y(); - clickPos = e->pos(); + clickPos = e->pos(); +// This is handy for finding the areas to define rectangles for new skins + if (debugDeviceSkin) + qDebug()<< "Clicked in " << e->pos().x() << ',' << e->pos().y(); + clickPos = e->pos(); } } void DeviceSkin::flip(bool open) { if ( flipped_open == open ) - return; + return; if ( open ) { - parent->setMask( skinImageUp.mask() ); - emit skinKeyReleaseEvent( Qt::Key(Qt::Key_Flip), QString(), false); + parent->setMask(skinImageUp.mask()); + emit skinKeyReleaseEvent(Qt::Key(Qt::Key_Flip), QString(), false); } else { - parent->setMask( skinImageClosed.mask() ); - emit skinKeyPressEvent( Qt::Key(Qt::Key_Flip), QString(), false); + parent->setMask(skinImageClosed.mask()); + emit skinKeyPressEvent(Qt::Key(Qt::Key_Flip), QString(), false); } flipped_open = open; updateSecondaryScreen(); @@ -617,21 +617,21 @@ void DeviceSkin::startPress(int i) buttonPressed = true; buttonIndex = i; if (m_view) { - const DeviceSkinButtonArea &ba = m_parameters.buttonAreas[buttonIndex]; - if ( ba.keyCode == Qt::Key_Flip ) { - flip(!flipped_open); - } else if ( ba.toggleArea ) { - bool active = !ba.toggleActiveArea; - const_cast<DeviceSkinButtonArea &>(ba).toggleActiveArea = active; - if ( active ) - emit skinKeyPressEvent( ba.keyCode, ba.text, false); - else - emit skinKeyReleaseEvent( ba.keyCode, ba.text, false); - } else { - emit skinKeyPressEvent( ba.keyCode, ba.text, false); - t_skinkey->start(key_repeat_delay); - } - repaint( buttonRegions[buttonIndex].boundingRect() ); + const DeviceSkinButtonArea &ba = m_parameters.buttonAreas[buttonIndex]; + if (ba.keyCode == Qt::Key_Flip) { + flip(!flipped_open); + } else if (ba.toggleArea) { + bool active = !ba.toggleActiveArea; + const_cast<DeviceSkinButtonArea &>(ba).toggleActiveArea = active; + if (active) + emit skinKeyPressEvent(ba.keyCode, ba.text, false); + else + emit skinKeyReleaseEvent(ba.keyCode, ba.text, false); + } else { + emit skinKeyPressEvent(ba.keyCode, ba.text, false); + t_skinkey->start(key_repeat_delay); + } + repaint(buttonRegions[buttonIndex].boundingRect()); } } @@ -639,7 +639,7 @@ void DeviceSkin::endPress() { const DeviceSkinButtonArea &ba = m_parameters.buttonAreas[buttonIndex]; if (m_view && ba.keyCode != Qt::Key_Flip && !ba.toggleArea ) - emit skinKeyReleaseEvent(ba.keyCode, ba.text, false ); + emit skinKeyReleaseEvent(ba.keyCode, ba.text, false); t_skinkey->stop(); buttonPressed = false; repaint( buttonRegions[buttonIndex].boundingRect() ); @@ -648,40 +648,40 @@ void DeviceSkin::endPress() void DeviceSkin::mouseMoveEvent( QMouseEvent *e ) { if ( e->buttons() & Qt::LeftButton ) { - const int joystick = m_parameters.joystick; - QPoint newpos = e->globalPos() - clickPos; - if ( joydown ) { - int k1=0, k2=0; - if ( newpos.x() < -joydistance ) { - k1 = joystick+1; - } else if ( newpos.x() > +joydistance ) { - k1 = joystick+3; - } - if ( newpos.y() < -joydistance ) { - k2 = joystick+2; - } else if ( newpos.y() > +joydistance ) { - k2 = joystick+4; - } - if ( k1 || k2 ) { - if ( !buttonPressed ) { - onjoyrelease = -1; - if ( k1 && k2 ) { - startPress(k2); - endPress(); - } - startPress(k1 ? k1 : k2); - } - } else if ( buttonPressed ) { - endPress(); - } - } else if ( buttonPressed == false ) { - parentpos = newpos; - if ( !t_parentmove->isActive() ) - t_parentmove->start(50); - } + const int joystick = m_parameters.joystick; + QPoint newpos = e->globalPos() - clickPos; + if (joydown) { + int k1=0, k2=0; + if (newpos.x() < -joydistance) { + k1 = joystick+1; + } else if (newpos.x() > +joydistance) { + k1 = joystick+3; + } + if (newpos.y() < -joydistance) { + k2 = joystick+2; + } else if (newpos.y() > +joydistance) { + k2 = joystick+4; + } + if (k1 || k2) { + if (!buttonPressed) { + onjoyrelease = -1; + if (k1 && k2) { + startPress(k2); + endPress(); + } + startPress(k1 ? k1 : k2); + } + } else if (buttonPressed) { + endPress(); + } + } else if (buttonPressed == false) { + parentpos = newpos; + if (!t_parentmove->isActive()) + t_parentmove->start(50); + } } if ( cursorw ) - cursorw->setPos(e->globalPos()); + cursorw->setPos(e->globalPos()); } void DeviceSkin::moveParent() @@ -692,13 +692,13 @@ void DeviceSkin::moveParent() void DeviceSkin::mouseReleaseEvent( QMouseEvent * ) { if ( buttonPressed ) - endPress(); + endPress(); if ( joydown ) { - joydown = false; - if ( onjoyrelease >= 0 ) { - startPress(onjoyrelease); - endPress(); - } + joydown = false; + if (onjoyrelease >= 0) { + startPress(onjoyrelease); + endPress(); + } } } @@ -729,36 +729,36 @@ bool CursorWindow::handleMouseEvent(QEvent *ev) bool handledEvent = false; static int inhere=0; if ( !inhere ) { - inhere++; - if ( m_view ) { - if ( ev->type() >= QEvent::MouseButtonPress && ev->type() <= QEvent::MouseMove ) { - QMouseEvent *e = (QMouseEvent*)ev; - QPoint gp = e->globalPos(); - QPoint vp = m_view->mapFromGlobal(gp); - QPoint sp = skin->mapFromGlobal(gp); - if ( e->type() == QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonDblClick ) { - if ( m_view->rect().contains(vp) ) - mouseRecipient = m_view; - else if ( skin->parentWidget()->geometry().contains(gp) ) - mouseRecipient = skin; - else - mouseRecipient = 0; - } - if ( mouseRecipient ) { - setPos(gp); - QMouseEvent me(e->type(),mouseRecipient==skin ? sp : vp,gp,e->button(),e->buttons(),e->modifiers()); - QApplication::sendEvent(mouseRecipient, &me); - } else if ( !skin->parentWidget()->geometry().contains(gp) ) { - hide(); - } else { - setPos(gp); - } - if ( e->type() == QEvent::MouseButtonRelease ) - mouseRecipient = 0; - handledEvent = true; - } - } - inhere--; + inhere++; + if (m_view) { + if (ev->type() >= QEvent::MouseButtonPress && ev->type() <= QEvent::MouseMove) { + QMouseEvent *e = (QMouseEvent*)ev; + QPoint gp = e->globalPos(); + QPoint vp = m_view->mapFromGlobal(gp); + QPoint sp = skin->mapFromGlobal(gp); + if (e->type() == QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonDblClick) { + if (m_view->rect().contains(vp)) + mouseRecipient = m_view; + else if (skin->parentWidget()->geometry().contains(gp)) + mouseRecipient = skin; + else + mouseRecipient = 0; + } + if (mouseRecipient) { + setPos(gp); + QMouseEvent me(e->type(),mouseRecipient==skin ? sp : vp,gp,e->button(),e->buttons(),e->modifiers()); + QApplication::sendEvent(mouseRecipient, &me); + } else if (!skin->parentWidget()->geometry().contains(gp)) { + hide(); + } else { + setPos(gp); + } + if (e->type() == QEvent::MouseButtonRelease) + mouseRecipient = 0; + handledEvent = true; + } + } + inhere--; } return handledEvent; } @@ -766,8 +766,8 @@ bool CursorWindow::handleMouseEvent(QEvent *ev) void CursorWindow::setView(QWidget* v) { if ( m_view ) { - m_view->removeEventFilter(this); - m_view->removeEventFilter(this); + m_view->removeEventFilter(this); + m_view->removeEventFilter(this); } m_view = v; m_view->installEventFilter(this); @@ -776,9 +776,10 @@ void CursorWindow::setView(QWidget* v) } CursorWindow::CursorWindow(const QImage &img, QPoint hot, QWidget* sk) - :QWidget(0), - m_view(0), skin(sk), - hotspot(hot) + : QWidget(0), + m_view(0), + skin(sk), + hotspot(hot) { setWindowFlags( Qt::FramelessWindowHint ); mouseRecipient = 0; @@ -789,22 +790,22 @@ CursorWindow::CursorWindow(const QImage &img, QPoint hot, QWidget* sk) QPixmap p; p = QPixmap::fromImage(img); if (!p.mask()) { - if ( img.hasAlphaChannel() ) { - QBitmap bm; - bm = QPixmap::fromImage(img.createAlphaMask()); - p.setMask( bm ); - } else { - QBitmap bm; - bm = QPixmap::fromImage(img.createHeuristicMask()); - p.setMask( bm ); - } + if (img.hasAlphaChannel()) { + QBitmap bm; + bm = QPixmap::fromImage(img.createAlphaMask()); + p.setMask(bm); + } else { + QBitmap bm; + bm = QPixmap::fromImage(img.createHeuristicMask()); + p.setMask(bm); + } } QPalette palette; palette.setBrush(backgroundRole(), QBrush(p)); setPalette(palette); setFixedSize( p.size() ); if ( !p.mask().isNull() ) - setMask( p.mask() ); + setMask(p.mask()); } void CursorWindow::setPos(QPoint p) @@ -828,8 +829,8 @@ int main(int argc,char *argv[]) DeviceSkinParameters params; QString errorMessage; if (!params.read(skinFile, DeviceSkinParameters::ReadAll, &errorMessage)) { - qWarning() << errorMessage; - return 1; + qWarning() << errorMessage; + return 1; } DeviceSkin ds(params, &mw); // View Dialog diff --git a/src/shared/deviceskin/deviceskin.h b/src/shared/deviceskin/deviceskin.h index 8fb237304..c32067d8a 100644 --- a/src/shared/deviceskin/deviceskin.h +++ b/src/shared/deviceskin/deviceskin.h @@ -60,7 +60,7 @@ class QTextStream; struct DeviceSkinButtonArea { DeviceSkinButtonArea(); QString name; - int keyCode; + int keyCode; QPolygon area; QString text; bool activeWhenClosed; diff --git a/src/shared/deviceskin/skins/ClamshellPhone.skin/ClamshellPhone.skin b/src/shared/deviceskin/skins/ClamshellPhone.skin/ClamshellPhone.skin index cb24a8e14..976d9e90a 100644 --- a/src/shared/deviceskin/skins/ClamshellPhone.skin/ClamshellPhone.skin +++ b/src/shared/deviceskin/skins/ClamshellPhone.skin/ClamshellPhone.skin @@ -19,12 +19,12 @@ HasMouseHover=false "*" 0x002a 39 515 110 552 "0" 0x0030 122 515 195 553 "#" 0x0023 207 516 280 553 -"Context1" 0x01100000 137 360 108 383 123 410 90 409 60 387 63 378 100 362 +"Context1" 0x01100000 137 360 108 383 123 410 90 409 60 387 63 378 100 362 "Back" 0x01000061 184 361 206 376 213 387 197 410 226 410 256 392 258 381 244 369 "Backspace" 0x01000003 68 563 113 587 -"Select" 0x01010000 160 391 172 390 181 386 184 381 180 377 173 373 165 372 155 372 145 375 138 378 136 382 138 387 147 390 -"Left" 0x1000012 141 390 136 385 136 381 143 375 132 371 120 380 121 393 129 401 -"Down" 0x1000015 143 389 130 402 162 412 191 404 175 390 -"Right" 0x1000014 186 370 176 375 184 382 182 387 175 390 190 404 201 396 202 375 -"Up" 0x1000013 133 370 143 374 176 374 185 370 169 362 149 362 +"Select" 0x01010000 160 391 172 390 181 386 184 381 180 377 173 373 165 372 155 372 145 375 138 378 136 382 138 387 147 390 +"Left" 0x1000012 141 390 136 385 136 381 143 375 132 371 120 380 121 393 129 401 +"Down" 0x1000015 143 389 130 402 162 412 191 404 175 390 +"Right" 0x1000014 186 370 176 375 184 382 182 387 175 390 190 404 201 396 202 375 +"Up" 0x1000013 133 370 143 374 176 374 185 370 169 362 149 362 "Flip" 0x01100006 98 325 225 353 diff --git a/src/shared/deviceskin/skins/S60-QVGA-Candybar.skin/S60-QVGA-Candybar.skin b/src/shared/deviceskin/skins/S60-QVGA-Candybar.skin/S60-QVGA-Candybar.skin index 4f8fe5dca..db16782b4 100644 --- a/src/shared/deviceskin/skins/S60-QVGA-Candybar.skin/S60-QVGA-Candybar.skin +++ b/src/shared/deviceskin/skins/S60-QVGA-Candybar.skin/S60-QVGA-Candybar.skin @@ -6,7 +6,7 @@ Areas=7 HasMouseHover=false -"Context1" 0x01100000 54 469 151 469 140 483 88 485 81 496 54 498 +"Context1" 0x01100000 54 469 151 469 140 483 88 485 81 496 54 498 "Back" 0x01000061 211 468 307 467 307 498 278 497 219 486 "Select" 0x01010000 165 491 196 522 "Left" 0x1000012 149 474 166 492 163 519 143 538 142 481 diff --git a/src/shared/deviceskin/skins/S60-nHD-Touchscreen.skin/S60-nHD-Touchscreen.skin b/src/shared/deviceskin/skins/S60-nHD-Touchscreen.skin/S60-nHD-Touchscreen.skin index ed25d0eac..bf5824e30 100644 --- a/src/shared/deviceskin/skins/S60-nHD-Touchscreen.skin/S60-nHD-Touchscreen.skin +++ b/src/shared/deviceskin/skins/S60-nHD-Touchscreen.skin/S60-nHD-Touchscreen.skin @@ -5,6 +5,6 @@ Screen=53 183 360 640 Areas=3 HasMouseHover=false -"Call" 0x01100004 76 874 171 899 +"Call" 0x01100004 76 874 171 899 "Hangup" 0x01100005 300 876 393 899 "Home" 0x1000010 174 878 298 899 diff --git a/src/shared/deviceskin/skins/SmartPhone2.skin/SmartPhone2.skin b/src/shared/deviceskin/skins/SmartPhone2.skin/SmartPhone2.skin index 16884bfb5..d644c6e9b 100644 --- a/src/shared/deviceskin/skins/SmartPhone2.skin/SmartPhone2.skin +++ b/src/shared/deviceskin/skins/SmartPhone2.skin/SmartPhone2.skin @@ -2,24 +2,24 @@ SmartPhone2.png SmartPhone2-pressed.png 90 107 176 220 21 -"Menu" 0x01100000 70 400 115 427 -"Backspace" 0x01000003 238 400 285 427 -"1" 0x0031 138 437 149 451 142 461 120 462 102 455 95 442 99 435 121 432 -"2" 0x0032 153 445 202 470 -"3" 0x0033 258 435 260 448 243 461 215 462 207 452 218 438 248 431 -"4" 0x0034 138 470 149 484 142 494 120 495 102 488 95 475 99 468 121 465 -"5" 0x0035 153 477 202 502 -"6" 0x0036 258 467 260 480 243 493 215 494 207 484 218 470 248 463 -"7" 0x0037 138 502 149 516 142 526 120 527 102 520 95 507 99 500 121 497 -"8" 0x0038 153 509 202 534 -"9" 0x0039 258 499 260 512 243 525 215 526 207 516 218 502 248 495 -"*" 0x002a 138 534 149 548 142 558 120 559 102 552 95 539 99 532 121 529 -"0" 0x0030 153 542 202 567 -"#" 0x0023 258 532 260 545 243 558 215 559 207 549 218 535 248 528 -"Yes" 0x01010001 91 343 141 393 -"No" 0x01010002 219 343 269 393 -"Select" 0x01010000 160 356 195 389 -"Left" 0x1000012 159 356 149 346 141 354 141 391 149 399 159 389 159 387 -"Down" 0x1000015 160 391 150 400 159 409 199 409 207 403 196 392 194 392 -"Right" 0x1000014 195 354 206 341 215 356 215 391 208 402 197 393 -"Up" 0x1000013 160 354 149 344 158 337 197 337 203 340 194 355 +"Menu" 0x01100000 70 400 115 427 +"Backspace" 0x01000003 238 400 285 427 +"1" 0x0031 138 437 149 451 142 461 120 462 102 455 95 442 99 435 121 432 +"2" 0x0032 153 445 202 470 +"3" 0x0033 258 435 260 448 243 461 215 462 207 452 218 438 248 431 +"4" 0x0034 138 470 149 484 142 494 120 495 102 488 95 475 99 468 121 465 +"5" 0x0035 153 477 202 502 +"6" 0x0036 258 467 260 480 243 493 215 494 207 484 218 470 248 463 +"7" 0x0037 138 502 149 516 142 526 120 527 102 520 95 507 99 500 121 497 +"8" 0x0038 153 509 202 534 +"9" 0x0039 258 499 260 512 243 525 215 526 207 516 218 502 248 495 +"*" 0x002a 138 534 149 548 142 558 120 559 102 552 95 539 99 532 121 529 +"0" 0x0030 153 542 202 567 +"#" 0x0023 258 532 260 545 243 558 215 559 207 549 218 535 248 528 +"Yes" 0x01010001 91 343 141 393 +"No" 0x01010002 219 343 269 393 +"Select" 0x01010000 160 356 195 389 +"Left" 0x1000012 159 356 149 346 141 354 141 391 149 399 159 389 159 387 +"Down" 0x1000015 160 391 150 400 159 409 199 409 207 403 196 392 194 392 +"Right" 0x1000014 195 354 206 341 215 356 215 391 208 402 197 393 +"Up" 0x1000013 160 354 149 344 158 337 197 337 203 340 194 355 diff --git a/src/shared/deviceskin/skins/TouchscreenPhone.skin/TouchscreenPhone.skin b/src/shared/deviceskin/skins/TouchscreenPhone.skin/TouchscreenPhone.skin index 24316a1b4..3525d0aa2 100644 --- a/src/shared/deviceskin/skins/TouchscreenPhone.skin/TouchscreenPhone.skin +++ b/src/shared/deviceskin/skins/TouchscreenPhone.skin/TouchscreenPhone.skin @@ -6,11 +6,11 @@ Areas=9 HasMouseHover=false "Context1" 0x01100000 145 321 134 333 132 361 134 374 110 343 109 318 -"Call" 0x01100004 88 395 130 439 +"Call" 0x01100004 88 395 130 439 "Hangup" 0x01100005 227 395 269 439 -"Back" 0x01000061 249 322 240 354 219 373 223 344 216 325 208 318 -"Left" 0x1000012 159 338 149 328 141 336 141 373 149 381 159 371 159 369 -"Down" 0x1000015 160 373 150 382 159 391 199 391 207 385 196 374 194 374 -"Right" 0x1000014 195 336 206 323 215 338 215 373 208 384 197 375 -"Up" 0x1000013 160 336 149 326 158 319 197 319 203 322 194 337 +"Back" 0x01000061 249 322 240 354 219 373 223 344 216 325 208 318 +"Left" 0x1000012 159 338 149 328 141 336 141 373 149 381 159 371 159 369 +"Down" 0x1000015 160 373 150 382 159 391 199 391 207 385 196 374 194 374 +"Right" 0x1000014 195 336 206 323 215 338 215 373 208 384 197 375 +"Up" 0x1000013 160 336 149 326 158 319 197 319 203 322 194 337 "Select" 0x01010000 160 338 195 371 diff --git a/src/shared/qtpropertybrowser/qtpropertybrowser.qrc b/src/shared/qtpropertybrowser/qtpropertybrowser.qrc index 03e9c5612..a7d37dd10 100644 --- a/src/shared/qtpropertybrowser/qtpropertybrowser.qrc +++ b/src/shared/qtpropertybrowser/qtpropertybrowser.qrc @@ -20,4 +20,4 @@ <file>images/cursor-whatsthis.png</file> </qresource> </RCC> - + diff --git a/src/shared/qtpropertybrowser/qtpropertybrowserutils.cpp b/src/shared/qtpropertybrowser/qtpropertybrowserutils.cpp index 2ceb0fef7..56c415651 100644 --- a/src/shared/qtpropertybrowser/qtpropertybrowserutils.cpp +++ b/src/shared/qtpropertybrowser/qtpropertybrowserutils.cpp @@ -223,7 +223,7 @@ QString QtPropertyBrowserUtils::timeFormat() { QLocale loc; // ShortFormat is missing seconds on UNIX. - return loc.timeFormat(QLocale::LongFormat); + return loc.timeFormat(QLocale::LongFormat); } QString QtPropertyBrowserUtils::dateTimeFormat() |