summaryrefslogtreecommitdiffstats
path: root/languages/cpp/qtbuildconfig.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
commit48d4a26399959121f33d2bc3bfe51c7827b654fc (patch)
tree5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /languages/cpp/qtbuildconfig.cpp
parent7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff)
downloadtdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz
tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/cpp/qtbuildconfig.cpp')
-rw-r--r--languages/cpp/qtbuildconfig.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/languages/cpp/qtbuildconfig.cpp b/languages/cpp/qtbuildconfig.cpp
index 46fa7897..21717dd2 100644
--- a/languages/cpp/qtbuildconfig.cpp
+++ b/languages/cpp/qtbuildconfig.cpp
@@ -25,19 +25,19 @@
#include <stdlib.h>
-const TQString QtBuildConfig::m_configRoot = TQString( "/kdevcppsupport/qt" );
+const TQString TQtBuildConfig::m_configRoot = TQString( "/kdevcppsupport/qt" );
-QtBuildConfig::QtBuildConfig( CppSupportPart * part, TQDomDocument* dom )
+TQtBuildConfig::TQtBuildConfig( CppSupportPart * part, TQDomDocument* dom )
: TQObject( part ), m_part( part ), m_dom( dom )
{
init();
}
-QtBuildConfig::~QtBuildConfig()
+TQtBuildConfig::~TQtBuildConfig()
{
}
-void QtBuildConfig::init( )
+void TQtBuildConfig::init( )
{
m_used = DomUtil::readBoolEntry( *m_dom, m_configRoot + "/used", false );
m_version = DomUtil::readIntEntry( *m_dom, m_configRoot + "/version", 3 );
@@ -55,9 +55,9 @@ void QtBuildConfig::init( )
m_designerPath = DomUtil::readEntry(*m_dom, m_configRoot + "/designer", "");
m_designerPluginPaths = DomUtil::readListEntry(*m_dom, m_configRoot + "/designerpluginpaths", "path" );
- if( m_root.isEmpty() || !isValidQtDir( m_root ) )
+ if( m_root.isEmpty() || !isValidTQtDir( m_root ) )
{
- findQtDir();
+ findTQtDir();
}
if( m_qmakePath.isEmpty() || !isExecutable( m_qmakePath ) )
{
@@ -83,7 +83,7 @@ void QtBuildConfig::init( )
}
}
-bool QtBuildConfig::isValidQtDir( const TQString& path ) const
+bool TQtBuildConfig::isValidTQtDir( const TQString& path ) const
{
TQFileInfo inc( path + TQString( TQChar( TQDir::separator() ) )+
"include"+TQString( TQChar( TQDir::separator() ) )+
@@ -91,30 +91,30 @@ bool QtBuildConfig::isValidQtDir( const TQString& path ) const
return ( m_version == 4 || ( m_version != 4 && inc.exists() ) );
}
-void QtBuildConfig::buildBinDirs( TQStringList & dirs ) const
+void TQtBuildConfig::buildBinDirs( TQStringList & dirs ) const
{
if( m_version == 3 )
{
if( !m_root.isEmpty() )
dirs << (m_root + TQString( TQChar( TQDir::separator() ) ) + "bin");
- dirs << (::getenv("QTDIR") + TQString( TQChar( TQDir::separator() ) ) + "bin");
+ dirs << (::getenv("TQTDIR") + TQString( TQChar( TQDir::separator() ) ) + "bin");
}
TQStringList paths = TQStringList::split(":",::getenv("PATH"));
dirs += paths;
TQString binpath = TQDir::rootDirPath() + "bin";
- if( dirs.findIndex( binpath ) != -1 )
+ if( dirs.tqfindIndex( binpath ) != -1 )
dirs << binpath;
binpath = TQDir::rootDirPath() + "usr" + TQString( TQChar( TQDir::separator() ) ) + "bin";
- if( dirs.findIndex( binpath ) != -1 )
+ if( dirs.tqfindIndex( binpath ) != -1 )
dirs << binpath;
binpath = TQDir::rootDirPath() + "usr" + TQString( TQChar( TQDir::separator() ) ) + "local" + TQString( TQChar( TQDir::separator() ) ) + "bin";
- if( dirs.findIndex( binpath ) != -1 )
+ if( dirs.tqfindIndex( binpath ) != -1 )
dirs << binpath;
}
-TQString QtBuildConfig::findExecutable( const TQString& execname ) const
+TQString TQtBuildConfig::findExecutable( const TQString& execname ) const
{
TQStringList dirs;
buildBinDirs( dirs );
@@ -130,27 +130,27 @@ TQString QtBuildConfig::findExecutable( const TQString& execname ) const
return "";
}
-bool QtBuildConfig::isExecutable( const TQString& path ) const
+bool TQtBuildConfig::isExecutable( const TQString& path ) const
{
TQFileInfo fi(path);
return( fi.exists() && fi.isExecutable() );
}
-void QtBuildConfig::findQtDir()
+void TQtBuildConfig::findTQtDir()
{
TQStringList qtdirs;
if( m_version == 3 )
- qtdirs.push_back( ::getenv("QTDIR") );
- 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( ::getenv("TQTDIR") );
+ qtdirs.push_back( TQDir::rootDirPath()+"usr"+TQString( TQChar( TQDir::separator() ) )+"lib"+TQString( TQChar( TQDir::separator() ) )+"qt"+TQString("%1").tqarg( m_version ) );
+ qtdirs.push_back( TQDir::rootDirPath()+"usr"+TQString( TQChar( TQDir::separator() ) )+"lib"+TQString( TQChar( TQDir::separator() ) )+"qt"+TQString( TQChar( TQDir::separator() ) )+TQString("%1").tqarg( m_version ) );
+ qtdirs.push_back( TQDir::rootDirPath()+"usr"+TQString( TQChar( TQDir::separator() ) )+"share"+TQString( TQChar( TQDir::separator() ) )+"qt"+TQString("%1").tqarg( 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( TQStringList::Iterator it=qtdirs.begin(); it!=qtdirs.end(); ++it )
{
TQString qtdir = *it;
- if( !qtdir.isEmpty() && isValidQtDir(qtdir) )
+ if( !qtdir.isEmpty() && isValidTQtDir(qtdir) )
{
m_root = qtdir;
return;
@@ -158,7 +158,7 @@ void QtBuildConfig::findQtDir()
}
}
-void QtBuildConfig::store( )
+void TQtBuildConfig::store( )
{
DomUtil::writeBoolEntry( *m_dom, m_configRoot + "/used", m_used );
DomUtil::writeIntEntry( *m_dom, m_configRoot + "/version", m_version );
@@ -172,45 +172,45 @@ void QtBuildConfig::store( )
emit stored();
}
-void QtBuildConfig::setUsed( bool used )
+void TQtBuildConfig::setUsed( bool used )
{
m_used = used;
}
-void QtBuildConfig::setVersion( int version )
+void TQtBuildConfig::setVersion( int version )
{
m_version = version;
}
-void QtBuildConfig::setIncludeStyle( int style )
+void TQtBuildConfig::setIncludeStyle( int style )
{
m_includeStyle = style;
}
-void QtBuildConfig::setRoot( const TQString& root )
+void TQtBuildConfig::setRoot( const TQString& root )
{
m_root = root;
}
-void QtBuildConfig::setQMakePath( const TQString& path )
+void TQtBuildConfig::setTQMakePath( const TQString& path )
{
m_qmakePath = path;
}
-void QtBuildConfig::setDesignerPluginPaths( const TQStringList& pfx )
+void TQtBuildConfig::setDesignerPluginPaths( const TQStringList& pfx )
{
m_designerPluginPaths = pfx;
}
-void QtBuildConfig::setDesignerPath( const TQString& path )
+void TQtBuildConfig::setDesignerPath( const TQString& path )
{
m_designerPath = path;
}
-void QtBuildConfig::setDesignerIntegration( const TQString& designerIntegration )
+void TQtBuildConfig::setDesignerIntegration( const TQString& designerIntegration )
{
m_designerIntegration = designerIntegration;
}
#include "qtbuildconfig.moc"
-//kate: space-indent on; indent-width 4; tab-width 4; replace-tabs on
+//kate: space-indent on; indent-width 4; tab-width 4; tqreplace-tabs on