summaryrefslogtreecommitdiffstats
path: root/buildtools/qmake/trollprojectpart.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'buildtools/qmake/trollprojectpart.cpp')
-rw-r--r--buildtools/qmake/trollprojectpart.cpp76
1 files changed, 31 insertions, 45 deletions
diff --git a/buildtools/qmake/trollprojectpart.cpp b/buildtools/qmake/trollprojectpart.cpp
index fe16d538..de9b7f6e 100644
--- a/buildtools/qmake/trollprojectpart.cpp
+++ b/buildtools/qmake/trollprojectpart.cpp
@@ -57,11 +57,11 @@
#include <urlutil.h>
typedef KDevGenericFactory<TrollProjectPart> TrollProjectFactory;
-static const KDevPluginInfo data("kdevtrollproject");
-K_EXPORT_COMPONENT_FACTORY( libkdevtrollproject, TrollProjectFactory( data ) )
+static const KDevPluginInfo pluginData("kdevtrollproject");
+K_EXPORT_COMPONENT_FACTORY( libkdevtrollproject, TrollProjectFactory( pluginData ) )
TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQStringList& args )
- : KDevBuildTool(&data, parent, name ? name : "TrollProjectPart")
+ : KDevBuildTool(&pluginData, parent, name ? name : "TrollProjectPart")
{
setInstance(TrollProjectFactory::instance());
@@ -92,7 +92,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
const TQIconSet icon(SmallIcon("compfile"));
action = new TDEAction( i18n("Compile &File"), "compfile", 0,
- TQT_TQOBJECT(m_widget), TQT_SLOT(slotBuildOpenFile()),
+ m_widget, TQ_SLOT(slotBuildOpenFile()),
actionCollection(),"build_compilefile" );
action->setToolTip(i18n("Compile file"));
action->setWhatsThis(i18n("<b>Compile file</b><p>Runs <b>make filename.o</b> command from the directory where 'filename' is the name of currently opened file.<br>"
@@ -101,7 +101,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
action = new TDEAction( i18n("&Build Project"), "make_tdevelop", Key_F8,
- TQT_TQOBJECT(m_widget), TQT_SLOT(slotBuildProject()),
+ m_widget, TQ_SLOT(slotBuildProject()),
actionCollection(), "build_build_project" );
action->setToolTip(i18n("Build project"));
action->setWhatsThis(i18n("<b>Build project</b><p>Runs <b>make</b> from the project directory.<br>"
@@ -109,7 +109,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
"in the project settings dialog, <b>Make Options</b> tab."));
action = new TDEAction( i18n("&Rebuild Project"),"rebuild" , 0,
- TQT_TQOBJECT(m_widget), TQT_SLOT(slotRebuildProject()),
+ m_widget, TQ_SLOT(slotRebuildProject()),
actionCollection(),"build_rebuild_project" );
action->setToolTip(i18n("Rebuild project"));
action->setWhatsThis(i18n("<b>Rebuild project</b><p>Runs <b>make clean</b> and then <b>make</b> from the project directory.<br>"
@@ -117,7 +117,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
"in the project settings dialog, <b>Make Options</b> tab."));
action = new TDEAction( i18n("&Install Project"),"install" , 0,
- TQT_TQOBJECT(m_widget), TQT_SLOT(slotInstallProject()),
+ m_widget, TQ_SLOT(slotInstallProject()),
actionCollection(),"build_install_project" );
action->setToolTip(i18n("Install project"));
action->setWhatsThis(i18n("<b>Install project</b><p>Runs <b>make install</b> from the project directory.<br>"
@@ -125,7 +125,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
"in the project settings dialog, <b>Make Options</b> tab."));
action = new TDEAction( i18n("&Clean Project"), 0,
- TQT_TQOBJECT(m_widget), TQT_SLOT(slotCleanProject()),
+ m_widget, TQ_SLOT(slotCleanProject()),
actionCollection(), "build_clean_project" );
action->setToolTip(i18n("Clean project"));
action->setWhatsThis(i18n("<b>Clean project</b><p>Runs <b>make clean</b> command from the project directory.<br>"
@@ -133,7 +133,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
"in the project settings dialog, <b>Make Options</b> tab."));
action = new TDEAction( i18n("&Dist-Clean Project"), 0,
- TQT_TQOBJECT(m_widget), TQT_SLOT(slotDistCleanProject()),
+ m_widget, TQ_SLOT(slotDistCleanProject()),
actionCollection(), "build_distclean_project" );
action->setToolTip(i18n("Dist-Clean project"));
action->setWhatsThis(i18n("<b>Dist-Clean project</b><p>Runs <b>make distclean</b> command from the "
@@ -141,13 +141,13 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
"in the project settings dialog, <b>Make Options</b> tab."));
action = new TDEAction( i18n("Execute Main Program"), "application-x-executable", SHIFT+Key_F9,
- this, TQT_SLOT(slotBuildAndExecuteProject()),
+ this, TQ_SLOT(slotBuildAndExecuteProject()),
actionCollection(), "build_execute_project" );
action->setToolTip(i18n("Execute main program"));
action->setWhatsThis(i18n("<b>Execute program</b><p>Executes the currently selected subproject if it is an application or the program specified in project settings, <b>Run Options</b> tab."));
action = new TDEAction( i18n("&Build Subproject"), "make_tdevelop", Key_F7,
- TQT_TQOBJECT(m_widget), TQT_SLOT(slotBuildTarget()),
+ m_widget, TQ_SLOT(slotBuildTarget()),
actionCollection(), "build_build_target" );
action->setToolTip(i18n("Build subproject"));
action->setWhatsThis(i18n("<b>Build subproject</b><p>Runs <b>make</b> from the current subproject directory. "
@@ -156,7 +156,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
"in the project settings dialog, <b>Make Options</b> tab."));
action = new TDEAction( i18n("&Rebuild Subproject"), "rebuild", 0,
- TQT_TQOBJECT(m_widget), TQT_SLOT(slotRebuildTarget()),
+ m_widget, TQ_SLOT(slotRebuildTarget()),
actionCollection(),"build_rebuild_target" );
action->setToolTip(i18n("Rebuild subproject"));
action->setWhatsThis(i18n("<b>Rebuild subproject</b><p>Runs <b>make clean</b> and then <b>make</b> from the current subproject directory. "
@@ -165,7 +165,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
"in the project settings dialog, <b>Make Options</b> tab."));
action = new TDEAction( i18n("&Install Subproject"), "install", 0,
- TQT_TQOBJECT(m_widget), TQT_SLOT(slotInstallTarget()),
+ m_widget, TQ_SLOT(slotInstallTarget()),
actionCollection(),"build_install_target" );
action->setToolTip(i18n("Install subproject"));
action->setWhatsThis(i18n("<b>Install subproject</b><p>Runs <b>make install</b> from the current subproject directory. "
@@ -174,7 +174,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
"in the project settings dialog, <b>Make Options</b> tab."));
action = new TDEAction( i18n("&Clean Subproject"), 0,
- TQT_TQOBJECT(m_widget), TQT_SLOT(slotCleanTarget()),
+ m_widget, TQ_SLOT(slotCleanTarget()),
actionCollection(), "build_clean_target" );
action->setToolTip(i18n("Clean subproject"));
action->setWhatsThis(i18n("<b>Clean subproject</b><p>Runs <b>make clean</b> from the current subproject directory. "
@@ -183,7 +183,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
"in the project settings dialog, <b>Make Options</b> tab."));
action = new TDEAction( i18n("&Dist-Clean Subproject"), 0,
- TQT_TQOBJECT(m_widget), TQT_SLOT(slotDistCleanTarget()),
+ m_widget, TQ_SLOT(slotDistCleanTarget()),
actionCollection(), "build_distclean_target" );
action->setToolTip(i18n("Dist-Clean subproject"));
action->setWhatsThis(i18n("<b>Dist-Clean subproject</b><p>Runs <b>make distclean</b> from the current"
@@ -192,18 +192,18 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
"in the project settings dialog, <b>Make Options</b> tab."));
action = new TDEAction( i18n("Execute Subproject"), "application-x-executable", 0,
- this, TQT_SLOT(slotBuildAndExecuteTarget()),
+ this, TQ_SLOT(slotBuildAndExecuteTarget()),
actionCollection(), "build_execute_target" );
action->setToolTip(i18n("Execute subproject"));
action->setWhatsThis(i18n("<b>Execute subproject</b><p>Executes the target program for the currently selected subproject. "
"This action is allowed only if a type of the subproject is 'application'. The type of the subproject can be "
"defined in <b>Subproject Settings</b> dialog (open it from the subproject context menu)."));
- connect( core(), TQT_SIGNAL(projectConfigWidget(KDialogBase*)),
- this, TQT_SLOT(projectConfigWidget(KDialogBase*)) );
+ connect( core(), TQ_SIGNAL(projectConfigWidget(KDialogBase*)),
+ this, TQ_SLOT(projectConfigWidget(KDialogBase*)) );
- connect( makeFrontend(), TQT_SIGNAL(commandFinished(const TQString&)),
- this, TQT_SLOT(slotCommandFinished(const TQString&)) );
+ connect( makeFrontend(), TQ_SIGNAL(commandFinished(const TQString&)),
+ this, TQ_SLOT(slotCommandFinished(const TQString&)) );
TQString m_defaultTQtDir = DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/root", "");
TQString m_qmakePath = DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/qmake", "");
@@ -255,7 +255,7 @@ TQString TrollProjectPart::makeEnvironment()
environstr += " ";
}
- if( !hasTQtDir && !isTQt4Project() && !DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/root", "").isEmpty() )
+ if( !hasTQtDir && !DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/root", "").isEmpty() )
{
environstr += TQString( "TQTDIR=" ) + EnvVarTools::quote( DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/root", "") ) + TQString( " PATH=$TQTDIR/bin:$PATH " );
}
@@ -280,9 +280,9 @@ void TrollProjectPart::projectConfigWidget(KDialogBase *dlg)
QMakeOptionsWidget *qm = new QMakeOptionsWidget( projectDirectory(), *projectDom(), "/kdevtrollproject", vbox);
- connect( dlg, TQT_SIGNAL(okClicked()), w4, TQT_SLOT(accept()) );
- connect( dlg, TQT_SIGNAL(okClicked()), qm, TQT_SLOT(accept()) );
- connect( dlg, TQT_SIGNAL(okClicked()), optdlg, TQT_SLOT(accept()) );
+ connect( dlg, TQ_SIGNAL(okClicked()), w4, TQ_SLOT(accept()) );
+ connect( dlg, TQ_SIGNAL(okClicked()), qm, TQ_SLOT(accept()) );
+ connect( dlg, TQ_SIGNAL(okClicked()), optdlg, TQ_SLOT(accept()) );
}
@@ -291,7 +291,7 @@ void TrollProjectPart::openProject(const TQString &dirName, const TQString &proj
mainWindow()->statusBar()->message( i18n("Loading Project...") );
TQString defaultTQtDir = DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/root", "");
- if( !isTQt4Project() && ( defaultTQtDir.isEmpty() || !isValidTQtDir( defaultTQtDir ) ) )
+ if( defaultTQtDir.isEmpty() || !isValidTQtDir( defaultTQtDir ) )
{
bool doask = true;
while( doask )
@@ -705,11 +705,6 @@ void TrollProjectPart::startTQMakeCommand(const TQString &dir, bool recursive)
cmdline = DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/qmake", "")+" ";
}
- if(isTQt4Project() && recursive)
- {
- cmdline += " -recursive ";
- }
-
//TQString cmdline = TQString::fromLatin1( isTMakeProject() ? "tmake " : "qmake " );
// cmdline += fi.baseName() + ".pro";
TQDir d(dir);
@@ -798,18 +793,15 @@ bool TrollProjectPart::isValidTQtDir( const TQString& path ) const
TQFileInfo inc( path + TQString( TQChar( TQDir::separator() ) )+
"include"+TQString( TQChar( TQDir::separator() ) )+
"tqt.h" );
- return ( isTQt4Project() || ( !isTQt4Project() && inc.exists() ) );
+ return ( inc.exists() );
}
void TrollProjectPart::buildBinDirs( TQStringList & dirs ) const
{
- if( !isTQt4Project() )
- {
- TQString m_defaultTQtDir = DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/root", "");
- if( !m_defaultTQtDir.isEmpty() )
- dirs << (m_defaultTQtDir + TQString( TQChar( TQDir::separator() ) ) + "bin" );
- dirs << ( ::getenv("TQTDIR") + TQString( TQChar( TQDir::separator() ) ) + "bin" );
- }
+ TQString m_defaultTQtDir = DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/root", "");
+ if( !m_defaultTQtDir.isEmpty() )
+ dirs << (m_defaultTQtDir + 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";
@@ -850,8 +842,7 @@ bool TrollProjectPart::isExecutable( const TQString& path ) const
TQString TrollProjectPart::findTQtDir()
{
TQStringList qtdirs;
- if( !isTQt4Project() )
- qtdirs.push_back( ::getenv("TQTDIR") );
+ qtdirs.push_back( ::getenv("TQTDIR") );
qtdirs.push_back( TQDir::rootDirPath()+"usr"+TQString( TQChar( TQDir::separator() ) )+"lib"+TQString( TQChar( TQDir::separator() ) )+"qt"+TQString("%1").arg( DomUtil::readEntry( *projectDom(), "/kdevcppsupport/qt/version", "3") ) );
qtdirs.push_back( TQDir::rootDirPath()+"usr"+TQString( TQChar( TQDir::separator() ) )+"lib"+TQString( TQChar( TQDir::separator() ) )+"qt"+TQString( TQChar( TQDir::separator() ) )+TQString("%1").arg( DomUtil::readEntry( *projectDom(), "/kdevcppsupport/qt/version", "3") ) );
qtdirs.push_back( TQDir::rootDirPath()+"usr"+TQString( TQChar( TQDir::separator() ) )+"share"+TQString( TQChar( TQDir::separator() ) )+"qt"+TQString("%1").arg( DomUtil::readEntry( *projectDom(), "/kdevcppsupport/qt/version", "3") ) );
@@ -909,11 +900,6 @@ TQStringList TrollProjectPart::distFiles() const
return sourceList + files;
}
-bool TrollProjectPart::isTQt4Project() const
-{
- return ( DomUtil::readIntEntry( *projectDom(), "kdevcppsupport/qt/version", 3 ) == 4 );
-}
-
KDirWatch* TrollProjectPart::dirWatch()
{
return m_dirWatch;