Rename additional global TQt functions

bug/266/move-to-usr
Timothy Pearson 13 years ago
parent f0201c2d37
commit d866fe2c92

@ -20,7 +20,7 @@
- run your PerlTQt project straight from the designer
- STDIN/STDOUT output and Perl messages are redirected to the Output Window view,
with corrected line numbers pointing to syntax errors.
- global scope TQt functions (bitBlt, qCompress...) are now available.
- global scope TQt functions (bitBlt, tqCompress...) are now available.
- gathered in the TQt::GlobalSpace namespace
- import them to current namespace with "use TQt::GlobalSpace"
- global scope operators are available as well (e.g TQt::Point + TQt::point)

@ -170,7 +170,7 @@
* PerlTQt/: TQt.pm, TQt.xs, handlers.cpp:
- implemented TQByteArray Marshaller (from/to Perl string, tied if needed)
Still needs some thought /wrt to Utf8 handling (think qCompress/tqUncompress)
Still needs some thought /wrt to Utf8 handling (think tqCompress/tqUncompress)
With TQDataStream static operators and this, we get a nice object serializer :)
@ -253,7 +253,7 @@
- adding support for the new TQt::GlobalSpace pseudo-class holding all global TQt functions.
Requires a recompilation of Smoke.
use TQt::GlobalSpace; # exports all symbols to the caller's namespace (not recommended)
use TQt::GlobalSpace qw( bitBlt qCompress qSysInfo ); # export listed symbols only
use TQt::GlobalSpace qw( bitBlt tqCompress tqSysInfo ); # export listed symbols only
- when an operator call fails, forward the call to TQt::GlobalSpace which has a lot of static operators:
$aPoint = TQt::Point( 20, 20 );
$aPoint += TQt::Point( 10, 10); # this one calls TQt::Point->operator+()

@ -170,7 +170,7 @@
* PerlTQt/: TQt.pm, TQt.xs, handlers.cpp:
- implemented TQByteArray Marshaller (from/to Perl string, tied if needed)
Still needs some thought /wrt to Utf8 handling (think qCompress/tqUncompress)
Still needs some thought /wrt to Utf8 handling (think tqCompress/tqUncompress)
With TQDataStream static operators and this, we get a nice object serializer :)
@ -253,7 +253,7 @@
- adding support for the new TQt::GlobalSpace pseudo-class holding all global TQt functions.
Requires a recompilation of Smoke.
use TQt::GlobalSpace; # exports all symbols to the caller's namespace (not recommended)
use TQt::GlobalSpace qw( bitBlt qCompress qSysInfo ); # export listed symbols only
use TQt::GlobalSpace qw( bitBlt tqCompress tqSysInfo ); # export listed symbols only
- when an operator call fails, forward the call to TQt::GlobalSpace which has a lot of static operators:
$aPoint = TQt::Point( 20, 20 );
$aPoint += TQt::Point( 10, 10); # this one calls TQt::Point->operator+()

@ -21,7 +21,7 @@ eval { $ret = ($ret->x != 20 or $ret->y != 20) ? 1 : 0 };
print +($@ || $ret) ? "not ok\n" : "ok 4\n";
eval { my $z = TQt::GlobalSpace::qVersion() };
eval { my $z = TQt::GlobalSpace::tqVersion() };
if( $@ )
{

@ -824,7 +824,7 @@ PerlTQt as
The only notable exceptions are :
tqApp() will map to TQt::app()
qVersion() will map to TQt::version() # not really needed anymore: we have qVersion(). See Global Functions below.
tqVersion() will map to TQt::version() # not really needed anymore: we have tqVersion(). See Global Functions below.
=item *
@ -955,7 +955,7 @@ You may also import specific symbols:
=item Global Functions
TQt has also some utilitarian functions such as bitBlt, qCompress, etc.
TQt has also some utilitarian functions such as bitBlt, tqCompress, etc.
Those were global scope functions and have been grouped in a common namespace:
C<TQt::GlobalSpace>.

@ -748,7 +748,7 @@ PerlTQt as
<p>The only notable exceptions are :</p>
<pre>
tqApp() will map to TQt::app()
qVersion() will map to TQt::version() # not really needed anymore: we have qVersion(). See Global Functions below.</pre>
tqVersion() will map to TQt::version() # not really needed anymore: we have tqVersion(). See Global Functions below.</pre>
<p></p>
<li></li>
Functions referenced as <strong>members</strong> or <strong>Signals</strong> are accessed through an object
@ -892,7 +892,7 @@ For instance, requesting the importation of all IO constants into the current na
<dt><strong><a name="item_global_functions">Global Functions</a></strong><br />
</dt>
<dd>
TQt has also some utilitarian functions such as bitBlt, qCompress, etc.
TQt has also some utilitarian functions such as bitBlt, tqCompress, etc.
</dd>
<dd>
<p>Those were global scope functions and have been grouped in a common namespace:

@ -990,7 +990,7 @@ Et pour importer quelques symboles seulement :
=item Fonctions globales
TQt dispose de fonctions utilitaires, telles bitBlt, qCompress, etc.
TQt dispose de fonctions utilitaires, telles bitBlt, tqCompress, etc.
Ces fonctions ont été rassemblées dans un espace de nom commun:
C<TQt::GlobalSpace>.

@ -920,7 +920,7 @@ o
<dt><strong><a name="item_fonctions_globales">Fonctions globales</a></strong><br />
</dt>
<dd>
TQt dispose de fonctions utilitaires, telles bitBlt, qCompress, etc.
TQt dispose de fonctions utilitaires, telles bitBlt, tqCompress, etc.
</dd>
<dd>
<p>Ces fonctions ont été rassemblées dans un espace de nom commun:

@ -81,7 +81,7 @@
2004-06-29 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Java methods now generated for qCompress and tqUncompress methods - Michal Ceresna
* Java methods now generated for tqCompress and tqUncompress methods - Michal Ceresna
reported that the methods missing from the QtJava api.
2004-06-25 Richard Dale <Richard_Dale@tipitina.demon.co.uk>

@ -506,19 +506,19 @@ EOF
public static native TQApplication tqApp();
public static native void qDebug(String message);
public static void qDebug(String pattern, Object[] arguments) {
qDebug(MessageFormat.format(pattern, arguments));
public static native void tqDebug(String message);
public static void tqDebug(String pattern, Object[] arguments) {
tqDebug(MessageFormat.format(pattern, arguments));
}
public static native void qWarning(String message);
public static void qWarning(String pattern, Object[] arguments) {
qWarning(MessageFormat.format(pattern, arguments));
public static native void tqWarning(String message);
public static void tqWarning(String pattern, Object[] arguments) {
tqWarning(MessageFormat.format(pattern, arguments));
}
public static native void qFatal(String message);
public static void qFatal(String pattern, Object[] arguments) {
qFatal(MessageFormat.format(pattern, arguments));
public static native void tqFatal(String message);
public static void tqFatal(String pattern, Object[] arguments) {
tqFatal(MessageFormat.format(pattern, arguments));
}
private static String sqeezeOut(String from, char toss) {
@ -552,7 +552,7 @@ EOF
try {
result = new String(bytes, "UTF-8");
} catch (UnsupportedEncodingException e) {
qWarning("UTF-8 encoding not supported");
tqWarning("UTF-8 encoding not supported");
} finally {
return result;
}
@ -822,7 +822,7 @@ Java_org_kde_qt_Qt_qDebug(JNIEnv* env, jclass cls, jstring message)
{
static TQCString * _qstring_message = 0;
(void) cls;
qDebug("%s", (const char *) QtSupport::toCharString(env, message, &_qstring_message));
tqDebug("%s", (const char *) QtSupport::toCharString(env, message, &_qstring_message));
return;
}
@ -831,7 +831,7 @@ Java_org_kde_qt_Qt_qWarning(JNIEnv* env, jclass cls, jstring message)
{
static TQCString * _qstring_message = 0;
(void) cls;
qWarning("%s", (const char *) QtSupport::toCharString(env, message, &_qstring_message));
tqWarning("%s", (const char *) QtSupport::toCharString(env, message, &_qstring_message));
return;
}
@ -840,7 +840,7 @@ Java_org_kde_qt_Qt_qFatal(JNIEnv* env, jclass cls, jstring message)
{
static TQCString * _qstring_message = 0;
(void) cls;
qFatal("%s", (const char *) QtSupport::toCharString(env, message, &_qstring_message));
tqFatal("%s", (const char *) QtSupport::toCharString(env, message, &_qstring_message));
return;
}

@ -301,19 +301,19 @@ EOF
*/
// public static native TQApplication tqApp();
public static native void qDebug(String message);
public static void qDebug(String pattern, Object[] arguments) {
qDebug(MessageFormat.format(pattern, arguments));
public static native void tqDebug(String message);
public static void tqDebug(String pattern, Object[] arguments) {
tqDebug(MessageFormat.format(pattern, arguments));
}
public static native void qWarning(String message);
public static void qWarning(String pattern, Object[] arguments) {
qWarning(MessageFormat.format(pattern, arguments));
public static native void tqWarning(String message);
public static void tqWarning(String pattern, Object[] arguments) {
tqWarning(MessageFormat.format(pattern, arguments));
}
public static native void qFatal(String message);
public static void qFatal(String pattern, Object[] arguments) {
qFatal(MessageFormat.format(pattern, arguments));
public static native void tqFatal(String message);
public static void tqFatal(String pattern, Object[] arguments) {
tqFatal(MessageFormat.format(pattern, arguments));
}
private static String sqeezeOut(String from, char toss) {
@ -347,7 +347,7 @@ EOF
try {
result = new String(bytes, "UTF-8");
} catch (UnsupportedEncodingException e) {
qWarning("UTF-8 encoding not supported");
tqWarning("UTF-8 encoding not supported");
} finally {
return result;
}

@ -47,14 +47,14 @@ static TQByteArray tqUncompress( const uchar* data, int nbytes )
{
if ( !data ) {
#if defined(TQT_CHECK_RANGE)
qWarning( "qUncompress: data is NULL." );
tqWarning( "qUncompress: data is NULL." );
#endif
return TQByteArray();
}
if ( nbytes <= 4 ) {
#if defined(TQT_CHECK_RANGE)
if ( nbytes < 4 || ( data[0]!=0 || data[1]!=0 || data[2]!=0 || data[3]!=0 ) )
qWarning( "qUncompress: Input data is corrupted." );
tqWarning( "qUncompress: Input data is corrupted." );
#endif
return TQByteArray();
}
@ -74,7 +74,7 @@ static TQByteArray tqUncompress( const uchar* data, int nbytes )
break;
case Z_MEM_ERROR:
#if defined(TQT_CHECK_RANGE)
qWarning( "qUncompress: Z_MEM_ERROR: Not enough memory." );
tqWarning( "qUncompress: Z_MEM_ERROR: Not enough memory." );
#endif
break;
case Z_BUF_ERROR:
@ -82,7 +82,7 @@ static TQByteArray tqUncompress( const uchar* data, int nbytes )
break;
case Z_DATA_ERROR:
#if defined(TQT_CHECK_RANGE)
qWarning( "qUncompress: Z_DATA_ERROR: Input data is corrupted." );
tqWarning( "qUncompress: Z_DATA_ERROR: Input data is corrupted." );
#endif
break;
}

@ -202,7 +202,7 @@ int main( int argc, char * argv[] )
if ( !outputFile.isEmpty() ) {
fileOut.setName( outputFile );
if (!fileOut.open( IO_WriteOnly ) ) {
qWarning( "puic: Could not open output file '%s'", outputFile.data() );
tqWarning( "puic: Could not open output file '%s'", outputFile.data() );
return 1;
}
} else {
@ -221,7 +221,7 @@ int main( int argc, char * argv[] )
TQFile file( fileName );
if ( !file.open( IO_ReadOnly ) ) {
qWarning( "puic: Could not open file '%s' ", fileName );
tqWarning( "puic: Could not open file '%s' ", fileName );
return 1;
}
@ -229,13 +229,13 @@ int main( int argc, char * argv[] )
TQString errMsg;
int errLine;
if ( !doc.setContent( &file, &errMsg, &errLine ) ) {
qWarning( TQString("puic: Failed to parse %s: ") + errMsg + TQString (" in line %d\n"), fileName, errLine );
tqWarning( TQString("puic: Failed to parse %s: ") + errMsg + TQString (" in line %d\n"), fileName, errLine );
return 1;
}
TQDomElement e = doc.firstChild().toElement();
if ( e.hasAttribute("version") && e.attribute("version").toDouble() > 3.2 ) {
qWarning( TQString("puic: File generated with too recent version of TQt Designer (%s). Recent extensions won't be handled."),
tqWarning( TQString("puic: File generated with too recent version of TQt Designer (%s). Recent extensions won't be handled."),
e.attribute("version").latin1() );
return 1;
}
@ -282,7 +282,7 @@ int main( int argc, char * argv[] )
out << indent << "exit $a->exec;" << endl;
}
if ( fileOut.status() != IO_Ok ) {
qWarning( "uic: Error writing to file" );
tqWarning( "uic: Error writing to file" );
if ( !outputFile.isEmpty() )
remove( outputFile );
}

@ -34,7 +34,7 @@
# ifdef TTQ_FULL_TEMPLATE_INSTANTIATION
# define TQ_DUMMY_COMPARISON_OPERATOR(C) \
bool operator==( const C& ) const { \
qWarning( #C"::operator==( const "#C"& ) got called." ); \
tqWarning( #C"::operator==( const "#C"& ) got called." ); \
return FALSE; \
}
# else

Loading…
Cancel
Save