summaryrefslogtreecommitdiffstats
path: root/languages/cpp/compiler/gccoptions
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/compiler/gccoptions
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/compiler/gccoptions')
-rw-r--r--languages/cpp/compiler/gccoptions/gccoptionsplugin.cpp102
-rw-r--r--languages/cpp/compiler/gccoptions/gccoptionsplugin.h7
2 files changed, 55 insertions, 54 deletions
diff --git a/languages/cpp/compiler/gccoptions/gccoptionsplugin.cpp b/languages/cpp/compiler/gccoptions/gccoptionsplugin.cpp
index 8f632d69..3d7ff152 100644
--- a/languages/cpp/compiler/gccoptions/gccoptionsplugin.cpp
+++ b/languages/cpp/compiler/gccoptions/gccoptionsplugin.cpp
@@ -26,10 +26,10 @@
K_EXPORT_COMPONENT_FACTORY( libkdevgccoptions, KGenericFactory<GccOptionsPlugin>( "kdevgccoptions" ) )
-class GeneralTab : public QWidget
+class GeneralTab : public TQWidget
{
public:
- GeneralTab( GccOptionsPlugin::Type type, TQWidget *parent = 0, const char *name = 0 );
+ GeneralTab( GccOptionsPlugin::Type type, TQWidget *tqparent = 0, const char *name = 0 );
~GeneralTab();
void readFlags( TQStringList *str );
@@ -40,10 +40,10 @@ private:
};
-class OptimizationTab : public QWidget
+class OptimizationTab : public TQWidget
{
public:
- OptimizationTab( GccOptionsPlugin::Type type, TQWidget *parent = 0, const char *name = 0 );
+ OptimizationTab( GccOptionsPlugin::Type type, TQWidget *tqparent = 0, const char *name = 0 );
~OptimizationTab();
void readFlags( TQStringList *str );
@@ -55,10 +55,10 @@ private:
};
-class G77Tab : public QWidget
+class G77Tab : public TQWidget
{
public:
- G77Tab( TQWidget *parent = 0, const char *name = 0 );
+ G77Tab( TQWidget *tqparent = 0, const char *name = 0 );
~G77Tab();
void readFlags( TQStringList *str );
@@ -69,10 +69,10 @@ private:
};
-class Warnings1Tab : public QWidget
+class Warnings1Tab : public TQWidget
{
public:
- Warnings1Tab( GccOptionsPlugin::Type type, TQWidget *parent = 0, const char *name = 0 );
+ Warnings1Tab( GccOptionsPlugin::Type type, TQWidget *tqparent = 0, const char *name = 0 );
~Warnings1Tab();
void readFlags( TQStringList *str );
@@ -84,10 +84,10 @@ private:
};
-class Warnings2Tab : public QWidget
+class Warnings2Tab : public TQWidget
{
public:
- Warnings2Tab( GccOptionsPlugin::Type type, TQWidget *parent = 0, const char *name = 0 );
+ Warnings2Tab( GccOptionsPlugin::Type type, TQWidget *tqparent = 0, const char *name = 0 );
~Warnings2Tab();
void readFlags( TQStringList *str );
@@ -98,12 +98,12 @@ private:
};
-GeneralTab::GeneralTab( GccOptionsPlugin::Type type, TQWidget *parent, const char *name )
- : TQWidget( parent, name ), controller( new FlagCheckBoxController )
+GeneralTab::GeneralTab( GccOptionsPlugin::Type type, TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name ), controller( new FlagCheckBoxController )
{
- TQBoxLayout * layout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
- layout->setAutoAdd( true );
- layout->addSpacing( 10 );
+ TQBoxLayout * tqlayout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ tqlayout->setAutoAdd( true );
+ tqlayout->addSpacing( 10 );
TQVButtonGroup *output_group = new TQVButtonGroup( i18n( "Output" ), this );
new FlagCheckBox( output_group, controller,
@@ -114,7 +114,7 @@ GeneralTab::GeneralTab( GccOptionsPlugin::Type type, TQWidget *parent, const cha
"-save-temps", i18n( "Do not delete intermediate output like assembler files" ) );
TQApplication::sendPostedEvents( this, TQEvent::ChildInserted );
- layout->addSpacing( 10 );
+ tqlayout->addSpacing( 10 );
TQVButtonGroup *codegen_group = new TQVButtonGroup( i18n( "Code Generation" ), this );
if ( type != GccOptionsPlugin::GPP )
@@ -142,7 +142,7 @@ GeneralTab::GeneralTab( GccOptionsPlugin::Type type, TQWidget *parent, const cha
"-short-double", i18n( "Make 'double' the same as 'float'" ) );
TQApplication::sendPostedEvents( this, TQEvent::ChildInserted );
- layout->addStretch();
+ tqlayout->addStretch();
}
@@ -164,11 +164,11 @@ void GeneralTab::writeFlags( TQStringList *list )
}
-OptimizationTab::OptimizationTab( GccOptionsPlugin::Type type, TQWidget *parent, const char *name )
- : TQWidget( parent, name )
+OptimizationTab::OptimizationTab( GccOptionsPlugin::Type type, TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name )
{
- TQBoxLayout * layout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
- layout->setAutoAdd( true );
+ TQBoxLayout * tqlayout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ tqlayout->setAutoAdd( true );
TQVButtonGroup *group = new TQVButtonGroup( i18n( "Optimization Level" ), this );
Odefault = new TQRadioButton( i18n( "Default" ), group );
@@ -211,7 +211,7 @@ OptimizationTab::OptimizationTab( GccOptionsPlugin::Type type, TQWidget *parent,
}
TQApplication::sendPostedEvents( this, TQEvent::ChildInserted );
- layout->addStretch();
+ tqlayout->addStretch();
}
@@ -224,21 +224,21 @@ void OptimizationTab::readFlags( TQStringList *list )
optBox->readFlags( list );
TQStringList::Iterator sli;
- sli = list->find( "-O0" );
+ sli = list->tqfind( "-O0" );
if ( sli != list->end() )
{
O0->setChecked( true );
list->remove
( sli );
}
- sli = list->find( "-O1" );
+ sli = list->tqfind( "-O1" );
if ( sli != list->end() )
{
O1->setChecked( true );
list->remove
( sli );
}
- sli = list->find( "-O2" );
+ sli = list->tqfind( "-O2" );
if ( sli != list->end() )
{
O2->setChecked( true );
@@ -261,12 +261,12 @@ void OptimizationTab::writeFlags( TQStringList *list )
}
-G77Tab::G77Tab( TQWidget *parent, const char *name )
- : TQWidget( parent, name ), controller( new FlagCheckBoxController )
+G77Tab::G77Tab( TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name ), controller( new FlagCheckBoxController )
{
- TQBoxLayout * layout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
- layout->setAutoAdd( true );
- layout->addSpacing( 10 );
+ TQBoxLayout * tqlayout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ tqlayout->setAutoAdd( true );
+ tqlayout->addSpacing( 10 );
TQVButtonGroup *dialect_group = new TQVButtonGroup( i18n( "Dialect" ), this );
new FlagCheckBox( dialect_group, controller,
@@ -283,7 +283,7 @@ G77Tab::G77Tab( TQWidget *parent, const char *name )
"-fonetrip", i18n( "DO loops are executed at least once" ) );
TQApplication::sendPostedEvents( this, TQEvent::ChildInserted );
- layout->addSpacing( 10 );
+ tqlayout->addSpacing( 10 );
TQVButtonGroup *codegen_group = new TQVButtonGroup( i18n( "Code Generation" ), this );
new FlagCheckBox( codegen_group, controller,
@@ -294,7 +294,7 @@ G77Tab::G77Tab( TQWidget *parent, const char *name )
"-fbounds-check", i18n( "Generate run-time checks for array subscripts" ) );
TQApplication::sendPostedEvents( this, TQEvent::ChildInserted );
- layout->addStretch();
+ tqlayout->addStretch();
}
@@ -316,11 +316,11 @@ void G77Tab::writeFlags( TQStringList *list )
}
-Warnings1Tab::Warnings1Tab( GccOptionsPlugin::Type type, TQWidget *parent, const char *name )
- : TQWidget( parent, name ), controller( new FlagCheckBoxController )
+Warnings1Tab::Warnings1Tab( GccOptionsPlugin::Type type, TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name ), controller( new FlagCheckBoxController )
{
- TQBoxLayout * layout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
- layout->setAutoAdd( true );
+ TQBoxLayout * tqlayout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ tqlayout->setAutoAdd( true );
new FlagCheckBox( this, controller,
"-w", i18n( "Inhibit all warnings" ) );
@@ -366,7 +366,7 @@ Warnings1Tab::Warnings1Tab( GccOptionsPlugin::Type type, TQWidget *parent, const
new FlagListItem( wallBox,
"-Wmissing-braces", i18n( "<qt>Warn if an aggregate or union initializer is not fully bracketed</qt>" ) );
new FlagListItem( wallBox,
- "-Wparentheses", i18n( "<qt>Warn when parentheses are omitted in certain contexts</qt>" ) );
+ "-Wtqparentheses", i18n( "<qt>Warn when tqparentheses are omitted in certain contexts</qt>" ) );
new FlagListItem( wallBox,
"-Wsequence-point", i18n( "<qt>Warn about code that may have undefined semantics because of\n"
"violations of sequence point rules in the C standard</qt>" ) );
@@ -414,11 +414,11 @@ void Warnings1Tab::writeFlags( TQStringList *list )
}
-Warnings2Tab::Warnings2Tab( GccOptionsPlugin::Type type, TQWidget *parent, const char *name )
- : TQWidget( parent, name )
+Warnings2Tab::Warnings2Tab( GccOptionsPlugin::Type type, TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name )
{
- TQBoxLayout * layout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
- layout->setAutoAdd( true );
+ TQBoxLayout * tqlayout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ tqlayout->setAutoAdd( true );
wrestBox = new FlagListBox( this );
@@ -438,7 +438,7 @@ Warnings2Tab::Warnings2Tab( GccOptionsPlugin::Type type, TQWidget *parent, const
"qualifier from the target type</qt>" ) );
new FlagListItem( wrestBox,
"-Wcast-align", i18n( "<qt>Warn whenever a pointer is cast such that the required\n"
- "alignment of the target is increased</qt>" ) );
+ "tqalignment of the target is increased</qt>" ) );
new FlagListItem( wrestBox,
"-Wwrite-strings", i18n( "<qt>Warn when the address of a string constant is cast\n"
"into a non-const <i>char *</i> pointer</qt>" ) );
@@ -463,7 +463,7 @@ Warnings2Tab::Warnings2Tab( GccOptionsPlugin::Type type, TQWidget *parent, const
"deprecated by using the 'deprecated' attribute</qt>" ) );
new FlagListItem( wrestBox,
"-Wpacked", i18n( "<qt>Warn if a structure is given the packed attribute, but the packed\n"
- "attribute has no effect on the layout or size of the structure</qt>" ) );
+ "attribute has no effect on the tqlayout or size of the structure</qt>" ) );
new FlagListItem( wrestBox,
"-Wpadded", i18n( "<qt>Warn if padding is included in a structure, either to align an\n"
"element of the structure or to align the whole structure</qt>" ) );
@@ -572,8 +572,8 @@ void Warnings2Tab::writeFlags( TQStringList *list )
// Last but not least... :-)
-GccOptionsDialog::GccOptionsDialog( GccOptionsPlugin::Type type, TQWidget *parent, const char *name )
- : KDialogBase( Tabbed, GccOptionsPlugin::captionForType( type ), Ok | Cancel, Ok, parent, name, true )
+GccOptionsDialog::GccOptionsDialog( GccOptionsPlugin::Type type, TQWidget *tqparent, const char *name )
+ : KDialogBase( Tabbed, GccOptionsPlugin::captionForType( type ), Ok | Cancel, Ok, tqparent, name, true )
{
TQVBox * vbox;
@@ -649,8 +649,8 @@ TQString GccOptionsDialog::flags() const
}
-GccOptionsPlugin::GccOptionsPlugin( TQObject *parent, const char *name, const TQStringList &args )
- : KDevCompilerOptions( parent, name )
+GccOptionsPlugin::GccOptionsPlugin( TQObject *tqparent, const char *name, const TQStringList &args )
+ : KDevCompilerOptions( tqparent, name )
{
gcctype = Unknown;
@@ -683,16 +683,16 @@ TQString GccOptionsPlugin::captionForType( Type type )
case G77:
return i18n( "GNU Fortran 77 Compiler Options" );
default:
- return TQString::null;
+ return TQString();
}
}
-TQString GccOptionsPlugin::exec( TQWidget *parent, const TQString &flags )
+TQString GccOptionsPlugin::exec( TQWidget *tqparent, const TQString &flags )
{
if ( gcctype == Unknown )
- return TQString::null;
- GccOptionsDialog *dlg = new GccOptionsDialog( gcctype, parent, "gcc options dialog" );
+ return TQString();
+ GccOptionsDialog *dlg = new GccOptionsDialog( gcctype, tqparent, "gcc options dialog" );
TQString newFlags = flags;
dlg->setFlags( flags );
if ( dlg->exec() == TQDialog::Accepted )
diff --git a/languages/cpp/compiler/gccoptions/gccoptionsplugin.h b/languages/cpp/compiler/gccoptions/gccoptionsplugin.h
index e5144e01..0ac93c23 100644
--- a/languages/cpp/compiler/gccoptions/gccoptionsplugin.h
+++ b/languages/cpp/compiler/gccoptions/gccoptionsplugin.h
@@ -27,15 +27,16 @@ class Warnings2Tab;
class GccOptionsPlugin : public KDevCompilerOptions
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Type { GCC, GPP, G77, Unknown };
- GccOptionsPlugin( TQObject *parent, const char *name, const TQStringList &args );
+ GccOptionsPlugin( TQObject *tqparent, const char *name, const TQStringList &args );
~GccOptionsPlugin();
static TQString captionForType(Type type);
- virtual TQString exec(TQWidget *parent, const TQString &flags);
+ virtual TQString exec(TQWidget *tqparent, const TQString &flags);
private:
Type gcctype;
@@ -45,7 +46,7 @@ private:
class GccOptionsDialog : public KDialogBase
{
public:
- GccOptionsDialog( GccOptionsPlugin::Type type, TQWidget *parent=0, const char *name=0 );
+ GccOptionsDialog( GccOptionsPlugin::Type type, TQWidget *tqparent=0, const char *name=0 );
~GccOptionsDialog();
void setFlags(const TQString &flags);