diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
commit | d6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch) | |
tree | d109539636691d7b03036ca1c0ed29dbae6577cf /languages/cpp/qtbuildconfig.cpp | |
parent | 3331a47a9cad24795c7440ee8107143ce444ef34 (diff) | |
download | tdevelop-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/qtbuildconfig.cpp')
-rw-r--r-- | languages/cpp/qtbuildconfig.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/languages/cpp/qtbuildconfig.cpp b/languages/cpp/qtbuildconfig.cpp index f2972fdd..46fa7897 100644 --- a/languages/cpp/qtbuildconfig.cpp +++ b/languages/cpp/qtbuildconfig.cpp @@ -21,14 +21,14 @@ #include <domutil.h> #include <kdebug.h> -#include <qdom.h> +#include <tqdom.h> #include <stdlib.h> -const QString QtBuildConfig::m_configRoot = QString( "/kdevcppsupport/qt" ); +const TQString QtBuildConfig::m_configRoot = TQString( "/kdevcppsupport/qt" ); -QtBuildConfig::QtBuildConfig( CppSupportPart * part, QDomDocument* dom ) - : QObject( part ), m_part( part ), m_dom( dom ) +QtBuildConfig::QtBuildConfig( CppSupportPart * part, TQDomDocument* dom ) + : TQObject( part ), m_part( part ), m_dom( dom ) { init(); } @@ -61,13 +61,13 @@ void QtBuildConfig::init( ) } if( m_qmakePath.isEmpty() || !isExecutable( m_qmakePath ) ) { - m_qmakePath = findExecutable( "qmake-qt"+ QString::number( m_version ) ); + m_qmakePath = findExecutable( "qmake-qt"+ TQString::number( m_version ) ); if( m_qmakePath.isEmpty() || !isExecutable( m_qmakePath ) ) m_qmakePath = findExecutable( "qmake" ); } if( m_designerPath.isEmpty() || !isExecutable( m_designerPath ) ) { - m_designerPath = findExecutable( "designer-qt"+QString::number( m_version ) ); + m_designerPath = findExecutable( "designer-qt"+TQString::number( m_version ) ); if( m_designerPath.isEmpty() || !isExecutable( m_designerPath ) ) m_designerPath = findExecutable( "designer" ); } @@ -83,45 +83,45 @@ void QtBuildConfig::init( ) } } -bool QtBuildConfig::isValidQtDir( const QString& path ) const +bool QtBuildConfig::isValidQtDir( const TQString& path ) const { - QFileInfo inc( path + QString( QChar( QDir::separator() ) )+ - "include"+QString( QChar( QDir::separator() ) )+ - "qt.h" ); + TQFileInfo inc( path + TQString( TQChar( TQDir::separator() ) )+ + "include"+TQString( TQChar( TQDir::separator() ) )+ + "tqt.h" ); return ( m_version == 4 || ( m_version != 4 && inc.exists() ) ); } -void QtBuildConfig::buildBinDirs( QStringList & dirs ) const +void QtBuildConfig::buildBinDirs( TQStringList & dirs ) const { if( m_version == 3 ) { if( !m_root.isEmpty() ) - dirs << (m_root + QString( QChar( QDir::separator() ) ) + "bin"); - dirs << (::getenv("QTDIR") + QString( QChar( QDir::separator() ) ) + "bin"); + dirs << (m_root + TQString( TQChar( TQDir::separator() ) ) + "bin"); + dirs << (::getenv("QTDIR") + TQString( TQChar( TQDir::separator() ) ) + "bin"); } - QStringList paths = QStringList::split(":",::getenv("PATH")); + TQStringList paths = TQStringList::split(":",::getenv("PATH")); dirs += paths; - QString binpath = QDir::rootDirPath() + "bin"; + TQString binpath = TQDir::rootDirPath() + "bin"; if( dirs.findIndex( binpath ) != -1 ) dirs << binpath; - binpath = QDir::rootDirPath() + "usr" + QString( QChar( QDir::separator() ) ) + "bin"; + binpath = TQDir::rootDirPath() + "usr" + TQString( TQChar( TQDir::separator() ) ) + "bin"; if( dirs.findIndex( binpath ) != -1 ) dirs << binpath; - binpath = QDir::rootDirPath() + "usr" + QString( QChar( QDir::separator() ) ) + "local" + QString( QChar( QDir::separator() ) ) + "bin"; + binpath = TQDir::rootDirPath() + "usr" + TQString( TQChar( TQDir::separator() ) ) + "local" + TQString( TQChar( TQDir::separator() ) ) + "bin"; if( dirs.findIndex( binpath ) != -1 ) dirs << binpath; } -QString QtBuildConfig::findExecutable( const QString& execname ) const +TQString QtBuildConfig::findExecutable( const TQString& execname ) const { - QStringList dirs; + TQStringList dirs; buildBinDirs( dirs ); - for( QStringList::Iterator it=dirs.begin(); it!=dirs.end(); ++it ) + for( TQStringList::Iterator it=dirs.begin(); it!=dirs.end(); ++it ) { - QString designer = *it + QString( QChar( QDir::separator() ) ) + execname; + TQString designer = *it + TQString( TQChar( TQDir::separator() ) ) + execname; if( !designer.isEmpty() && isExecutable( designer ) ) { return designer; @@ -130,26 +130,26 @@ QString QtBuildConfig::findExecutable( const QString& execname ) const return ""; } -bool QtBuildConfig::isExecutable( const QString& path ) const +bool QtBuildConfig::isExecutable( const TQString& path ) const { - QFileInfo fi(path); + TQFileInfo fi(path); return( fi.exists() && fi.isExecutable() ); } void QtBuildConfig::findQtDir() { - QStringList qtdirs; + TQStringList qtdirs; if( m_version == 3 ) qtdirs.push_back( ::getenv("QTDIR") ); - qtdirs.push_back( QDir::rootDirPath()+"usr"+QString( QChar( QDir::separator() ) )+"lib"+QString( QChar( QDir::separator() ) )+"qt"+QString("%1").arg( m_version ) ); - qtdirs.push_back( QDir::rootDirPath()+"usr"+QString( QChar( QDir::separator() ) )+"lib"+QString( QChar( QDir::separator() ) )+"qt"+QString( QChar( QDir::separator() ) )+QString("%1").arg( m_version ) ); - qtdirs.push_back( QDir::rootDirPath()+"usr"+QString( QChar( QDir::separator() ) )+"share"+QString( QChar( QDir::separator() ) )+"qt"+QString("%1").arg( m_version ) ); - qtdirs.push_back( QDir::rootDirPath()+"usr" ); - qtdirs.push_back( QDir::rootDirPath()+"usr"+QString( QChar( QDir::separator() ) )+"lib"+QString( QChar( QDir::separator() ) )+"qt" ); + qtdirs.push_back( TQDir::rootDirPath()+"usr"+TQString( TQChar( TQDir::separator() ) )+"lib"+TQString( TQChar( TQDir::separator() ) )+"qt"+TQString("%1").arg( m_version ) ); + qtdirs.push_back( TQDir::rootDirPath()+"usr"+TQString( TQChar( TQDir::separator() ) )+"lib"+TQString( TQChar( TQDir::separator() ) )+"qt"+TQString( TQChar( TQDir::separator() ) )+TQString("%1").arg( m_version ) ); + qtdirs.push_back( TQDir::rootDirPath()+"usr"+TQString( TQChar( TQDir::separator() ) )+"share"+TQString( TQChar( TQDir::separator() ) )+"qt"+TQString("%1").arg( m_version ) ); + qtdirs.push_back( TQDir::rootDirPath()+"usr" ); + qtdirs.push_back( TQDir::rootDirPath()+"usr"+TQString( TQChar( TQDir::separator() ) )+"lib"+TQString( TQChar( TQDir::separator() ) )+"qt" ); - for( QStringList::Iterator it=qtdirs.begin(); it!=qtdirs.end(); ++it ) + for( TQStringList::Iterator it=qtdirs.begin(); it!=qtdirs.end(); ++it ) { - QString qtdir = *it; + TQString qtdir = *it; if( !qtdir.isEmpty() && isValidQtDir(qtdir) ) { m_root = qtdir; @@ -187,27 +187,27 @@ void QtBuildConfig::setIncludeStyle( int style ) m_includeStyle = style; } -void QtBuildConfig::setRoot( const QString& root ) +void QtBuildConfig::setRoot( const TQString& root ) { m_root = root; } -void QtBuildConfig::setQMakePath( const QString& path ) +void QtBuildConfig::setQMakePath( const TQString& path ) { m_qmakePath = path; } -void QtBuildConfig::setDesignerPluginPaths( const QStringList& pfx ) +void QtBuildConfig::setDesignerPluginPaths( const TQStringList& pfx ) { m_designerPluginPaths = pfx; } -void QtBuildConfig::setDesignerPath( const QString& path ) +void QtBuildConfig::setDesignerPath( const TQString& path ) { m_designerPath = path; } -void QtBuildConfig::setDesignerIntegration( const QString& designerIntegration ) +void QtBuildConfig::setDesignerIntegration( const TQString& designerIntegration ) { m_designerIntegration = designerIntegration; } |