diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-08-01 18:23:10 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-08-01 22:59:49 +0900 |
commit | c6acfabe32e7d22d90571d5398b94514e16dacff (patch) | |
tree | fb1a6d9f9722711c1cb16960172a95a55ea7c863 /pytquic3/uic.cpp | |
parent | f4a39d2fde3ef72e32b296fdd783b31d4abfcb76 (diff) | |
download | pytqt-c6acfabe.tar.gz pytqt-c6acfabe.zip |
Removed unnecessary code
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 8ccbd4fc0219267d2d8b00e7191b1d92de834569)
Diffstat (limited to 'pytquic3/uic.cpp')
-rw-r--r-- | pytquic3/uic.cpp | 15 |
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 } } |