summaryrefslogtreecommitdiffstats
path: root/languages/cpp/cppsupportpart.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /languages/cpp/cppsupportpart.h
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz
tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/cpp/cppsupportpart.h')
-rw-r--r--languages/cpp/cppsupportpart.h232
1 files changed, 116 insertions, 116 deletions
diff --git a/languages/cpp/cppsupportpart.h b/languages/cpp/cppsupportpart.h
index e01d5115..fecfe2d1 100644
--- a/languages/cpp/cppsupportpart.h
+++ b/languages/cpp/cppsupportpart.h
@@ -21,25 +21,25 @@
#include <kdevcore.h>
#include <kdevlanguagesupport.h>
-#include <qthread.h>
-#include <qmutex.h>
-#include <qtimer.h>
+#include <tqthread.h>
+#include <tqmutex.h>
+#include <tqtimer.h>
#include <kdialogbase.h>
-#include <qguardedptr.h>
-#include <qstring.h>
-#include <qwaitcondition.h>
-#include <qdatetime.h>
-#include <qdir.h>
-#include <qprogressbar.h>
+#include <tqguardedptr.h>
+#include <tqstring.h>
+#include <tqwaitcondition.h>
+#include <tqdatetime.h>
+#include <tqdir.h>
+#include <tqprogressbar.h>
#include <kdebug.h>
#include <ext/hash_map>
#include "driver.h"
///A class that helps detecting what exactly makes the UI block. To use it, just place a breakpoint on UIBlockTester::lockup() and inspect the execution-position of the main thread
-class UIBlockTester : public QObject {
+class UIBlockTester : public TQObject {
Q_OBJECT
- class UIBlockTesterThread : public QThread {
+ class UIBlockTesterThread : public TQThread {
public:
UIBlockTesterThread( UIBlockTester& parent );
void run();
@@ -63,9 +63,9 @@ protected:
private:
UIBlockTesterThread m_thread;
- QDateTime m_lastTime;
- QMutex m_timeMutex;
- QTimer * m_timer;
+ TQDateTime m_lastTime;
+ TQMutex m_timeMutex;
+ TQTimer * m_timer;
uint m_msecs;
};
@@ -113,42 +113,42 @@ public:
bool isEmpty() const
{
- QMutexLocker locker( &m_mutex );
+ TQMutexLocker locker( &m_mutex );
return m_fileSet.empty();
}
uint count() const
{
- QMutexLocker locker( &m_mutex );
+ TQMutexLocker locker( &m_mutex );
return m_fileSet.size();
}
void clear()
{
- QMutexLocker locker( &m_mutex );
+ TQMutexLocker locker( &m_mutex );
m_fileSet.clear();
}
void setFiles( const SetType& files ) {
- QMutexLocker locker( &m_mutex );
+ TQMutexLocker locker( &m_mutex );
m_fileSet = files;
}
void insert( const HashedString& str )
{
- HashedString s( QString::fromUtf8(str.str().utf8()) );
- QMutexLocker locker( &m_mutex );
+ HashedString s( TQString::fromUtf8(str.str().utf8()) );
+ TQMutexLocker locker( &m_mutex );
m_fileSet.insert( s );
}
bool contains( const HashedString& str ) const {
- QMutexLocker locker( &m_mutex );
+ TQMutexLocker locker( &m_mutex );
return m_fileSet.find( str ) != m_fileSet.end();
}
private:
- mutable QMutex m_mutex;
+ mutable TQMutex m_mutex;
SetType m_fileSet;
};
@@ -157,7 +157,7 @@ class CppSupportPart : public KDevLanguageSupport
Q_OBJECT
public:
- CppSupportPart( QObject *parent, const char *name, const QStringList &args );
+ CppSupportPart( TQObject *parent, const char *name, const TQStringList &args );
virtual ~CppSupportPart();
bool isValid() const
@@ -165,7 +165,7 @@ public:
return m_valid;
}
- QString specialHeaderName( bool local = false ) const;
+ TQString specialHeaderName( bool local = false ) const;
void updateParserConfiguration();
void updateBackgroundParserConfig();
@@ -178,8 +178,8 @@ public:
}
/** parses the file and all files that belong to it using the background-parser */
- int parseFileAndDependencies( const QString& fileName, bool background = true, bool parseFirst = false, bool silent = false );
- int parseFilesAndDependencies( QStringList files, bool background = true, bool parseFirst = false, bool silent = false );
+ int parseFileAndDependencies( const TQString& fileName, bool background = true, bool parseFirst = false, bool silent = false );
+ int parseFilesAndDependencies( TQStringList files, bool background = true, bool parseFirst = false, bool silent = false );
BackgroundParser* backgroundParser() const
{
@@ -208,19 +208,19 @@ public:
*/
inline QtBuildConfig* qtBuildConfig() const { return m_qtBuildConfig; }
- const QPtrList<Catalog>& catalogList() const
+ const TQPtrList<Catalog>& catalogList() const
{
return m_catalogList;
}
void addCatalog( Catalog* catalog );
- void removeCatalog( const QString& dbName );
+ void removeCatalog( const TQString& dbName );
- bool isValidSource( const QString& fileName ) const;
+ bool isValidSource( const TQString& fileName ) const;
- virtual void customEvent( QCustomEvent* ev );
+ virtual void customEvent( TQCustomEvent* ev );
- virtual QStringList subclassWidget( const QString& formName );
- virtual QStringList updateWidget( const QString& formName, const QString& fileName );
+ virtual TQStringList subclassWidget( const TQString& formName );
+ virtual TQStringList updateWidget( const TQString& formName, const TQString& fileName );
FunctionDefinitionDom currentFunctionDefinition();
FunctionDefinitionDom functionDefinitionAt( int line, int column );
@@ -229,17 +229,17 @@ public:
KTextEditor::Document* findDocument( const KURL& url );
static KConfig *config();
- virtual QString formatTag( const Tag& tag );
- virtual QString formatModelItem( const CodeModelItem *item, bool shortDescription = false );
+ virtual TQString formatTag( const Tag& tag );
+ virtual TQString formatModelItem( const CodeModelItem *item, bool shortDescription = false );
virtual void addClass();
- QString extractInterface( const ClassDom& klass );
+ TQString extractInterface( const ClassDom& klass );
- bool isHeader( const QString& fileName ) const;
- bool isSource( const QString& fileName ) const;
+ bool isHeader( const TQString& fileName ) const;
+ bool isSource( const TQString& fileName ) const;
//uses the old simple algorithm to find the header
- QString findHeaderSimple( const QString &header );
+ TQString findHeaderSimple( const TQString &header );
virtual KDevDesignerIntegration *designer( KInterfaceDesigner::DesignerType type );
@@ -251,7 +251,7 @@ public:
* @param name The name of the method.
* @param type The return type of the method.
* @param parameters A string containing the parameters
- * (including names, default values, but no '(' , ')', e.g.: "int, const QString& aString").
+ * (including names, default values, but no '(' , ')', e.g.: "int, const TQString& aString").
* @param accessType The access specifier e.g. CodeModelItem::PUBLIC.
* @param isConst true if method is const.
* @param isInline true if method should be declared inline.
@@ -260,12 +260,12 @@ public:
* @param implementation a optional implementation, if this is not set the method body will be empty.
* @author Jonas Jacobi <j.jacobi@gmx.de>
*/
- virtual void addMethod( ClassDom aClass, const QString& name, const QString type, const QString& parameters, CodeModelItem::Access accessType, bool isConst, bool isInline, bool isVirtual, bool isPureVirtual, const QString& implementation = "" );
+ virtual void addMethod( ClassDom aClass, const TQString& name, const TQString type, const TQString& parameters, CodeModelItem::Access accessType, bool isConst, bool isInline, bool isVirtual, bool isPureVirtual, const TQString& implementation = "" );
void createAccessMethods( ClassDom theClass, VariableDom theVariable );
- bool isQueued( const QString& file ) const;
- bool switchHeaderImpl( const QString& file, int line, int col, bool scrollOnly = false );
+ bool isQueued( const TQString& file ) const;
+ bool switchHeaderImpl( const TQString& file, int line, int col, bool scrollOnly = false );
const Driver* driver() const;
@@ -275,17 +275,17 @@ public:
const SynchronizedFileSet& safeFileSet() const;
SynchronizedFileSet& safeFileSet();
signals:
- void fileParsed( const QString& fileName );
+ void fileParsed( const TQString& fileName );
///Emitted whenever a file was parsed, but the code-model could be updated(the file in the code-model did not have to be replaced)
- void codeModelUpdated( const QString& fileName );
+ void codeModelUpdated( const TQString& fileName );
///Emitted whenever a translation-unit was parsed in the main thread
- void synchronousParseReady( const QString& file, ParsedFilePointer unit );
+ void synchronousParseReady( const TQString& file, ParsedFilePointer unit );
protected:
virtual KDevLanguageSupport::Features features();
virtual KMimeType::List mimeTypes();
- virtual QString formatClassName( const QString &name );
- virtual QString unformatClassName( const QString &name );
+ virtual TQString formatClassName( const TQString &name );
+ virtual TQString unformatClassName( const TQString &name );
virtual bool shouldSplitDocument( const KURL &url );
virtual Qt::Orientation splitOrientation() const;
virtual void addMethod( ClassDom klass );
@@ -299,15 +299,15 @@ private slots:
void savedFile( const KURL &fileName );
void configWidget( KDialogBase *dlg );
void projectConfigWidget( KDialogBase *dlg );
- void contextMenu( QPopupMenu *popup, const Context *context );
- void addedFilesToProject( const QStringList &fileList );
- void removedFilesFromProject( const QStringList &fileList );
- void changedFilesInProject( const QStringList & fileList );
+ void contextMenu( TQPopupMenu *popup, const Context *context );
+ void addedFilesToProject( const TQStringList &fileList );
+ void removedFilesFromProject( const TQStringList &fileList );
+ void changedFilesInProject( const TQStringList & fileList );
void slotProjectCompiled();
void setupCatalog();
void codeCompletionConfigStored();
void splitHeaderSourceConfigStored();
- // void recomputeCodeModel( const QString& fileName );
+ // void recomputeCodeModel( const TQString& fileName );
void slotNavigate();
void slotNewClass();
void slotSwitchHeader( bool scrollOnly = false );
@@ -318,7 +318,7 @@ private slots:
// void slotFunctionHint();
void gotoLine( int line );
void gotoDeclarationLine( int line );
- void emitFileParsed( QStringList l );
+ void emitFileParsed( TQStringList l );
void slotParseFiles();
void slotCreateSubclass();
void slotCreateAccessMethods();
@@ -331,7 +331,7 @@ private slots:
void removeProblemReporter();
- void slotNeedTextHint( int, int, QString& );
+ void slotNeedTextHint( int, int, TQString& );
/**
* loads, parses and creates both classstores needed
@@ -381,31 +381,31 @@ private:
/**
* checks if a file has to be parsed
*/
- FileDom fileByName( const QString& name);
- void maybeParse( const QString& fileName, bool background = true );
- void removeWithReferences( const QString& fileName );
+ FileDom fileByName( const TQString& name);
+ void maybeParse( const TQString& fileName, bool background = true );
+ void removeWithReferences( const TQString& fileName );
void createIgnorePCSFile();
- void MakeMemberHelper( QString& text, int& atline, int& atcol );
+ void MakeMemberHelper( TQString& text, int& atline, int& atcol );
- QString sourceOrHeaderCandidate( const KURL &url = KURL() );
+ TQString sourceOrHeaderCandidate( const KURL &url = KURL() );
FunctionDom findFunction( const FunctionDom& def );
FunctionDom findFunctionInNamespace( const NamespaceDom& ns, const FunctionDom& def, const std::set<NamespaceImportModel>& nsImports,
- const QString& candidateFile, int scopeIndex, FunctionDom& bestMatch );
+ const TQString& candidateFile, int scopeIndex, FunctionDom& bestMatch );
FunctionDom findFunctionInClass( const ClassDom& cs, const FunctionDom& def, const std::set<NamespaceImportModel>& nsImports,
- const QString& candidateFile, int scopeIndex, FunctionDom& bestMatch );
+ const TQString& candidateFile, int scopeIndex, FunctionDom& bestMatch );
FunctionDom findFunctionDefinition( const FunctionDom& decl );
void jumpToCodeModelItem( const ItemDom& item, bool scrollOnly );
- QStringList modifiedFileList();
- QString findSourceFile();
+ TQStringList modifiedFileList();
+ TQString findSourceFile();
int pcsVersion();
void setPcsVersion( int version );
void saveProjectSourceInfo();
- QStringList reorder( const QStringList& list );
+ TQStringList reorder( const TQStringList& list );
CppCodeCompletion* m_pCompletion;
CppCodeCompletionConfig* m_pCompletionConfig;
@@ -418,11 +418,11 @@ private:
QtBuildConfig* m_qtBuildConfig;
bool withcpp;
- QString m_contextFileName;
+ TQString m_contextFileName;
VariableDom m_curAttribute;
ClassDom m_curClass;
- QGuardedPtr< ProblemReporter > m_problemReporter;
+ TQGuardedPtr< ProblemReporter > m_problemReporter;
BackgroundParser* m_backgroundParser;
UIBlockTester* m_lockupTester;
@@ -431,36 +431,36 @@ private:
KTextEditor::SelectionInterface* m_activeSelection;
KTextEditor::EditInterface* m_activeEditor;
KTextEditor::ViewCursorInterface* m_activeViewCursor;
- QString m_activeFileName;
+ TQString m_activeFileName;
- QMap<KInterfaceDesigner::DesignerType, KDevDesignerIntegration*> m_designers;
+ TQMap<KInterfaceDesigner::DesignerType, KDevDesignerIntegration*> m_designers;
- QWaitCondition m_eventConsumed;
+ TQWaitCondition m_eventConsumed;
bool m_projectClosed;
bool m_projectClosing;
- QMap<QString, QDateTime> m_timestamp;
+ TQMap<TQString, TQDateTime> m_timestamp;
bool m_valid;
bool m_isTyping;
bool m_hadErrors; ///Whether there were already errors when the user started typing
- QPtrList<Catalog> m_catalogList;
+ TQPtrList<Catalog> m_catalogList;
Driver* m_driver;
- QString m_projectDirectory;
- QStringList m_projectFileList;
+ TQString m_projectDirectory;
+ TQStringList m_projectFileList;
ClassDom m_activeClass;
FunctionDom m_activeFunction;
VariableDom m_activeVariable;
- QGuardedPtr<KPopupMenu> m_navigationMenu;
+ TQGuardedPtr<KPopupMenu> m_navigationMenu;
-// QTimer* m_functionHintTimer;
-// QTimer* m_deleteParserStoreTimer;
- QTimer* m_saveMemoryTimer;
- QTimer * m_textChangedTimer;
- QTimer * m_cursorMovedTimer;
- QTimer* m_buildSafeFileSetTimer;
+// TQTimer* m_functionHintTimer;
+// TQTimer* m_deleteParserStoreTimer;
+ TQTimer* m_saveMemoryTimer;
+ TQTimer * m_textChangedTimer;
+ TQTimer * m_cursorMovedTimer;
+ TQTimer* m_buildSafeFileSetTimer;
class ParseEmitWaiting {
public:
@@ -472,23 +472,23 @@ private:
};
private:
struct Item {
- QStringList first;
- QStringList second;
+ TQStringList first;
+ TQStringList second;
Flags flags;
Item() : flags(None) {
}
- Item( QStringList f, QStringList s, Flags fl = None ) : first( f ), second( s ), flags( fl )
+ Item( TQStringList f, TQStringList s, Flags fl = None ) : first( f ), second( s ), flags( fl )
{
}
};
- //typedef QPair<QStringList, QStringList> Item; ///The files we are waiting fore, and the files we already got
- typedef QValueList< Item > List;
+ //typedef QPair<TQStringList, TQStringList> Item; ///The files we are waiting fore, and the files we already got
+ typedef TQValueList< Item > List;
List m_waiting;
- QStringList harvestUntil( List::iterator targIt ) {
+ TQStringList harvestUntil( List::iterator targIt ) {
List::iterator it = m_waiting.begin();
- QStringList ret;
+ TQStringList ret;
while( it != targIt && it != m_waiting.end() ) {
ret += (*it).first;
it = m_waiting.erase( it );
@@ -497,18 +497,18 @@ private:
}
public:
- void addGroup( QStringList& files, Flags flag = None ) {
- m_waiting << Item(files, QStringList(), flag);
+ void addGroup( TQStringList& files, Flags flag = None ) {
+ m_waiting << Item(files, TQStringList(), flag);
}
- void addGroupFront( QStringList& files, Flags flag = None ) {
- m_waiting.push_front( Item(files, QStringList(), flag) );
+ void addGroupFront( TQStringList& files, Flags flag = None ) {
+ m_waiting.push_front( Item(files, TQStringList(), flag) );
}
void clear() {
m_waiting.clear();
}
///files that were not requested must not be processed, since they maybe do not respect the group-relationships.
- bool reject( QString file ) {
+ bool reject( TQString file ) {
for( List::iterator it = m_waiting.begin(); it != m_waiting.end(); ++it) {
if( (*it).first.find( file ) != (*it).first.end() ) {
return false;
@@ -517,7 +517,7 @@ private:
return true;
}
- bool waiting( QString file, Flags forbidFlags = None, int count = 1 ) const {
+ bool waiting( TQString file, Flags forbidFlags = None, int count = 1 ) const {
int hits = 0;
for( List::const_iterator it = m_waiting.begin(); it != m_waiting.end(); ++it) {
if( (*it).first.find( file ) != (*it).first.end() ) {
@@ -531,13 +531,13 @@ private:
}
struct Processed {
- QStringList res;
+ TQStringList res;
Flags flag;
Processed() : flag(None) {
}
- Processed(const QStringList& l , Flags f = None ) : res( l ), flag( f ) {
+ Processed(const TQStringList& l , Flags f = None ) : res( l ), flag( f ) {
}
- operator QStringList() {
+ operator TQStringList() {
return res;
}
@@ -559,8 +559,8 @@ private:
private:
///Just return all files that have been parsed
- Processed errorRecover( QString currentFile ) {
- QStringList ret;
+ Processed errorRecover( TQString currentFile ) {
+ TQStringList ret;
kdDebug( 9007 ) << "ParseEmitWaiting: error in the waiting-chain" << endl;
for( List::iterator it = m_waiting.begin(); it != m_waiting.end(); ++it) {
ret += (*it).second;
@@ -572,8 +572,8 @@ private:
public:
///returns the parsed-messages that should be emitted
- Processed processFile( QString file, Flags flag = None ) {
- QStringList ret;
+ Processed processFile( TQString file, Flags flag = None ) {
+ TQStringList ret;
for( List::iterator it = m_waiting.begin(); it != m_waiting.end(); ++it) {
if( (*it).first.find( file ) != (*it).first.end() ) {
if( (*it).second.find( file ) == (*it).second.end() ) {
@@ -588,7 +588,7 @@ private:
return Processed( harvestUntil( ++it ), f );
} else {
///The file was registered, now wait for the next
- return QStringList();
+ return TQStringList();
}
} else {
///The file has already been parsed
@@ -615,37 +615,37 @@ private:
SynchronizedFileSet m_safeProjectFiles;
BackgroundParserConfig * m_backgroundParserConfig;
- static QStringList m_sourceMimeTypes;
- static QStringList m_headerMimeTypes;
+ static TQStringList m_sourceMimeTypes;
+ static TQStringList m_headerMimeTypes;
- static QStringList m_sourceExtensions;
- static QStringList m_headerExtensions;
+ static TQStringList m_sourceExtensions;
+ static TQStringList m_headerExtensions;
friend class KDevCppSupportIface;
friend class CppDriver;
// we need something to plug actions that are not in any menu
// into in order for their shortcuts to work
- QWidget m_DummyActionWidget;
+ TQWidget m_DummyActionWidget;
void addToRepository( ParsedFilePointer );
- void emitSynchronousParseReady( const QString& file, ParsedFilePointer unit );
+ void emitSynchronousParseReady( const TQString& file, ParsedFilePointer unit );
struct JobData
{
- QDir dir;
- QGuardedPtr<QProgressBar> progressBar;
- QStringList::Iterator it;
- QStringList files;
+ TQDir dir;
+ TQGuardedPtr<TQProgressBar> progressBar;
+ TQStringList::Iterator it;
+ TQStringList files;
int cycle;
int backgroundCount;
int lastBackgroundState;
int backgroundState;
- QStringList reparseList;
- QMap< QString, QPair<uint, uint> > pcs;
- QDataStream stream;
- QFile file;
- QTime lastParse;
+ TQStringList reparseList;
+ TQMap< TQString, QPair<uint, uint> > pcs;
+ TQDataStream stream;
+ TQFile file;
+ TQTime lastParse;
~JobData()
{