whitespace fixes
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>
Fri, 17 Jan 2014 19:14:07 +0000 (20:14 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 20 Jan 2014 12:10:57 +0000 (13:10 +0100)
remove trailing spaces & expand tabs

Change-Id: If9909c94b52d9dacb7c8735470525d18a1c97d6b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
148 files changed:
examples/assistant/remotecontrol/remotecontrol.cpp
examples/assistant/remotecontrol/remotecontrol.h
examples/assistant/simpletextviewer/assistant.cpp
examples/assistant/simpletextviewer/assistant.h
examples/assistant/simpletextviewer/documentation/browse.html
examples/assistant/simpletextviewer/documentation/filedialog.html
examples/assistant/simpletextviewer/documentation/findfile.html
examples/assistant/simpletextviewer/documentation/index.html
examples/assistant/simpletextviewer/documentation/intro.html
examples/assistant/simpletextviewer/documentation/openfile.html
examples/assistant/simpletextviewer/documentation/wildcardmatching.html
examples/assistant/simpletextviewer/findfiledialog.cpp
examples/assistant/simpletextviewer/mainwindow.cpp
examples/designer/containerextension/containerextension.pro
examples/designer/containerextension/multipagewidget.h
examples/designer/designer.pro
examples/help/contextsensitivehelp/helpbrowser.cpp
examples/help/contextsensitivehelp/main.cpp
examples/help/contextsensitivehelp/wateringconfigdialog.h
examples/uitools/multipleinheritance/multipleinheritance.pro
examples/uitools/textfinder/forms/input.txt
examples/uitools/textfinder/textfinder.cpp
examples/uitools/textfinder/textfinder.h
examples/uitools/textfinder/textfinder.pro
src/assistant/assistant.pro
src/assistant/assistant/aboutdialog.h
src/assistant/assistant/contentwindow.cpp
src/assistant/assistant/helpenginewrapper.h
src/assistant/assistant/indexwindow.cpp
src/assistant/assistant/preferencesdialog.h
src/assistant/assistant/remotecontrol_win.h
src/assistant/clucene/clucene.pro
src/assistant/clucene/license.txt
src/assistant/clucene/qanalyzer.cpp
src/assistant/clucene/qanalyzer_p.h
src/assistant/clucene/qclucene_global_p.h
src/assistant/clucene/qdocument.cpp
src/assistant/clucene/qfield.cpp
src/assistant/clucene/qfield_p.h
src/assistant/clucene/qhits_p.h
src/assistant/clucene/qindexreader.cpp
src/assistant/clucene/qindexreader_p.h
src/assistant/clucene/qindexwriter.cpp
src/assistant/clucene/qindexwriter_p.h
src/assistant/clucene/qquery.cpp
src/assistant/clucene/qquery_p.h
src/assistant/clucene/qqueryparser.cpp
src/assistant/clucene/qqueryparser_p.h
src/assistant/clucene/qsearchable_p.h
src/assistant/clucene/qterm_p.h
src/assistant/clucene/qtoken.cpp
src/assistant/clucene/qtoken_p.h
src/assistant/clucene/qtokenizer.cpp
src/assistant/clucene/qtokenstream.cpp
src/assistant/help/qhelpcollectionhandler_p.h
src/assistant/help/qhelpdatainterface.cpp
src/assistant/help/qhelpdatainterface_p.h
src/assistant/help/qhelpdbreader.cpp
src/assistant/help/qhelpdbreader_p.h
src/assistant/help/qhelpenginecore.h
src/assistant/help/qhelpsearchindexwriter_default.cpp
src/assistant/qhelpconverter/conversionwizard.h
src/assistant/qhelpconverter/doc/filterpage.html
src/assistant/qhelpconverter/doc/identifierpage.html
src/assistant/qhelpconverter/finishpage.h
src/assistant/qhelpconverter/identifierpage.cpp
src/assistant/qhelpconverter/identifierpage.h
src/assistant/qhelpconverter/inputpage.h
src/assistant/qhelpconverter/main.cpp
src/assistant/qhelpconverter/outputpage.cpp
src/assistant/qhelpconverter/pathpage.h
src/assistant/qhelpconverter/qhcpwriter.cpp
src/assistant/qhelpconverter/qhpwriter.h
src/assistant/shared/helpgenerator.h
src/designer/data/generate_header.xsl
src/designer/data/ui3.xsd
src/designer/src/components/formeditor/formwindowcursor.cpp
src/designer/src/components/formeditor/formwindowmanager.cpp
src/designer/src/components/formeditor/formwindowsettings.h
src/designer/src/components/formeditor/qmainwindow_container.cpp
src/designer/src/components/objectinspector/objectinspector.cpp
src/designer/src/components/propertyeditor/paletteeditor.cpp
src/designer/src/components/propertyeditor/previewframe.h
src/designer/src/components/taskmenu/menutaskmenu.h
src/designer/src/designer/appfontdialog.h
src/designer/src/designer/newform.cpp
src/designer/src/designer/qdesigner_server.cpp
src/designer/src/lib/sdk/abstractmetadatabase.cpp
src/designer/src/lib/sdk/abstractmetadatabase.h
src/designer/src/lib/sdk/abstractpromotioninterface.cpp
src/designer/src/lib/sdk/abstractwidgetdatabase.cpp
src/designer/src/lib/shared/csshighlighter_p.h
src/designer/src/lib/shared/formwindowbase.cpp
src/designer/src/lib/shared/formwindowbase_p.h
src/designer/src/lib/shared/metadatabase.cpp
src/designer/src/lib/shared/metadatabase_p.h
src/designer/src/lib/shared/morphmenu.cpp
src/designer/src/lib/shared/newactiondialog.cpp
src/designer/src/lib/shared/previewmanager.cpp
src/designer/src/lib/shared/qdesigner_propertysheet.cpp
src/designer/src/lib/shared/qdesigner_widgetitem.cpp
src/designer/src/lib/shared/sheet_delegate.cpp
src/designer/src/lib/shared/zoomwidget_p.h
src/designer/src/lib/uilib/abstractformbuilder.cpp
src/designer/src/lib/uilib/customwidget.qdoc
src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp
src/linguist/lrelease/lrelease.1
src/linguist/lupdate/java.cpp
src/linguist/qdoc.conf
src/linguist/shared/formats.pri
src/linguist/shared/simtexth.h
src/linguist/shared/ts.dtd
src/macdeployqt/tests/tst_deployment_mac.cpp
src/makeqpf/Blocks.txt
src/makeqpf/qpf2.cpp
src/qconfig/feature.cpp
src/qconfig/feature.h
src/qconfig/featuretreemodel.cpp
src/qconfig/featuretreemodel.h
src/qconfig/main.cpp
src/qconfig/qconfig.pro
src/qtconcurrent/codegenerator/example/main.cpp
src/qtconcurrent/codegenerator/src/codegenerator.cpp
src/qtconcurrent/codegenerator/src/codegenerator.h
src/qtestlib/wince/cetcpsync/qtcesterconnection.cpp
src/qtestlib/wince/cetcpsync/remoteconnection.h
src/qtestlib/wince/cetcpsyncserver/commands.cpp
src/qtestlib/wince/cetcpsyncserver/commands.h
src/qtestlib/wince/cetcpsyncserver/main.cpp
src/qtestlib/wince/cetest/deployment.cpp
src/qtestlib/wince/cetest/main.cpp
src/qtestlib/wince/remotelib/commands.cpp
src/shared/deviceskin/deviceskin.cpp
src/shared/deviceskin/deviceskin.h
src/shared/deviceskin/skins/ClamshellPhone.skin/ClamshellPhone.skin
src/shared/deviceskin/skins/S60-QVGA-Candybar.skin/S60-QVGA-Candybar.skin
src/shared/deviceskin/skins/S60-nHD-Touchscreen.skin/S60-nHD-Touchscreen.skin
src/shared/deviceskin/skins/SmartPhone2.skin/SmartPhone2.skin
src/shared/deviceskin/skins/TouchscreenPhone.skin/TouchscreenPhone.skin
src/shared/qtpropertybrowser/qtpropertybrowser.qrc
src/shared/qtpropertybrowser/qtpropertybrowserutils.cpp
tests/auto/qhelpcontentmodel/qhelpcontentmodel.pro
tests/auto/qhelpenginecore/qhelpenginecore.pro
tests/auto/qhelpgenerator/data/test.qhp
tests/auto/qhelpprojectdata/data/test.qhp
tests/manual/uiloader/README.TXT
tests/manual/uiloader/uiloader/tst_uiloader.cpp
tests/manual/uiloader/uiloader/uiloader.h

index 772ea75..1e7222c 100644 (file)
@@ -112,7 +112,7 @@ void RemoteControl::on_launchButton_clicked()
     if (!ui.startUrlLineEdit->text().isEmpty())
         sendCommand(QLatin1String("SetSource ")
             + ui.startUrlLineEdit->text());
-        
+
     ui.launchButton->setEnabled(false);
     ui.startUrlLineEdit->setEnabled(false);
     ui.actionGroupBox->setEnabled(true);
index 4f40db2..b2ebc3a 100644 (file)
@@ -55,11 +55,11 @@ class RemoteControl : public QMainWindow
 public:
     RemoteControl(QWidget *parent = 0, Qt::WindowFlags flags = 0);
     ~RemoteControl();
-    
+
 private:
     Ui::RemoteControlClass ui;
     QProcess *process;
-    
+
 private slots:
     void on_launchButton_clicked();
     void on_actionQuit_triggered();
index c3740d6..1638560 100644 (file)
@@ -71,7 +71,7 @@ void Assistant::showDocumentation(const QString &page)
 
     QByteArray ba("SetSource ");
     ba.append("qthelp://org.qt-project.examples.simpletextviewer/doc/");
-    
+
     proc->write(ba + page.toLocal8Bit() + '\n');
 }
 //! [1]
@@ -87,7 +87,7 @@ bool Assistant::startAssistant()
 #if !defined(Q_OS_MAC)
         app += QLatin1String("assistant");
 #else
-        app += QLatin1String("Assistant.app/Contents/MacOS/Assistant");    
+        app += QLatin1String("Assistant.app/Contents/MacOS/Assistant");
 #endif
 
         QStringList args;
@@ -102,7 +102,7 @@ bool Assistant::startAssistant()
             QMessageBox::critical(0, QObject::tr("Simple Text Viewer"),
                 QObject::tr("Unable to launch Qt Assistant (%1)").arg(app));
             return false;
-        }    
+        }
     }
     return true;
 }
index eb9e0c2..8a24294 100644 (file)
@@ -53,7 +53,7 @@ public:
     Assistant();
     ~Assistant();
     void showDocumentation(const QString &file);
-    
+
 private:
     bool startAssistant();
     QProcess *proc;
index 987abf3..47e09f5 100644 (file)
@@ -1,16 +1,16 @@
 <html>
     <head>
-       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-       <title>Browse</title>
+        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+        <title>Browse</title>
     </head>
     <body style="font-size:12pt;font-family:helvetica">
-       
+
         <p><center><h2>Browse</h2></center></p>
+
         <p>
         The file dialog let you browse the current file system to
         specify the directory in which the file you want to open
-        resides. 
+        resides.
         Note that only the specified directory will be searched, any
         subdirectories will simply be ignored.
         </p>
index afa65ed..6ebf403 100644 (file)
@@ -1,17 +1,17 @@
 <html>
     <head>
-       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-       <title>File Dialog</title>
+        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+        <title>File Dialog</title>
     </head>
     <body style="font-size:12pt;font-family:helvetica">
 
-       <p><center><h2>File Dialog</h2></center></p>
+        <p><center><h2>File Dialog</h2></center></p>
 
         <p>
         In the file dialog you can name a particular file name, or
         search for files using wildcard matching, i.e. specify a
         file name containing wildcards. In addition you must specify
-        the directory in which the file you search for resides. 
+        the directory in which the file you search for resides.
         </p>
 
         <br />
@@ -39,7 +39,7 @@
         <br />
         <br />
         <p>
-        See also: <a href="browse.html">Browse</a>, <a href="wildcardmatching.html">Wildcard Matching</a>, 
+        See also: <a href="browse.html">Browse</a>, <a href="wildcardmatching.html">Wildcard Matching</a>,
         <a href="findfile.html">Find File</a>
         </p>
     </body>
index 32e0147..dad66ab 100644 (file)
@@ -1,11 +1,11 @@
 <html>
     <head>
-       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-       <title>Find File</title>
+        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+        <title>Find File</title>
     </head>
     <body style="font-size:12pt;font-family:helvetica">
 
-       <p><center><h2>Find File</h2></center></p>
+        <p><center><h2>Find File</h2></center></p>
 
         <p>
         To open and view a file in the Simple Text Viewer, select the
index 5a7b1d5..569ff53 100644 (file)
@@ -1,15 +1,15 @@
 <html>
     <head>
-       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-       <title>Manual</title>
+        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+        <title>Manual</title>
     </head>
     <body style="font-size:12pt;font-family:helvetica">
 
-       <p><center><h2>Simple Text Viewer</h2></center></p>
+        <p><center><h2>Simple Text Viewer</h2></center></p>
 
-       <p>
+        <p>
         The Simple Text Viewer enables the user to select and view
-        existing files. 
+        existing files.
         </p>
 
         <p><center>
         the existing file system to find the relevant directory.
         </p>
 
-       <ul>
-           <li><a href="findfile.html">Find File</a></li>
+        <ul>
+            <li><a href="findfile.html">Find File</a></li>
             <ul>
                 <li><a href="filedialog.html">File Dialog</a></li>
                 <li><a href="wildcardmatching.html">WildCard Matching</a></li>
                 <li><a href="browse.html">Browse</a></li>
             </ul>
-           <li><a href="openfile.html">Open File</a></li>
-       </ul>
+            <li><a href="openfile.html">Open File</a></li>
+        </ul>
     </body>
 </html>
 
index 2e2aa40..958619b 100644 (file)
@@ -1,15 +1,15 @@
 <html>
     <head>
-       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-       <title>Manual</title>
+        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+        <title>Manual</title>
     </head>
     <body style="font-size:12pt;font-family:helvetica">
 
-       <p><center><h2>Simple Text Viewer</h2></center></p>
+        <p><center><h2>Simple Text Viewer</h2></center></p>
 
-       <p>
+        <p>
         The Simple Text Viewer enables the user to select and view
-        existing files. 
+        existing files.
         </p>
 
         <p><center>
index e172de9..a68b1c1 100644 (file)
@@ -1,11 +1,11 @@
 <html>
     <head>
-       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-       <title>Open File</title>
+        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+        <title>Open File</title>
     </head>
     <body style="font-size:12pt;font-family:helvetica">
 
-       <p><center><h2>Open File</h2></center></p>
+        <p><center><h2>Open File</h2></center></p>
 
         <p>
         Once the file you want to view appears in the dialog's
index eb1839a..a6d8a74 100644 (file)
@@ -1,16 +1,16 @@
 <html>
     <head>
-       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-       <title>Wildcard Matching</title>
+        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+        <title>Wildcard Matching</title>
     </head>
     <body style="font-size:12pt;font-family:helvetica">
 
-       <p><center><h2>Wildcard Matching</h2></center></p>
+        <p><center><h2>Wildcard Matching</h2></center></p>
 
         <p>
         Most command shells such as bash or cmd.exe support "file
         globbing", the ability to identify a group of files by using
-        wildcards. 
+        wildcards.
 
         <br />
         <br />
         <br />
         <br />
         <p>
-        Wildcard matching provides four features:     
-        </p>   
+        Wildcard matching provides four features:
+        </p>
 
-       <ul>
-           <li>Any character represents itself apart from those
-           mentioned below. Thus 'c' matches the character 'c'.
+        <ul>
+            <li>Any character represents itself apart from those
+            mentioned below. Thus 'c' matches the character 'c'.
             </li>
-           <li>The '?' character matches any single character.</li>
-           <li>The '*' matches zero or more of any characters.</li>
-           <li>Sets of characters can be represented in square brackets. 
-                Within the character class, like outside, backslash 
+            <li>The '?' character matches any single character.</li>
+            <li>The '*' matches zero or more of any characters.</li>
+            <li>Sets of characters can be represented in square brackets.
+                Within the character class, like outside, backslash
                 has no special meaning.
-           </li>
-       </ul>
+            </li>
+        </ul>
 
         <p>
         For example we could identify HTML files with
index d07cd62..a1c9660 100644 (file)
@@ -91,7 +91,7 @@ void FindFileDialog::browse()
 //! [2]
 void FindFileDialog::help()
 {
-    currentAssistant->showDocumentation("filedialog.html");    
+    currentAssistant->showDocumentation("filedialog.html");
 }
 //! [2]
 
index bc17001..b235940 100644 (file)
@@ -87,7 +87,7 @@ void MainWindow::about()
 //! [3]
 void MainWindow::showDocumentation()
 {
-    assistant->showDocumentation("index.html");    
+    assistant->showDocumentation("index.html");
 }
 //! [3]
 
index 5bd5f7c..b3e05d7 100644 (file)
@@ -24,14 +24,14 @@ QT      += widgets designer
 
 #! [2]
 HEADERS += multipagewidget.h \
-           multipagewidgetplugin.h \ 
+           multipagewidgetplugin.h \
            multipagewidgetcontainerextension.h \
-           multipagewidgetextensionfactory.h 
+           multipagewidgetextensionfactory.h
 
 SOURCES += multipagewidget.cpp \
            multipagewidgetplugin.cpp \
            multipagewidgetcontainerextension.cpp \
-           multipagewidgetextensionfactory.cpp 
+           multipagewidgetextensionfactory.cpp
 
 OTHER_FILES += multipagewidget.json
 #! [2]
index e110e73..a05e3ba 100644 (file)
@@ -65,8 +65,8 @@ public:
     int currentIndex() const;
     QWidget *widget(int index);
     QString pageTitle() const;
-    
-public slots:   
+
+public slots:
     void addPage(QWidget *page);
     void insertPage(int index, QWidget *page);
     void removePage(int index);
index 5b81ce2..38987f8 100644 (file)
@@ -10,7 +10,7 @@ SUBDIRS     = calculatorform
 
 # the sun cc compiler has a problem with the include lines for the form.prf
 solaris-cc*:SUBDIRS -= calculatorbuilder \
-                      worldtimeclockbuilder
+                       worldtimeclockbuilder
 
 qtNomakeTools( \
     containerextension \
index cbf9b21..a5e4292 100644 (file)
@@ -71,9 +71,9 @@ QVariant HelpBrowser::loadResource(int type, const QUrl &name)
     QByteArray ba;
     if (type < 4 && m_helpEngine) {
         QUrl url(name);
-        if (name.isRelative())            
+        if (name.isRelative())
             url = source().resolved(url);
-        ba = m_helpEngine->fileData(url);        
+        ba = m_helpEngine->fileData(url);
     }
     return ba;
 }
index d58d288..7fad8a4 100644 (file)
@@ -44,7 +44,7 @@
 
 int main(int argc, char *argv[])
 {
-    QApplication a(argc, argv);    
+    QApplication a(argc, argv);
     WateringConfigDialog dia;
     return dia.exec();
 }
index 638c795..7a9f4a2 100644 (file)
@@ -52,7 +52,7 @@ public:
 
 private slots:
     void focusChanged(QWidget *old, QWidget *now);
-    
+
 private:
     Ui::WateringConfigDialog m_ui;
     QMap<QWidget*, QString> m_widgetInfo;
index 06f29b3..1baace2 100644 (file)
@@ -1,6 +1,6 @@
 #! [0]
 SOURCES = calculatorform.cpp main.cpp
-HEADERS        = calculatorform.h
+HEADERS = calculatorform.h
 FORMS = calculatorform.ui
 #! [0]
 
index 29dfe5d..96e8c30 100644 (file)
@@ -1,9 +1,9 @@
-These forms are processed at run-time to produce dynamically-generated user interfaces. 
-In order to generate a form at run-time, a resource file containing a UI file is needed. 
-Applications that use the form handling classes need to be configured to be built against 
-the QtUiTools module. This is done by including the following declaration in a qmake project 
-file to ensure that the application is compiled and linked appropriately. A form loader object, 
-provided by the QUiLoader class, is used to construct the user interface. This user interface 
-can be retrieved from any QIODevice; for example, a QFile object can be used to obtain a form 
-stored in a project's resources. The QUiLoader::load() function takes the user interface 
+These forms are processed at run-time to produce dynamically-generated user interfaces.
+In order to generate a form at run-time, a resource file containing a UI file is needed.
+Applications that use the form handling classes need to be configured to be built against
+the QtUiTools module. This is done by including the following declaration in a qmake project
+file to ensure that the application is compiled and linked appropriately. A form loader object,
+provided by the QUiLoader class, is used to construct the user interface. This user interface
+can be retrieved from any QIODevice; for example, a QFile object can be used to obtain a form
+stored in a project's resources. The QUiLoader::load() function takes the user interface
 description contained in the file and constructs the form widget.
\ No newline at end of file
index ee6dce8..d322802 100644 (file)
@@ -120,9 +120,9 @@ void TextFinder::on_findButton_clicked()
                 "The search field is empty. Please enter a word and click Find.");
     } else {
 
-        QTextCursor highlightCursor(document);  
+        QTextCursor highlightCursor(document);
         QTextCursor cursor(document);
-        
+
         cursor.beginEditBlock();
 //! [6]
 
@@ -149,7 +149,7 @@ void TextFinder::on_findButton_clicked()
         if (found == false) {
             QMessageBox::information(this, tr("Word Not Found"),
                 "Sorry, the word cannot be found.");
-        }    
+        }
     }
 }
 //! [8] //! [9]
index 374f245..1a7fd0c 100644 (file)
@@ -59,7 +59,7 @@ public:
 
 private slots:
     void on_findButton_clicked();
-    
+
 private:
     QWidget* loadUiFile();
     void loadTextFile();
index 0e6421f..667711d 100644 (file)
@@ -1,6 +1,6 @@
-HEADERS                = textfinder.h
-RESOURCES      = textfinder.qrc
-SOURCES                = textfinder.cpp main.cpp
+HEADERS         = textfinder.h
+RESOURCES       = textfinder.qrc
+SOURCES         = textfinder.cpp main.cpp
 
 target.path = $$[QT_INSTALL_EXAMPLES]/uitools/textfinder
 INSTALLS += target
index 65ac5aa..34590d6 100644 (file)
@@ -1,7 +1,7 @@
 TEMPLATE = subdirs
 
 SUBDIRS += clucene \
-          help \
+           help \
            assistant \
            qhelpgenerator \
            qcollectiongenerator \
index 315d5af..8be9b9a 100644 (file)
@@ -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);
index a511de9..9f85ac5 100644 (file)
@@ -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();
index 994d206..6346adc 100644 (file)
@@ -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;
index b0aeb72..4cfdf40 100644 (file)
@@ -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();
index d7ee5da..f3344f0 100644 (file)
@@ -73,7 +73,7 @@ private slots:
     void appFontSettingChanged(int index);
     void browserFontSettingToggled(bool on);
     void browserFontSettingChanged(int index);
-    
+
     void setBlankPage();
     void setCurrentPage();
     void setDefaultPage();
index 1251b03..a892d69 100644 (file)
@@ -54,7 +54,7 @@ class StdInListenerWin : public QThread
 public:
     StdInListenerWin(QObject *parent);
     ~StdInListenerWin();
-    
+
 signals:
     void receivedCommand(const QString &cmd);
 
index 49bdb9d..5f15268 100644 (file)
@@ -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
index 9ef3d70..75657f7 100644 (file)
@@ -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
index 1bd67d1..ae666f0 100644 (file)
@@ -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)
index d53f0c6..4c858c0 100644 (file)
@@ -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:
index 6d8e819..292de08 100644 (file)
@@ -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)
index 87ce943..77f9425 100644 (file)
@@ -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();
 }
 
index b62cdc7..bcdbc5d 100644 (file)
@@ -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)
index 5bce06f..16c3496 100644 (file)
@@ -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();
index 2b85723..8dc8cb1 100644 (file)
@@ -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;
index 60fe10d..2740aa5 100644 (file)
@@ -74,7 +74,7 @@ QCLuceneIndexReader QCLuceneIndexReader::open(const QString &path)
 
     QCLuceneIndexReader indexReader;
     indexReader.d->reader = IndexReader::open(path);
-    
+
     return indexReader;
 }
 
index 4baf0e4..c084912 100644 (file)
@@ -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);
index d07ee47..ab34256 100644 (file)
@@ -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)
index 20ac8b3..f6d4317 100644 (file)
@@ -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;
index 350868c..93f33ba 100644 (file)
@@ -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)
index 291d426..0b08443 100644 (file)
@@ -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);
 
index 2b93484..a71fbae 100644 (file)
@@ -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) {
index 362d829..5b25276 100644 (file)
@@ -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();
 
index d4aa715..4c374d6 100644 (file)
@@ -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:
index 74eb603..77bb11d 100644 (file)
@@ -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:
index 18c2311..1bc3b56 100644 (file)
@@ -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);
 }
 
index 0e774dc..e7c2a65 100644 (file)
@@ -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;
index 32eab93..2bd3d8b 100644 (file)
@@ -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;
 }
 
index bcceb9a..79819f2 100644 (file)
@@ -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
index 744dfa1..5ee7b1d 100644 (file)
@@ -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);
index fa3af6f..20485c3 100644 (file)
@@ -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);
 }
 
index ebb2bc1..81714a5 100644 (file)
@@ -85,7 +85,7 @@ struct QHELP_EXPORT QHelpDataIndexItem {
     QString name;
     QString identifier;
     QString reference;
-    
+
     bool operator==(const QHelpDataIndexItem & other) const;
 };
 
index 6262dfe..ca669cb 100644 (file)
@@ -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);
index 3b80144..e4d8672 100644 (file)
@@ -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();
index 76a384f..202b185 100644 (file)
@@ -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();
index ebfae3f..ec2c267 100644 (file)
@@ -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"))
index 0fe30e2..c15df55 100644 (file)
@@ -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;
index 7b3781b..f95f3b2 100644 (file)
@@ -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
index 952b88d..714b51c 100644 (file)
@@ -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>
index 810b470..e7fbc72 100644 (file)
@@ -55,7 +55,7 @@ class FinishPage : public QWizardPage
 public:
     FinishPage(QWidget *parent = 0);
     void appendMessage(const QString &msg);
-    
+
 private:
     QTextEdit *m_textEdit;
 };
index 82ff597..8e7ca8d 100644 (file)
@@ -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());
 }
 
index ae8daa0..07b7cbb 100644 (file)
@@ -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
index 5ea1bfb..54c4952 100644 (file)
@@ -55,7 +55,7 @@ class InputPage : public QWizardPage
 
 public:
     explicit InputPage(AdpReader *reader, QWidget *parent = 0);
-    
+
 private slots:
     void getFileName();
 
index 8ca7189..07c0b1b 100644 (file)
@@ -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();
 }
index ba52e12..df4bc71 100644 (file)
@@ -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) {
index 9f51344..37fb667 100644 (file)
@@ -56,7 +56,7 @@ public:
     void setPath(const QString &path);
     QStringList paths() const;
     QStringList filters() const;
-        
+
 private slots:
     void addPath();
     void removePath();
index 653697b..2eea7a9 100644 (file)
@@ -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);
index f751099..99df3bb 100644 (file)
@@ -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:
index df43b7c..c502b44 100644 (file)
@@ -63,7 +63,7 @@ public:
 private slots:
     void printStatus(const QString &msg);
     void printWarning(const QString &msg);
-    
+
 private:
     QHelpGenerator *generator;
 };
index 660e23d..579e01e 100644 (file)
                     <xsl:text>,</xsl:text>
                 </xsl:if>
                 <xsl:text>&endl;</xsl:text>
-                                     
+
             </xsl:for-each>
             <xsl:text>    };&endl;</xsl:text>
         </xsl:if>
index 06f325e..5bf417d 100644 (file)
@@ -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>
                                        </xs:complexType>
                                </xs:element>
                                <xs:element name="slots">
-                                       <xs:complexType>                                                
+                                       <xs:complexType>
                                                <xs:sequence maxOccurs="unbounded">
                                                        <xs:element name="slot">
                                                                <xs:complexType>
                        <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" />
                <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" />
                        <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" />
                        <xs:element name="y" type="xs:integer" />
                </xs:sequence>
        </xs:complexType>
-       
+
        <xs:complexType name="rect">
                <xs:sequence>
                        <xs:element name="x" type="xs:integer" />
                        <xs:element name="height" type="xs:integer" />
                </xs:sequence>
        </xs:complexType>
-       
+
        <xs:complexType name="date">
                <xs:sequence>
                        <xs:element name="year" type="xs:integer" />
                        <xs:element name="second" type="xs:integer" />
                </xs:sequence>
        </xs:complexType>
-       
+
        <xs:complexType name="dateTime">
                <xs:sequence>
                        <xs:element name="hour" type="xs:integer" />
                <xs:attribute name="name" type="xs:string" />
                <xs:attribute name="stdset" type="xs:integer" />
        </xs:complexType>
-       
+
 </xs:schema>
\ No newline at end of file
index 294373f..85665a9 100644 (file)
@@ -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);
index 457d156..8761849 100644 (file)
@@ -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;
index b6543e2..9bf2be7 100644 (file)
@@ -45,7 +45,7 @@
 #include <QtWidgets/QDialog>
 
 QT_BEGIN_NAMESPACE
-    
+
 namespace Ui {
     class FormWindowSettings;
 }
index 67ccaae..cfaee7f 100644 (file)
@@ -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
index bfd8676..dfa6cfd 100644 (file)
@@ -262,7 +262,7 @@ ObjectInspector::ObjectInspectorPrivate::ObjectInspectorPrivate(QDesignerFormEdi
 
     m_treeView->setContextMenuPolicy(Qt::CustomContextMenu);
 }
-    
+
 ObjectInspector::ObjectInspectorPrivate::~ObjectInspectorPrivate()
 {
     delete m_treeView->itemDelegate();
index cf4ba20..9924c4b 100644 (file)
@@ -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));
index b494321..933c7b1 100644 (file)
@@ -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.
index 186a364..301c32b 100644 (file)
@@ -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
index 9d01266..9fa57a4 100644 (file)
@@ -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
index 76b4269..a256d80 100644 (file)
@@ -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());
 }
index 4508b4a..00f3722 100644 (file)
@@ -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()
index a2af2b3..753de88 100644 (file)
@@ -150,7 +150,7 @@ QDesignerMetaDataBaseInterface::~QDesignerMetaDataBaseInterface()
     \sa tabOrder()
 */
 
-    
+
 /*!
     \fn bool QDesignerMetaDataBaseItemInterface::enabled() const
 
index 80aae6b..0802e02 100644 (file)
@@ -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();
 };
index 9cedb06..ab2406e 100644 (file)
@@ -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
index 84818bb..31d4ec7 100644 (file)
@@ -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);
 }
index 2f0745d..cf99d9d 100644 (file)
@@ -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 };
 };
 
index 4feda3f..315f7de 100644 (file)
@@ -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"
index a75dca8..f42b6c7 100644 (file)
@@ -185,7 +185,7 @@ private slots:
 private:
     void syncGridFeature();
 
-    FormWindowBasePrivate *m_d;    
+    FormWindowBasePrivate *m_d;
 };
 
 }  // namespace qdesigner_internal
index 75e103f..a6b9851 100644 (file)
@@ -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);
index f0361b5..5d1f1a1 100644 (file)
@@ -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);
index 8a47784..25cbe60 100644 (file)
@@ -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
 {
index 1e77bfa..27baddc 100644 (file)
@@ -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()));
 
index bb93498..1cdad96 100644 (file)
@@ -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 &parameters, 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();
index 363e925..2d897b9 100644 (file)
@@ -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) ?
index 2b576ea..da10982 100644 (file)
@@ -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;
index 8b71466..a9d0d1c 100644 (file)
@@ -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);
index 8e3f8a9..3e6d0b0 100644 (file)
@@ -143,7 +143,7 @@ private:
     int m_zoom;
     qreal m_zoomFactor;
 
-    bool m_zoomContextMenuEnabled;    
+    bool m_zoomContextMenuEnabled;
     bool m_resizeBlocked;
     ZoomMenu *m_zoomMenu;
 };
index 1849bd0..7dde47c 100644 (file)
@@ -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);
index 2fab986..815a8ae 100644 (file)
@@ -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
index f2c12eb..6b03b47 100644 (file)
@@ -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;
         }
index 0c4e667..c73666e 100644 (file)
@@ -36,7 +36,7 @@
 .\"
 .\"
 .\" $QT_END_LICENSE$
-.\" 
+.\"
 .SH NAME
 lrelease \- generate Qt message files from Qt Linguist translation files
 .SH SYNOPSIS
index aad608e..d09710a 100644 (file)
@@ -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':
index 76ca7f2..ec0ba7a 100644 (file)
@@ -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; }"
index 985f6db..e5f388f 100644 (file)
@@ -19,4 +19,4 @@ SOURCES += \
     $$PWD/qph.cpp \
     $$PWD/po.cpp \
     $$PWD/ts.cpp \
-    $$PWD/xliff.cpp 
+    $$PWD/xliff.cpp
index d276cdf..37dbd13 100644 (file)
@@ -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
 
index 83ba0a2..f1c6d3d 100644 (file)
@@ -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;>
index 0071ea2..f7d994c 100644 (file)
@@ -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);
index 9cc8754..ad8474b 100644 (file)
 # 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
 
index 3221dc8..06cc6a3 100644 (file)
@@ -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]
index 8dc91d7..5f1b860 100644 (file)
@@ -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();
 }
 
index 6da6d2f..c7374f9 100644 (file)
@@ -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 &section);
     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;
 };
index b972265..f246333 100644 (file)
@@ -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);
index 014d441..279d822 100644 (file)
@@ -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 &section, const Feature *f) const;
     Node* find(const QString &section, 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
index 62b13cc..7ee6f66 100644 (file)
@@ -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));
index ad0edd7..aa64dde 100644 (file)
@@ -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)
index b1659dc..4e69cec 100644 (file)
@@ -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);
index 82c1e6c..87088c1 100644 (file)
@@ -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
index 0f1bf23..02fe44d 100644 (file)
@@ -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);
 
index 3ac32d3..d407256 100644 (file)
@@ -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(&copyTime, &copyTime);
-    
+
     QTcpSocket* socket = 0;
     if (!_initCommand(socket, COMMAND_TIME_STAMP)) {
         END_ERROR(socket, "Could not establish time stamp connection");
     }
-    
+
     if (!_sendData(socket, (char*) &copyTime, 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");
     }
index 4e3b736..88c16de 100644 (file)
@@ -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;
index c615122..a79ddbf 100644 (file)
@@ -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) {
index 3fd63eb..0289450 100644 (file)
@@ -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();
index 8b55b5a..867f0bc 100644 (file)
@@ -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();
index bf10323..5aecefb 100644 (file)
@@ -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);
index 9ba2188..9b52198 100644 (file)
@@ -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;
index 181aaf0..dfd37a0 100644 (file)
@@ -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))
index 7677d51..5e4ae43 100644 (file)
@@ -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 &parameters,  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
index 8fb2373..c32067d 100644 (file)
@@ -60,7 +60,7 @@ class QTextStream;
 struct DeviceSkinButtonArea {
     DeviceSkinButtonArea();
     QString name;
-    int        keyCode;
+    int keyCode;
     QPolygon area;
     QString text;
     bool activeWhenClosed;
index cb24a8e..976d9e9 100644 (file)
@@ -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
index 4f8fe5d..db16782 100644 (file)
@@ -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
index ed25d0e..bf5824e 100644 (file)
@@ -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
index 16884bf..d644c6e 100644 (file)
@@ -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
index 24316a1..3525d0a 100644 (file)
@@ -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
index 03e9c56..a7d37dd 100644 (file)
@@ -20,4 +20,4 @@
         <file>images/cursor-whatsthis.png</file>
     </qresource>
 </RCC>
-  
+
index 2ceb0fe..56c4156 100644 (file)
@@ -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()
index 71f0289..94cdd9a 100644 (file)
@@ -5,16 +5,16 @@ SOURCES += tst_qhelpcontentmodel.cpp
 
 DEFINES += QT_USE_USING_NAMESPACE
 
-wince*: {   
+wince*: {
    DEFINES += SRCDIR=\\\"./\\\"
    QT += network
-   addFiles.files = $$PWD/data/*.*                
+   addFiles.files = $$PWD/data/*.*
    addFiles.path = data
    clucene.files = $$QT.clucene.libs/QtCLucene*.dll
 
    DEPLOYMENT += addFiles
    DEPLOYMENT += clucene
-   
+
    DEPLOYMENT_PLUGIN += qsqlite
 } else {
    DEFINES += SRCDIR=\\\"$$PWD\\\"
index 744cafa..85b68d7 100644 (file)
@@ -6,10 +6,10 @@ QT      += help sql testlib help
 
 DEFINES += QT_USE_USING_NAMESPACE
 
-wince*: {   
+wince*: {
    DEFINES += SRCDIR=\\\"./\\\"
    QT += network
-   addFiles.files = $$PWD/data/*.*                
+   addFiles.files = $$PWD/data/*.*
    addFiles.path = data
    clucene.files = $$QT.clucene.libs/QtCLucene*.dll
 
index 716c048..26d7cdf 100644 (file)
@@ -6,11 +6,11 @@
        <namespace>trolltech.com.1.0.0.test</namespace>
        <customFilter name="Custom Filter 1">
                <filterAttribute>test</filterAttribute>
-               <filterAttribute>filter1</filterAttribute>              
+               <filterAttribute>filter1</filterAttribute>
        </customFilter>
        <customFilter name="Custom Filter 2">
                <filterAttribute>test</filterAttribute>
-               <filterAttribute>filter2</filterAttribute>              
+               <filterAttribute>filter2</filterAttribute>
        </customFilter>
        <filterSection>
                <filterAttribute>test</filterAttribute>
                                <section title="Section 2" ref="test.html#section2">
                                </section>
                                <section title="Section 3" ref="test.html#section3">
-                               </section>                              
+                               </section>
                                <section title="People" ref="people.html">
                                </section>
                                <section title="About" ref="./sub/about.html">
-                               </section>                              
+                               </section>
                        </section>
                </toc>
                <keywords>
                        <keyword name="bla" id="Test::bla" ref="test.html#bla"/>
                        <keyword name="einstein" id="People::einstein" ref="people.html#einstein"/>
                        <keyword name="newton" id="People::newton" ref="people.html#newton"/>
-               </keywords>     
+               </keywords>
                <files>
                        <file>classic.css</file>
                        <file>[pt]*.html</file>
-                       <file>./sub/abou?.html</file>                   
+                       <file>./sub/abou?.html</file>
                </files>
        </filterSection>
        <filterSection>
                                <section title="Section 2" ref="fancy.html#section2">
                                </section>
                                <section title="Section 3" ref="fancy.html#section3">
-                               </section>                              
+                               </section>
                                <section title="Cars" ref="cars.html">
-                               </section>                              
+                               </section>
                        </section>
                </toc>
                <keywords>
                        <keyword name="foo" id="Fancy::foo" ref="fancy.html#foo"/>
                        <keyword name="foobar" id="Fancy::foobar" ref="fancy.html#foobar"/>
-                       <keyword name="audi" id="Cars::newton" ref="cars.html#audi"/>                   
-               </keywords>     
+                       <keyword name="audi" id="Cars::newton" ref="cars.html#audi"/>
+               </keywords>
                <files>
                        <file>classic.css</file>
                        <file>fancy.html</file>
-                       <file>cars.html</file>                  
+                       <file>cars.html</file>
                </files>
        </filterSection>
 </QtHelpProject>
index ea15a81..22fe59c 100644 (file)
@@ -6,11 +6,11 @@
        <namespace>trolltech.com.1.0.0.test</namespace>
        <customFilter name="Custom Filter 1">
                <filterAttribute>test</filterAttribute>
-               <filterAttribute>filter1</filterAttribute>              
+               <filterAttribute>filter1</filterAttribute>
        </customFilter>
        <customFilter name="Custom Filter 2">
                <filterAttribute>test</filterAttribute>
-               <filterAttribute>filter2</filterAttribute>              
+               <filterAttribute>filter2</filterAttribute>
        </customFilter>
        <filterSection>
                <filterAttribute>test</filterAttribute>
                                <section title="Section 2" ref="test.html#section2">
                                </section>
                                <section title="Section 3" ref="test.html#section3">
-                               </section>                              
+                               </section>
                                <section title="People" ref="people.html">
                                </section>
                                <section title="About" ref="./sub/about.html">
-                               </section>                              
+                               </section>
                        </section>
                </toc>
                <keywords>
                        <keyword name="bla" id="Test::bla" ref="test.html#bla"/>
                        <keyword name="einstein" id="People::einstein" ref="people.html#einstein"/>
                        <keyword name="newton" id="People::newton" ref="people.html#newton"/>
-               </keywords>     
+               </keywords>
                <files>
                        <file>classic.css</file>
                        <file>test.html</file>
                        <file>people.html</file>
-                       <file>./sub/about.html</file>                   
+                       <file>./sub/about.html</file>
                </files>
        </filterSection>
        <filterSection>
                                <section title="Section 2" ref="fancy.html#section2">
                                </section>
                                <section title="Section 3" ref="fancy.html#section3">
-                               </section>                              
+                               </section>
                                <section title="Cars" ref="cars.html">
-                               </section>                              
+                               </section>
                        </section>
                </toc>
                <keywords>
                        <keyword name="foo" id="Fancy::foo" ref="fancy.html#foo"/>
                        <keyword name="foobar" id="Fancy::foobar" ref="fancy.html#foobar"/>
-                       <keyword name="audi" id="Cars::newton" ref="cars.html#audi"/>                   
-               </keywords>     
+                       <keyword name="audi" id="Cars::newton" ref="cars.html#audi"/>
+               </keywords>
                <files>
                        <file>classic.css</file>
                        <file>fancy.html</file>
-                       <file>cars.html</file>                  
+                       <file>cars.html</file>
                </files>
        </filterSection>
 </QtHelpProject>
index cbbf0ff..f58d4e8 100644 (file)
@@ -51,7 +51,7 @@ HOW IT WORKS
         tst_uiloader/       Actual program executing the tests.
         tst_screenshot/     Program to generate one *.png file out of *.ui
         baseline/           This is a dir with *.ui files.
-        
+
     ./uiloader (compiled from tst_uiloader) will use the tst_screenshot program
     and the files in baseline/.
 
@@ -60,7 +60,7 @@ HOW IT WORKS
     created/used.
 
     Structure of testresults/:
-        
+
         |-- testresults
         |   `-- i686 Linux g++-4 full-config    That's buildKey().
         |       `-- 4.5.0                       Used Qt version.
index 4bc92e1..459fbf9 100644 (file)
@@ -60,10 +60,10 @@ public slots:
 
 private slots:
     void imageDiffTest();
-    
+
 private:
     QString currentDir;
-        
+
 };
 
 
index 95b42c2..ac98ab8 100644 (file)
@@ -81,7 +81,7 @@ class uiLoader : public QObject
         void diff(const QString&, const QString&, const QString&);
         int imgDiff(const QString fileA, const QString fileB, const QString output);
         QStringList uiFiles() const;
-    
+
         QHash<QString, QString> enginesToTest;
 
         QString framework;
@@ -99,7 +99,7 @@ class uiLoader : public QObject
         QList<QString> lsNeedBaseline;
 
         QString configPath;
-        
+
         QString pathToProgram;
 
     private slots: