summaryrefslogtreecommitdiffstats
path: root/pytquic3/uic.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pytquic3/uic.cpp')
-rw-r--r--pytquic3/uic.cpp15
1 files changed, 0 insertions, 15 deletions
diff --git a/pytquic3/uic.cpp b/pytquic3/uic.cpp
index f5d5a2b..d5d89dc 100644
--- a/pytquic3/uic.cpp
+++ b/pytquic3/uic.cpp
@@ -80,7 +80,6 @@ bool Uic::toBool( const TQString& s )
TQString Uic::fixString( const TQString &str, bool encode )
{
-#if TQT_VERSION >= 0x030100
TQString s;
if ( !encode ) {
s = str;
@@ -105,12 +104,6 @@ TQString Uic::fixString( const TQString &str, bool encode )
}
}
}
-#else
- TQString s( str );
- s.replace( TQRegExp( "\\\\" ), "\\\\" );
- s.replace( TQRegExp( "\"" ), "\\\"" );
- s.replace( TQRegExp( "\r?\n" ), "\\n\"\n\"" );
-#endif
return "\"" + s + "\"";
}
@@ -182,9 +175,7 @@ Uic::Uic( const TQString &fn, const char *outputFn, TQTextStream &outStream,
pixmapLoaderFunction = getPixmapLoaderFunction( doc.firstChild().toElement() );
nameOfClass = getFormClassName( doc.firstChild().toElement() );
-#if TQT_VERSION >= 0x030300
uiFileVersion = doc.firstChild().toElement().attribute("version");
-#endif
stdsetdef = toBool( doc.firstChild().toElement().attribute("stdsetdef") );
if ( doc.firstChild().isNull() || doc.firstChild().firstChild().isNull() )
@@ -402,10 +393,8 @@ void Uic::createActionImpl( const TQDomElement &n, const TQString &parent )
else
continue;
bool subActionsDone = FALSE;
-#if TQT_VERSION >= 0x030300
bool hasMenuText = FALSE;
TQString actionText;
-#endif
for ( TQDomElement n2 = ae.firstChild().toElement(); !n2.isNull(); n2 = n2.nextSibling().toElement() ) {
if ( n2.tagName() == "property" ) {
bool stdset = stdsetdef;
@@ -424,12 +413,10 @@ void Uic::createActionImpl( const TQDomElement &n, const TQString &parent )
else
call += "setProperty(\"" + prop + "\",TQVariant(" + value + "))";
-#if TQT_VERSION >= 0x030300
if (prop == "menuText")
hasMenuText = TRUE;
else if (prop == "text")
actionText = value;
-#endif
if ( n2.firstChild().toElement().tagName() == "string" ) {
trout << trindent << call << endl;
@@ -441,11 +428,9 @@ void Uic::createActionImpl( const TQDomElement &n, const TQString &parent )
subActionsDone = TRUE;
}
}
-#if TQT_VERSION >= 0x030300
// workaround for loading pre-3.3 files expecting bogus TQAction behavior
if (!hasMenuText && !actionText.isEmpty() && uiFileVersion < "3.3")
trout << indent << "self." << objName << ".setMenuText(" << actionText << ")" << endl;
-#endif
}
}