From 59003be0d54d20bb7d2e2b5ba6c05fbf8c2b070c Mon Sep 17 00:00:00 2001 From: Alessandro Portale <aportale@trolltech.com> Date: Sun, 17 May 2009 23:57:21 +0200 Subject: [PATCH] Replaced 'speinfo' with 'qtmodulesinfo'. --- share/qtcreator/translations/qtcreator_de.ts | 220 +---------- share/qtcreator/translations/qtcreator_it.ts | 220 +---------- share/qtcreator/translations/qtcreator_ja.ts | 220 +---------- .../qt4projectmanager/qt4projectmanager.pro | 4 +- .../qt4projectmanager/qtmodulesinfo.cpp | 160 ++++++++ src/plugins/qt4projectmanager/qtmodulesinfo.h | 49 +++ src/plugins/qt4projectmanager/speinfo.cpp | 362 ------------------ src/plugins/qt4projectmanager/speinfo.h | 96 ----- .../qt4projectmanager/wizards/modulespage.cpp | 46 ++- 9 files changed, 236 insertions(+), 1141 deletions(-) create mode 100644 src/plugins/qt4projectmanager/qtmodulesinfo.cpp create mode 100644 src/plugins/qt4projectmanager/qtmodulesinfo.h delete mode 100644 src/plugins/qt4projectmanager/speinfo.cpp delete mode 100644 src/plugins/qt4projectmanager/speinfo.h diff --git a/share/qtcreator/translations/qtcreator_de.ts b/share/qtcreator/translations/qtcreator_de.ts index d3d5425f60e..9987b9693ae 100644 --- a/share/qtcreator/translations/qtcreator_de.ts +++ b/share/qtcreator/translations/qtcreator_de.ts @@ -10777,337 +10777,119 @@ Um es abzurufen, tippen Sie das Kürzel im Locator, gefolgt von einem Leerzeich </message> </context> <context> - <name>SimpleProEditor</name> + <name>QtModulesInfo</name> <message> - <location filename="../../../src/plugins/qt4projectmanager/speinfo.cpp" line="+59"/> - <source>Debug and Release</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+7"/> - <source>Debug specific</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+7"/> - <source>Release specific</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+9"/> - <source>All platforms</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+7"/> - <source>MS Windows specific</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+7"/> - <source>Linux/Unix specific</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+7"/> - <source>Mac OSX specific</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+13"/> - <source>Target Options</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+3"/> - <source>Type and name of the target.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+13"/> - <source>Preprocessor Definitions</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+3"/> - <source>Setting of the preprocessor definitions.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+14"/> - <source>Include path</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+3"/> - <source>Setting of the pathes where the header files are located.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+13"/> - <source>Libraries</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+3"/> - <source>Defining the libraries to link the target against and the pathes where these are located.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+14"/> - <source>Source Files</source> - <translation>Quelldateien</translation> - </message> - <message> - <location line="+17"/> - <source>Header Files</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+17"/> - <source>Forms</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+16"/> - <source>Qt Modules</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+3"/> - <source>Setting up which of the Qt modules will be used in the target application.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+14"/> - <source>Resource files</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+12"/> - <source>Target name</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+3"/> - <source>The name of the resulting target.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+9"/> - <source>Configuration</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+3"/> - <source>Configuration.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+9"/> - <source>Destination directory</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+3"/> - <source>Where the resulting target will be created.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+15"/> <source>QtCore Module</source> <translation type="unfinished"></translation> </message> <message> - <location line="+3"/> <source>Core non-GUI classes used by other modules</source> <translation type="unfinished"></translation> </message> <message> - <location line="+13"/> <source>QtGui Module</source> <translation type="unfinished"></translation> </message> <message> - <location line="+3"/> <source>Graphical user interface components</source> <translation type="unfinished"></translation> </message> <message> - <location line="+13"/> <source>QtNetwork Module</source> <translation type="unfinished"></translation> </message> <message> - <location line="+3"/> <source>Classes for network programming</source> <translation type="unfinished"></translation> </message> <message> - <location line="+13"/> <source>QtOpenGL Module</source> <translation type="unfinished"></translation> </message> <message> - <location line="+3"/> <source>OpenGL support classes</source> <translation type="unfinished"></translation> </message> <message> - <location line="+13"/> <source>QtSql Module</source> <translation type="unfinished"></translation> </message> <message> - <location line="+3"/> <source>Classes for database integration using SQL</source> <translation type="unfinished"></translation> </message> <message> - <location line="+13"/> <source>QtScript Module</source> <translation type="unfinished"></translation> </message> <message> - <location line="+3"/> <source>Classes for evaluating Qt Scripts</source> <translation type="unfinished"></translation> </message> <message> - <location line="+13"/> <source>QtSvg Module</source> <translation type="unfinished"></translation> </message> <message> - <location line="+3"/> <source>Classes for displaying the contents of SVG files</source> <translation type="unfinished"></translation> </message> <message> - <location line="+13"/> <source>QtWebKit Module</source> <translation type="unfinished"></translation> </message> <message> - <location line="+3"/> <source>Classes for displaying and editing Web content</source> <translation type="unfinished"></translation> </message> <message> - <location line="+13"/> <source>QtXml Module</source> <translation type="unfinished"></translation> </message> <message> - <location line="+3"/> <source>Classes for handling XML</source> <translation type="unfinished"></translation> </message> <message> - <location line="+13"/> <source>QtXmlPatterns Module</source> <translation type="unfinished"></translation> </message> <message> - <location line="+3"/> <source>An XQuery/XPath engine for XML and custom data models</source> <translation type="unfinished"></translation> </message> <message> - <location line="+13"/> <source>Phonon Module</source> <translation type="unfinished"></translation> </message> <message> - <location line="+3"/> <source>Multimedia framework classes</source> <translation type="unfinished"></translation> </message> <message> - <location line="+13"/> <source>Qt3Support Module</source> <translation type="unfinished"></translation> </message> <message> - <location line="+3"/> <source>Classes that ease porting from Qt 3 to Qt 4</source> <translation type="unfinished"></translation> </message> <message> - <location line="+13"/> <source>QtTest Module</source> <translation type="unfinished"></translation> </message> <message> - <location line="+3"/> <source>Tool classes for unit testing</source> <translation type="unfinished"></translation> </message> <message> - <location line="+13"/> <source>QtDBus module</source> <translation type="unfinished"></translation> </message> <message> - <location line="+3"/> <source>Classes for Inter-Process Communication using the D-Bus</source> <translation type="unfinished"></translation> </message> - <message> - <location line="+15"/> - <source>Application</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+3"/> - <source>Create a standalone application</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+13"/> - <source>Dynamic Library</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+3"/> - <source>Create a dynamic library for usage in other applications</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+13"/> - <source>Static Library</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+3"/> - <source>Create a static library for usage in other applications</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+10"/> - <source>Add Operator</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+7"/> - <source>Remove Operator</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+7"/> - <source>Replace Operator</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+7"/> - <source>Set Operator</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+7"/> - <source>Unique Add Operator</source> - <translation type="unfinished"></translation> - </message> </context> <context> <name>Snippets::Internal::SnippetsPlugin</name> diff --git a/share/qtcreator/translations/qtcreator_it.ts b/share/qtcreator/translations/qtcreator_it.ts index 9c335abd637..08daf84d4b6 100644 --- a/share/qtcreator/translations/qtcreator_it.ts +++ b/share/qtcreator/translations/qtcreator_it.ts @@ -10218,337 +10218,119 @@ Per eseguire la ricerca, scrivi questo prefisso, uno spazio e poi il termine da </message> </context> <context> - <name>SimpleProEditor</name> + <name>QtModulesInfo</name> <message> - <location filename="../../../src/plugins/qt4projectmanager/speinfo.cpp" line="+59"/> - <source>Debug and Release</source> - <translation>Debug e Release</translation> - </message> - <message> - <location line="+7"/> - <source>Debug specific</source> - <translation>Specifico del Debug</translation> - </message> - <message> - <location line="+7"/> - <source>Release specific</source> - <translation>Specifico del Release</translation> - </message> - <message> - <location line="+9"/> - <source>All platforms</source> - <translation>Tutte le piattaforme</translation> - </message> - <message> - <location line="+7"/> - <source>MS Windows specific</source> - <translation>Specifico di MS Windows</translation> - </message> - <message> - <location line="+7"/> - <source>Linux/Unix specific</source> - <translation>Specifico di Linux/Unix</translation> - </message> - <message> - <location line="+7"/> - <source>Mac OSX specific</source> - <translation>Specifico di Max OSX</translation> - </message> - <message> - <location line="+13"/> - <source>Target Options</source> - <translation>Opzioni Destinazione</translation> - </message> - <message> - <location line="+3"/> - <source>Type and name of the target.</source> - <translation>Tipo e nome della destinazione.</translation> - </message> - <message> - <location line="+13"/> - <source>Preprocessor Definitions</source> - <translation>Definizioni del Preprocessore</translation> - </message> - <message> - <location line="+3"/> - <source>Setting of the preprocessor definitions.</source> - <translation>Impostazione delle definizioni del preprocessore.</translation> - </message> - <message> - <location line="+14"/> - <source>Include path</source> - <translation>Percorso degli Include</translation> - </message> - <message> - <location line="+3"/> - <source>Setting of the pathes where the header files are located.</source> - <translation>Impostazione dei percorsi dove si trovano i file header.</translation> - </message> - <message> - <location line="+13"/> - <source>Libraries</source> - <translation>Librerie</translation> - </message> - <message> - <location line="+3"/> - <source>Defining the libraries to link the target against and the pathes where these are located.</source> - <translation>Definizione delle librerie con cui linkare la destinazione a dei percorsi che le contengono.</translation> - </message> - <message> - <location line="+14"/> - <source>Source Files</source> - <translation>File Sorgenti</translation> - </message> - <message> - <location line="+17"/> - <source>Header Files</source> - <translation>File Header</translation> - </message> - <message> - <location line="+17"/> - <source>Forms</source> - <translation>Form</translation> - </message> - <message> - <location line="+16"/> - <source>Qt Modules</source> - <translation>Moduli Qt</translation> - </message> - <message> - <location line="+3"/> - <source>Setting up which of the Qt modules will be used in the target application.</source> - <translation>Imposta quali moduli Qt saranno usati nell'applicazione di destinazione.</translation> - </message> - <message> - <location line="+14"/> - <source>Resource files</source> - <translation>File delle Risorse</translation> - </message> - <message> - <location line="+12"/> - <source>Target name</source> - <translation>Nome Destinazione</translation> - </message> - <message> - <location line="+3"/> - <source>The name of the resulting target.</source> - <translation>Il nome della destinazione.</translation> - </message> - <message> - <location line="+9"/> - <source>Configuration</source> - <translation>Configurazione</translation> - </message> - <message> - <location line="+3"/> - <source>Configuration.</source> - <translation>Configurazione.</translation> - </message> - <message> - <location line="+9"/> - <source>Destination directory</source> - <translation>Cartella di Destinazione</translation> - </message> - <message> - <location line="+3"/> - <source>Where the resulting target will be created.</source> - <translation>La destinazione sarà creata qui dentro.</translation> - </message> - <message> - <location line="+15"/> <source>QtCore Module</source> <translation>Modulo QtCore</translation> </message> <message> - <location line="+3"/> <source>Core non-GUI classes used by other modules</source> <translation>Classi di Core, non-GUI, usate dagli altri moduli</translation> </message> <message> - <location line="+13"/> <source>QtGui Module</source> <translation>Modulo QtGui</translation> </message> <message> - <location line="+3"/> <source>Graphical user interface components</source> <translation>Componenti dell'interfaccia grafica</translation> </message> <message> - <location line="+13"/> <source>QtNetwork Module</source> <translation>Modulo QtNetwork</translation> </message> <message> - <location line="+3"/> <source>Classes for network programming</source> <translation>Classi per la programmazione della rete</translation> </message> <message> - <location line="+13"/> <source>QtOpenGL Module</source> <translation>Modulo QtOpenGL</translation> </message> <message> - <location line="+3"/> <source>OpenGL support classes</source> <translation>Classi per il supporto OpenGL</translation> </message> <message> - <location line="+13"/> <source>QtSql Module</source> <translation>Modulo QtSql</translation> </message> <message> - <location line="+3"/> <source>Classes for database integration using SQL</source> <translation>Classi per l'integrazione con database SQL</translation> </message> <message> - <location line="+13"/> <source>QtScript Module</source> <translation>Modulo QtScript</translation> </message> <message> - <location line="+3"/> <source>Classes for evaluating Qt Scripts</source> <translation>Classi per l'esecuzione di Qt Script</translation> </message> <message> - <location line="+13"/> <source>QtSvg Module</source> <translation>Modulo QtSvg</translation> </message> <message> - <location line="+3"/> <source>Classes for displaying the contents of SVG files</source> <translation>Classi per la visualizzazione del contenuto di file SVG</translation> </message> <message> - <location line="+13"/> <source>QtWebKit Module</source> <translation>Modulo QtWebKit</translation> </message> <message> - <location line="+3"/> <source>Classes for displaying and editing Web content</source> <translation>Classi per la visualizzazione e modifica del contenuto Web</translation> </message> <message> - <location line="+13"/> <source>QtXml Module</source> <translation>Modulo QtXml</translation> </message> <message> - <location line="+3"/> <source>Classes for handling XML</source> <translation>Classi per la gestione di XML</translation> </message> <message> - <location line="+13"/> <source>QtXmlPatterns Module</source> <translation>Modulo QtXmlPatterns</translation> </message> <message> - <location line="+3"/> <source>An XQuery/XPath engine for XML and custom data models</source> <translation>Un motore XQuery/XPath per XML e modelli di dati speciali</translation> </message> <message> - <location line="+13"/> <source>Phonon Module</source> <translation>Modulo Phonon</translation> </message> <message> - <location line="+3"/> <source>Multimedia framework classes</source> <translation>Classi del framework multimediale</translation> </message> <message> - <location line="+13"/> <source>Qt3Support Module</source> <translation>Modulo Qt3Support</translation> </message> <message> - <location line="+3"/> <source>Classes that ease porting from Qt 3 to Qt 4</source> <translation>Classi che facilitano il porting da Qt 3 a Qt 4</translation> </message> <message> - <location line="+13"/> <source>QtTest Module</source> <translation>Modulo QtTest</translation> </message> <message> - <location line="+3"/> <source>Tool classes for unit testing</source> <translation>Classi di ausilio per lo unit testing</translation> </message> <message> - <location line="+13"/> <source>QtDBus module</source> <translation>Modulo QtDBus</translation> </message> <message> - <location line="+3"/> <source>Classes for Inter-Process Communication using the D-Bus</source> <translation>Classi per la comunicazione-intra-processo usando il D-Bus</translation> </message> - <message> - <location line="+15"/> - <source>Application</source> - <translation>Applicazione</translation> - </message> - <message> - <location line="+3"/> - <source>Create a standalone application</source> - <translation>Crea un'applicazione</translation> - </message> - <message> - <location line="+13"/> - <source>Dynamic Library</source> - <translation>Libreria Condivisa</translation> - </message> - <message> - <location line="+3"/> - <source>Create a dynamic library for usage in other applications</source> - <translation>Crea una libreria condivisa per l'uso in altre applicazioni</translation> - </message> - <message> - <location line="+13"/> - <source>Static Library</source> - <translation>Libreria Statica</translation> - </message> - <message> - <location line="+3"/> - <source>Create a static library for usage in other applications</source> - <translation>Crea una libreria statica per l'uso in altre applicazioni</translation> - </message> - <message> - <location line="+10"/> - <source>Add Operator</source> - <translation>Operatore di Aggiunta</translation> - </message> - <message> - <location line="+7"/> - <source>Remove Operator</source> - <translation>Operatore di Rimozione</translation> - </message> - <message> - <location line="+7"/> - <source>Replace Operator</source> - <translation>Operatore di Sostituzione</translation> - </message> - <message> - <location line="+7"/> - <source>Set Operator</source> - <translation>Operatore di Assegnazione</translation> - </message> - <message> - <location line="+7"/> - <source>Unique Add Operator</source> - <translation>Operatore di Aggiunta Unica</translation> - </message> </context> <context> <name>Snippets::Internal::SnippetsPlugin</name> diff --git a/share/qtcreator/translations/qtcreator_ja.ts b/share/qtcreator/translations/qtcreator_ja.ts index 856539bf09f..1d8cf823d30 100644 --- a/share/qtcreator/translations/qtcreator_ja.ts +++ b/share/qtcreator/translations/qtcreator_ja.ts @@ -10000,337 +10000,119 @@ To do this you type this shortcut and a space in the QuickOpen entry field, and </message> </context> <context> - <name>SimpleProEditor</name> + <name>QtModulesInfo</name> <message> - <location filename="../../../src/plugins/qt4projectmanager/speinfo.cpp" line="+59"/> - <source>Debug and Release</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+7"/> - <source>Debug specific</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+7"/> - <source>Release specific</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+9"/> - <source>All platforms</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+7"/> - <source>MS Windows specific</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+7"/> - <source>Linux/Unix specific</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+7"/> - <source>Mac OSX specific</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+13"/> - <source>Target Options</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+3"/> - <source>Type and name of the target.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+13"/> - <source>Preprocessor Definitions</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+3"/> - <source>Setting of the preprocessor definitions.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+14"/> - <source>Include path</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+3"/> - <source>Setting of the pathes where the header files are located.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+13"/> - <source>Libraries</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+3"/> - <source>Defining the libraries to link the target against and the pathes where these are located.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+14"/> - <source>Source Files</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+17"/> - <source>Header Files</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+17"/> - <source>Forms</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+16"/> - <source>Qt Modules</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+3"/> - <source>Setting up which of the Qt modules will be used in the target application.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+14"/> - <source>Resource files</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+12"/> - <source>Target name</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+3"/> - <source>The name of the resulting target.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+9"/> - <source>Configuration</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+3"/> - <source>Configuration.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+9"/> - <source>Destination directory</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+3"/> - <source>Where the resulting target will be created.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+15"/> <source>QtCore Module</source> <translation type="unfinished"></translation> </message> <message> - <location line="+3"/> <source>Core non-GUI classes used by other modules</source> <translation type="unfinished"></translation> </message> <message> - <location line="+13"/> <source>QtGui Module</source> <translation type="unfinished"></translation> </message> <message> - <location line="+3"/> <source>Graphical user interface components</source> <translation type="unfinished"></translation> </message> <message> - <location line="+13"/> <source>QtNetwork Module</source> <translation type="unfinished"></translation> </message> <message> - <location line="+3"/> <source>Classes for network programming</source> <translation type="unfinished"></translation> </message> <message> - <location line="+13"/> <source>QtOpenGL Module</source> <translation type="unfinished"></translation> </message> <message> - <location line="+3"/> <source>OpenGL support classes</source> <translation type="unfinished"></translation> </message> <message> - <location line="+13"/> <source>QtSql Module</source> <translation type="unfinished"></translation> </message> <message> - <location line="+3"/> <source>Classes for database integration using SQL</source> <translation type="unfinished"></translation> </message> <message> - <location line="+13"/> <source>QtScript Module</source> <translation type="unfinished"></translation> </message> <message> - <location line="+3"/> <source>Classes for evaluating Qt Scripts</source> <translation type="unfinished"></translation> </message> <message> - <location line="+13"/> <source>QtSvg Module</source> <translation type="unfinished"></translation> </message> <message> - <location line="+3"/> <source>Classes for displaying the contents of SVG files</source> <translation type="unfinished"></translation> </message> <message> - <location line="+13"/> <source>QtWebKit Module</source> <translation type="unfinished"></translation> </message> <message> - <location line="+3"/> <source>Classes for displaying and editing Web content</source> <translation type="unfinished"></translation> </message> <message> - <location line="+13"/> <source>QtXml Module</source> <translation type="unfinished"></translation> </message> <message> - <location line="+3"/> <source>Classes for handling XML</source> <translation type="unfinished"></translation> </message> <message> - <location line="+13"/> <source>QtXmlPatterns Module</source> <translation type="unfinished"></translation> </message> <message> - <location line="+3"/> <source>An XQuery/XPath engine for XML and custom data models</source> <translation type="unfinished"></translation> </message> <message> - <location line="+13"/> <source>Phonon Module</source> <translation type="unfinished"></translation> </message> <message> - <location line="+3"/> <source>Multimedia framework classes</source> <translation type="unfinished"></translation> </message> <message> - <location line="+13"/> <source>Qt3Support Module</source> <translation type="unfinished"></translation> </message> <message> - <location line="+3"/> <source>Classes that ease porting from Qt 3 to Qt 4</source> <translation type="unfinished"></translation> </message> <message> - <location line="+13"/> <source>QtTest Module</source> <translation type="unfinished"></translation> </message> <message> - <location line="+3"/> <source>Tool classes for unit testing</source> <translation type="unfinished"></translation> </message> <message> - <location line="+13"/> <source>QtDBus module</source> <translation type="unfinished"></translation> </message> <message> - <location line="+3"/> <source>Classes for Inter-Process Communication using the D-Bus</source> <translation type="unfinished"></translation> </message> - <message> - <location line="+15"/> - <source>Application</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+3"/> - <source>Create a standalone application</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+13"/> - <source>Dynamic Library</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+3"/> - <source>Create a dynamic library for usage in other applications</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+13"/> - <source>Static Library</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+3"/> - <source>Create a static library for usage in other applications</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+10"/> - <source>Add Operator</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+7"/> - <source>Remove Operator</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+7"/> - <source>Replace Operator</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+7"/> - <source>Set Operator</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+7"/> - <source>Unique Add Operator</source> - <translation type="unfinished"></translation> - </message> </context> <context> <name>Snippets::Internal::SnippetsPlugin</name> diff --git a/src/plugins/qt4projectmanager/qt4projectmanager.pro b/src/plugins/qt4projectmanager/qt4projectmanager.pro index 6e9f4d0e503..4c14965077c 100644 --- a/src/plugins/qt4projectmanager/qt4projectmanager.pro +++ b/src/plugins/qt4projectmanager/qt4projectmanager.pro @@ -31,7 +31,7 @@ HEADERS = qt4projectmanagerplugin.h \ deployhelper.h \ embeddedpropertiespage.h \ qt4runconfiguration.h \ - speinfo.h \ + qtmodulesinfo.h \ qt4projectconfigwidget.h \ qt4buildenvironmentwidget.h \ projectloadwizard.h \ @@ -64,7 +64,7 @@ SOURCES = qt4projectmanagerplugin.cpp \ deployhelper.cpp \ embeddedpropertiespage.cpp \ qt4runconfiguration.cpp \ - speinfo.cpp \ + qtmodulesinfo.cpp \ qt4projectconfigwidget.cpp \ qt4buildenvironmentwidget.cpp \ projectloadwizard.cpp \ diff --git a/src/plugins/qt4projectmanager/qtmodulesinfo.cpp b/src/plugins/qt4projectmanager/qtmodulesinfo.cpp new file mode 100644 index 00000000000..206fa60ca41 --- /dev/null +++ b/src/plugins/qt4projectmanager/qtmodulesinfo.cpp @@ -0,0 +1,160 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +**************************************************************************/ + +#include "qtmodulesinfo.h" +#include "qglobal.h" +#include <QtCore/QtDebug> +#include <QtCore/QString> +#include <QtCore/QHash> +#include <QtCore/QCoreApplication> + +using namespace Qt4ProjectManager::Internal; + +struct item +{ + const char * const config; + const QString name; + const QString description; + bool isDefault; +}; + +typedef QVector<const item*> itemVectorType; +typedef QHash<QString, const item*> itemHashType; + +const itemVectorType itemVector() +{ + static const struct item items[] = { + {"core", + QCoreApplication::translate("QtModulesInfo", "QtCore Module"), + QCoreApplication::translate("QtModulesInfo", "Core non-GUI classes used by other modules"), + true}, + {"gui", + QCoreApplication::translate("QtModulesInfo", "QtGui Module"), + QCoreApplication::translate("QtModulesInfo", "Graphical user interface components"), + true}, + {"network", + QCoreApplication::translate("QtModulesInfo", "QtNetwork Module"), + QCoreApplication::translate("QtModulesInfo", "Classes for network programming"), + false}, + {"opengl", + QCoreApplication::translate("QtModulesInfo", "QtOpenGL Module"), + QCoreApplication::translate("QtModulesInfo", "OpenGL support classes"), + false}, + {"sql", + QCoreApplication::translate("QtModulesInfo", "QtSql Module"), + QCoreApplication::translate("QtModulesInfo", "Classes for database integration using SQL"), + false}, + {"script", + QCoreApplication::translate("QtModulesInfo", "QtScript Module"), + QCoreApplication::translate("QtModulesInfo", "Classes for evaluating Qt Scripts"), + false}, + {"svg", + QCoreApplication::translate("QtModulesInfo", "QtSvg Module"), + QCoreApplication::translate("QtModulesInfo", "Classes for displaying the contents of SVG files"), + false}, + {"webkit", + QCoreApplication::translate("QtModulesInfo", "QtWebKit Module"), + QCoreApplication::translate("QtModulesInfo", "Classes for displaying and editing Web content"), + false}, + {"xml", + QCoreApplication::translate("QtModulesInfo", "QtXml Module"), + QCoreApplication::translate("QtModulesInfo", "Classes for handling XML"), + false}, + {"xmlpatterns", + QCoreApplication::translate("QtModulesInfo", "QtXmlPatterns Module"), + QCoreApplication::translate("QtModulesInfo", "An XQuery/XPath engine for XML and custom data models"), + false}, + {"phonon", + QCoreApplication::translate("QtModulesInfo", "Phonon Module"), + QCoreApplication::translate("QtModulesInfo", "Multimedia framework classes"), + false}, + {"qt3support", + QCoreApplication::translate("QtModulesInfo", "Qt3Support Module"), + QCoreApplication::translate("QtModulesInfo", "Classes that ease porting from Qt 3 to Qt 4"), + false}, + {"testlib", + QCoreApplication::translate("QtModulesInfo", "QtTest Module"), + QCoreApplication::translate("QtModulesInfo", "Tool classes for unit testing"), + false}, + {"dbus", + QCoreApplication::translate("QtModulesInfo", "QtDBus Module"), + QCoreApplication::translate("QtModulesInfo", "Classes for Inter-Process Communication using the D-Bus", + false)} + }; + const uint itemsCount = sizeof items / sizeof items[0]; + itemVectorType result; + result.reserve(itemsCount); + for (int i = 0; i < itemsCount; i++) + result.append(items + i); + return result; +} + +Q_GLOBAL_STATIC_WITH_INITIALIZER(itemVectorType, staticItemVector, { + *x = itemVector(); +}); + +Q_GLOBAL_STATIC_WITH_INITIALIZER(QStringList, staticModulesList, { + const itemVectorType * const itemVector = staticItemVector(); + for (int i = 0; i < itemVector->count(); i++) + x->append(QString::fromLatin1(itemVector->at(i)->config)); +}); + +Q_GLOBAL_STATIC_WITH_INITIALIZER(itemHashType, staticItemHash, { + const itemVectorType * const itemVector = staticItemVector(); + for (int i = 0; i < itemVector->count(); i++) + x->insert(QString::fromLatin1(itemVector->at(i)->config), itemVector->at(i)); +}); + +QStringList QtModulesInfo::modules() +{ + return *staticModulesList(); +} + +static inline const item *itemForModule(const QString &module) +{ + return staticItemHash()->value(module.toLatin1().data()); +} + +QString QtModulesInfo::moduleName(const QString &module) +{ + const item * const i = itemForModule(module); + return i?i->name:QString(); +} + +QString QtModulesInfo::moduleDescription(const QString &module) +{ + const item * const i = itemForModule(module); + return i?i->description:QString(); +} + +bool QtModulesInfo::moduleIsDefault(const QString &module) +{ + const item * const i = itemForModule(module); + return i?i->isDefault:false; +} diff --git a/src/plugins/qt4projectmanager/qtmodulesinfo.h b/src/plugins/qt4projectmanager/qtmodulesinfo.h new file mode 100644 index 00000000000..f4cc37f9a54 --- /dev/null +++ b/src/plugins/qt4projectmanager/qtmodulesinfo.h @@ -0,0 +1,49 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +**************************************************************************/ +#ifndef QTMODULESINFO_H +#define QTMODULESINFO_H + +#include <QtCore/QStringList> + +namespace Qt4ProjectManager { +namespace Internal { + +class QtModulesInfo +{ +public: + static QStringList modules(); + static QString moduleName(const QString &module); + static QString moduleDescription(const QString &module); + static bool moduleIsDefault(const QString &module); +}; + +} // namespace Internal +} // namespace Qt4ProjectManager + +#endif // QTMODULESINFO_H diff --git a/src/plugins/qt4projectmanager/speinfo.cpp b/src/plugins/qt4projectmanager/speinfo.cpp deleted file mode 100644 index 5dc02d1a0e7..00000000000 --- a/src/plugins/qt4projectmanager/speinfo.cpp +++ /dev/null @@ -1,362 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt Creator -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -**************************************************************************/ - -#include "speinfo.h" - -#include <QtCore/QCoreApplication> -#include <QtCore/QDebug> -#include <QtCore/QVariant> - -using namespace Qt4ProjectManager::Internal; - -bool SPEInfo::m_listsInitialized = false; -QList<SPEInfoItem*> SPEInfo::m_qtmoduleList; - -QHash<QPair<SPEInfoItem::InfoKind, QString> ,SPEInfoItem*> SPEInfo::m_itemHash; - -const QString SPEInfoItem::keyType("valuetype"); -const QString SPEInfoItem::valueFile("file"); -const QString SPEInfoItem::valuePath("path"); -const QString SPEInfoItem::keyIncludedByDefault("includedbydefault"); -const QString SPEInfoItem::keyImageFileName("imagefilename"); - -class InfoItemModulesCore : public SPEInfoItem -{ -public: - InfoItemModulesCore(): SPEInfoItem("core", QtModule) - { - m_data.insert(keyIncludedByDefault, true); - } - - QString name() const { return QCoreApplication::translate("SimpleProEditor", "QtCore Module"); } - QString description() const - { - return QCoreApplication::translate("SimpleProEditor", - "Core non-GUI classes used by other modules"); - } -}; - -class InfoItemModulesGui : public SPEInfoItem -{ -public: - InfoItemModulesGui(): SPEInfoItem("gui", QtModule) - { - m_data.insert(keyIncludedByDefault, true); - } - - QString name() const { return QCoreApplication::translate("SimpleProEditor", "QtGui Module"); } - QString description() const - { - return QCoreApplication::translate("SimpleProEditor", - "Graphical user interface components"); - } -}; - -class InfoItemModulesNetwork : public SPEInfoItem -{ -public: - InfoItemModulesNetwork(): SPEInfoItem("network", QtModule) - { - m_data.insert(keyIncludedByDefault, false); - } - - QString name() const { return QCoreApplication::translate("SimpleProEditor", "QtNetwork Module"); } - QString description() const - { - return QCoreApplication::translate("SimpleProEditor", - "Classes for network programming"); - } -}; - -class InfoItemModulesOpenGL : public SPEInfoItem -{ -public: - InfoItemModulesOpenGL(): SPEInfoItem("opengl", QtModule) - { - m_data.insert(keyIncludedByDefault, false); - } - - QString name() const { return QCoreApplication::translate("SimpleProEditor", "QtOpenGL Module"); } - QString description() const - { - return QCoreApplication::translate("SimpleProEditor", - "OpenGL support classes"); - } -}; - -class InfoItemModulesSql : public SPEInfoItem -{ -public: - InfoItemModulesSql(): SPEInfoItem("sql", QtModule) - { - m_data.insert(keyIncludedByDefault, false); - } - - QString name() const { return QCoreApplication::translate("SimpleProEditor", "QtSql Module"); } - QString description() const - { - return QCoreApplication::translate("SimpleProEditor", - "Classes for database integration using SQL"); - } -}; - -class InfoItemModulesScript : public SPEInfoItem -{ -public: - InfoItemModulesScript(): SPEInfoItem("script", QtModule) - { - m_data.insert(keyIncludedByDefault, false); - } - - QString name() const { return QCoreApplication::translate("SimpleProEditor", "QtScript Module"); } - QString description() const - { - return QCoreApplication::translate("SimpleProEditor", - "Classes for evaluating Qt Scripts"); - } -}; - -class InfoItemModulesSvg : public SPEInfoItem -{ -public: - InfoItemModulesSvg(): SPEInfoItem("svg", QtModule) - { - m_data.insert(keyIncludedByDefault, false); - } - - QString name() const { return QCoreApplication::translate("SimpleProEditor", "QtSvg Module"); } - QString description() const - { - return QCoreApplication::translate("SimpleProEditor", - "Classes for displaying the contents of SVG files"); - } -}; - -class InfoItemModulesWebKit : public SPEInfoItem -{ -public: - InfoItemModulesWebKit(): SPEInfoItem("webkit", QtModule) - { - m_data.insert(keyIncludedByDefault, false); - } - - QString name() const { return QCoreApplication::translate("SimpleProEditor", "QtWebKit Module"); } - QString description() const - { - return QCoreApplication::translate("SimpleProEditor", - "Classes for displaying and editing Web content"); - } -}; - -class InfoItemModulesXml : public SPEInfoItem -{ -public: - InfoItemModulesXml(): SPEInfoItem("xml", QtModule) - { - m_data.insert(keyIncludedByDefault, false); - } - - QString name() const { return QCoreApplication::translate("SimpleProEditor", "QtXml Module"); } - QString description() const - { - return QCoreApplication::translate("SimpleProEditor", - "Classes for handling XML"); - } -}; - -class InfoItemModulesXmlPatterns : public SPEInfoItem -{ -public: - InfoItemModulesXmlPatterns(): SPEInfoItem("xmlpatterns", QtModule) - { - m_data.insert(keyIncludedByDefault, false); - } - - QString name() const { return QCoreApplication::translate("SimpleProEditor", "QtXmlPatterns Module"); } - QString description() const - { - return QCoreApplication::translate("SimpleProEditor", - "An XQuery/XPath engine for XML and custom data models"); - } -}; - -class InfoItemModulesPhonon : public SPEInfoItem -{ -public: - InfoItemModulesPhonon(): SPEInfoItem("phonon", QtModule) - { - m_data.insert(keyIncludedByDefault, false); - } - - QString name() const { return QCoreApplication::translate("SimpleProEditor", "Phonon Module"); } - QString description() const - { - return QCoreApplication::translate("SimpleProEditor", - "Multimedia framework classes"); - } -}; - -class InfoItemModulesQt3Support : public SPEInfoItem -{ -public: - InfoItemModulesQt3Support(): SPEInfoItem("qt3support", QtModule) - { - m_data.insert(keyIncludedByDefault, false); - } - - QString name() const { return QCoreApplication::translate("SimpleProEditor", "Qt3Support Module"); } - QString description() const - { - return QCoreApplication::translate("SimpleProEditor", - "Classes that ease porting from Qt 3 to Qt 4"); - } -}; - -class InfoItemModulesTest : public SPEInfoItem -{ -public: - InfoItemModulesTest(): SPEInfoItem("testlib", QtModule) - { - m_data.insert(keyIncludedByDefault, false); - } - - QString name() const { return QCoreApplication::translate("SimpleProEditor", "QtTest Module"); } - QString description() const - { - return QCoreApplication::translate("SimpleProEditor", - "Tool classes for unit testing"); - } -}; - -class InfoItemModulesDBus : public SPEInfoItem -{ -public: - InfoItemModulesDBus(): SPEInfoItem("dbus", QtModule) - { - m_data.insert(keyIncludedByDefault, false); - } - - QString name() const { return QCoreApplication::translate("SimpleProEditor", "QtDBus module"); } - QString description() const - { - return QCoreApplication::translate("SimpleProEditor", - "Classes for Inter-Process Communication using the D-Bus"); - } -}; - -SPEInfoItem::SPEInfoItem(const QString &id, InfoKind kind) -: m_id(id) -, m_infoKind(kind) -, m_parentItem(0) -{ -} - -QString SPEInfoItem::name() const -{ - return ""; -} - -QString SPEInfoItem::description() const -{ - return ""; -} - -QVariant SPEInfoItem::data(const QString &key) const -{ - return m_data.value(key); -} - -QString SPEInfoItem::id() const -{ - return m_id; -} - -SPEInfoItem::InfoKind SPEInfoItem::infoKind() const -{ - return m_infoKind; -} - -SPEInfo::~SPEInfo() -{ - deleteLists(); -} - -const QList<SPEInfoItem*> *SPEInfo::qtModulesList() -{ - if (!m_listsInitialized) - initializeLists(); - return &m_qtmoduleList; -} - -void SPEInfo::addListToHash(const QList<SPEInfoItem*> &list) -{ - foreach (SPEInfoItem *item, list) - m_itemHash.insert(qMakePair(item->infoKind(), item->id()), item); -} - -void SPEInfo::initializeLists() -{ - m_qtmoduleList - << new InfoItemModulesCore - << new InfoItemModulesGui - << new InfoItemModulesNetwork - << new InfoItemModulesOpenGL - << new InfoItemModulesScript - << new InfoItemModulesSql - << new InfoItemModulesSvg - << new InfoItemModulesWebKit - << new InfoItemModulesXml - << new InfoItemModulesXmlPatterns - << new InfoItemModulesPhonon - << new InfoItemModulesQt3Support - << new InfoItemModulesTest - << new InfoItemModulesDBus; - addListToHash(m_qtmoduleList); - - m_listsInitialized = true; -} - -void SPEInfo::deleteLists() -{ - m_itemHash.clear(); - - qDeleteAll(m_qtmoduleList); - m_qtmoduleList.clear(); - - m_listsInitialized = false; -} - -const SPEInfoItem *SPEInfo::infoOfKindForId(SPEInfoItem::InfoKind kind, - const QString &id, const SPEInfoItem *defaultInfoItem) -{ - QPair<SPEInfoItem::InfoKind, QString > keyPair = qMakePair(kind, id); - return m_itemHash.contains(keyPair)?m_itemHash.value(keyPair):defaultInfoItem; -} - -static SPEInfo speInfoInstance; // it's destructor will call deleteLists() diff --git a/src/plugins/qt4projectmanager/speinfo.h b/src/plugins/qt4projectmanager/speinfo.h deleted file mode 100644 index b287697ef2e..00000000000 --- a/src/plugins/qt4projectmanager/speinfo.h +++ /dev/null @@ -1,96 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt Creator -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -**************************************************************************/ - -#ifndef SIMPLEPROEDITORINFO_H -#define SIMPLEPROEDITORINFO_H - -#include <QtCore/QHash> -#include <QtCore/QVariant> -#include <QtGui/QPixmap> - -namespace Qt4ProjectManager { -namespace Internal { - -class SPEInfoItem -{ -public: - enum InfoKind { - QtModule - }; - - SPEInfoItem(const QString &id, InfoKind kind); - virtual ~SPEInfoItem() {} - - QString id() const; - InfoKind infoKind() const; - virtual QString name() const; - virtual QString description() const; - QVariant data(const QString &key) const; - - static const QString keyType; - static const QString valueFile; - static const QString valuePath; - static const QString keyIncludedByDefault; - static const QString keyImageFileName; - -protected: - QHash<QString, QVariant> m_data; - -private: - QString m_id; - InfoKind m_infoKind; - QPixmap m_image; - const class SPEInfoItem *m_parentItem; -}; - -class SPEInfo -{ -public: - ~SPEInfo(); - - static const QList<SPEInfoItem*> *qtModulesList(); - static const SPEInfoItem *infoOfKindForId(SPEInfoItem::InfoKind kind, - const QString &id, const SPEInfoItem *defaultInfoItem = NULL); - -private: - static void addListToHash(const QList<SPEInfoItem*> &list); - static void initializeLists(); - static void deleteLists(); - - static QList<SPEInfoItem*> m_qtmoduleList; - - static QHash<QPair<SPEInfoItem::InfoKind, QString> ,SPEInfoItem* > m_itemHash; - - static bool m_listsInitialized; -}; - -} // namespace Internal -} // namespace Qt4ProjectManager - -#endif // SIMPLEPROEDITORINFO_H diff --git a/src/plugins/qt4projectmanager/wizards/modulespage.cpp b/src/plugins/qt4projectmanager/wizards/modulespage.cpp index 6a517c84e9a..639f6c6d7f0 100644 --- a/src/plugins/qt4projectmanager/wizards/modulespage.cpp +++ b/src/plugins/qt4projectmanager/wizards/modulespage.cpp @@ -29,11 +29,12 @@ #include "modulespage.h" -#include "speinfo.h" +#include "qtmodulesinfo.h" #include <utils/qtcassert.h> #include <QtCore/QDebug> +#include <QtCore/QVariant> #include <QtGui/QCheckBox> #include <QtGui/QLabel> @@ -58,19 +59,19 @@ ModulesPage::ModulesPage(QWidget *parent) QGridLayout *layout = new QGridLayout; - const QList<SPEInfoItem*> infoItemsList = *SPEInfo::qtModulesList(); - int itemId = 0; - int rowsCount = (infoItemsList.count() + 1) / 2; - foreach (const SPEInfoItem *infoItem, infoItemsList) { - QCheckBox *moduleCheckBox = new QCheckBox(infoItem->name()); - moduleCheckBox->setToolTip(infoItem->description()); - moduleCheckBox->setWhatsThis(infoItem->description()); - registerField(infoItem->id(), moduleCheckBox); - int row = itemId % rowsCount; - int column = itemId / rowsCount; + const QStringList &modulesList = QtModulesInfo::modules(); + int moduleId = 0; + int rowsCount = (modulesList.count() + 1) / 2; + foreach (const QString &module, modulesList) { + QCheckBox *moduleCheckBox = new QCheckBox(QtModulesInfo::moduleName(module)); + moduleCheckBox->setToolTip(QtModulesInfo::moduleDescription(module)); + moduleCheckBox->setWhatsThis(QtModulesInfo::moduleDescription(module)); + registerField(module, moduleCheckBox); + int row = moduleId % rowsCount; + int column = moduleId / rowsCount; layout->addWidget(moduleCheckBox, row, column); - m_moduleCheckBoxMap[infoItem->id()] = moduleCheckBox; - itemId++; + m_moduleCheckBoxMap[module] = moduleCheckBox; + moduleId++; } vlayout->addLayout(layout); @@ -80,10 +81,10 @@ ModulesPage::ModulesPage(QWidget *parent) // Return the key that goes into the Qt config line for a module QString ModulesPage::idOfModule(const QString &module) { - const QList<SPEInfoItem*> infoItemsList = *SPEInfo::qtModulesList(); - foreach (const SPEInfoItem *infoItem, infoItemsList) - if (infoItem->name().startsWith(module)) - return infoItem->id(); + const QStringList &moduleIdList = QtModulesInfo::modules(); + foreach (const QString &id, moduleIdList) + if (QtModulesInfo::moduleName(id).startsWith(module)) + return id; return QString(); } @@ -114,13 +115,10 @@ void ModulesPage::setModuleEnabled(const QString &module, bool enabled) const QString ModulesPage::modules(bool selected) const { QStringList modules; - - const QList<SPEInfoItem*> infoItemsList = *SPEInfo::qtModulesList(); - foreach (const SPEInfoItem *infoItem, infoItemsList) { - if (selected != infoItem->data(SPEInfoItem::keyIncludedByDefault).toBool() - && selected == field(infoItem->id()).toBool()) - modules << infoItem->id(); + foreach (const QString &module, QtModulesInfo::modules()) { + if (selected != QtModulesInfo::moduleIsDefault(module) + && selected == field(module).toBool()) + modules << module; } - return modules.join(QString(QLatin1Char(' '))); } -- GitLab