@ -23,7 +23,7 @@
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
# define K QT_OVERLOAD_NON_STATIC_FILEDIALOGS
# define K T QT_OVERLOAD_NON_STATIC_FILEDIALOGS
# define _GNU_SOURCE
# include <dlfcn.h>
@ -39,20 +39,20 @@
# include <errno.h>
# include <string.h>
# include <sys/types.h>
# include < qstring.h>
# include < qstringlist.h>
# include < qwidget.h>
# include < qapplication.h>
# ifdef K QT_OVERLOAD_NON_STATIC_FILEDIALOGS
# include < qcombobox.h>
# include < qlineedit.h>
# include < qobjectlist.h>
# include < t qstring.h>
# include < t qstringlist.h>
# include < t qwidget.h>
# include < t qapplication.h>
# ifdef K T QT_OVERLOAD_NON_STATIC_FILEDIALOGS
# include < t qcombobox.h>
# include < t qlineedit.h>
# include < t qobjectlist.h>
# define private public // HACK HACK HACK!!!
# endif
# include < qfiledialog.h>
# include < qthread.h>
# include < qnamespace.h>
# include < qeventloop.h>
# include < t qfiledialog.h>
# include < t qthread.h>
# include < t qnamespace.h>
# include < t qeventloop.h>
# include "connect.h"
# include "config.h"
# include "mangled.h"
@ -93,16 +93,16 @@ static char * getAppNameFromPid(int pid)
return appName ;
}
static const char * getAppName ( bool use Qt= true )
static const char * getAppName ( bool use T Qt= true )
{
static const char * appName = NULL ;
if ( ! appName )
{
const char * a = use Qt & & qApp ? qApp- > argv ( ) [ 0 ] : getAppNameFromPid ( getpid ( ) ) ;
const char * a = use T Qt & & t qApp ? t qApp- > argv ( ) [ 0 ] : getAppNameFromPid ( getpid ( ) ) ;
const char * slash ;
// Was the cmdline app java? if so, try to use its parent name - just in case
// Was the cmdline app java? if so, try to use its tq parent name - just in case
// its run from a shell script, etc. - e.g. as eclipse does
if ( a & & 0 = = strcmp ( a , " java " ) )
a = getAppNameFromPid ( getppid ( ) ) ;
@ -112,13 +112,13 @@ static const char * getAppName(bool useQt=true)
appName = a & & ( slash = strrchr ( a , ' / ' ) ) & & ' \0 ' ! = slash [ 1 ]
? & ( slash [ 1 ] )
: a ? a : " QtApp" ;
: a ? a : " T QtApp" ;
}
return appName ;
}
int QApplication: : exec ( )
int T QApplication: : exec ( )
{
static bool init = false ;
@ -135,19 +135,19 @@ int QApplication::exec()
return ( int ) realFunction ( this ) ;
} ;
static QString qt2KdeFilter ( const QString & f )
static T QString qt2KdeFilter ( const T QString & f )
{
QString filter ;
QTextOStream str ( & filter ) ;
QStringList list ( QStringList: : split ( " ;; " , f ) ) ;
QStringList: : Iterator it ( list . begin ( ) ) ,
T QString filter ;
T QTextOStream str ( & filter ) ;
T QStringList list ( T QStringList: : split ( " ;; " , f ) ) ;
T QStringList: : Iterator it ( list . begin ( ) ) ,
end ( list . end ( ) ) ;
bool first = true ;
for ( ; it ! = end ; + + it )
{
int ob = ( * it ) . findRev( ' ( ' ) ,
cb = ( * it ) . findRev( ' ) ' ) ;
int ob = ( * it ) . tq findRev( ' ( ' ) ,
cb = ( * it ) . tq findRev( ' ) ' ) ;
if ( - 1 ! = cb & & ob < cb )
{
@ -162,17 +162,17 @@ static QString qt2KdeFilter(const QString &f)
return filter ;
}
static void kde2 QtFilter( const QString & orig , QString * sel )
static void kde2 T QtFilter( const T QString & orig , T QString * sel )
{
if ( sel )
{
QStringList list ( QStringList: : split ( " ;; " , orig ) ) ;
QStringList: : Iterator it ( list . begin ( ) ) ,
T QStringList list ( T QStringList: : split ( " ;; " , orig ) ) ;
T QStringList: : Iterator it ( list . begin ( ) ) ,
end ( list . end ( ) ) ;
int pos ;
for ( ; it ! = end ; + + it )
if ( - 1 ! = ( pos = ( * it ) . find( * sel ) ) & & pos > 0 & &
if ( - 1 ! = ( pos = ( * it ) . tq find( * sel ) ) & & pos > 0 & &
( ' ( ' = = ( * it ) [ pos - 1 ] | | ' ' = = ( * it ) [ pos - 1 ] ) & &
( * it ) . length ( ) > = sel - > length ( ) + pos & &
( ' ) ' = = ( * it ) [ pos + sel - > length ( ) ] | | ' ' = = ( * it ) [ pos + sel - > length ( ) ] ) )
@ -183,39 +183,39 @@ static void kde2QtFilter(const QString &orig, QString *sel)
}
}
# ifdef K QT_OVERLOAD_NON_STATIC_FILEDIALOGS
# ifdef K QT_USE_QFILEDIALOG_PRIVATE
# ifdef K T QT_OVERLOAD_NON_STATIC_FILEDIALOGS
# ifdef K T QT_USE_T QFILEDIALOG_PRIVATE
// HACK HACK HACK!!!
// KGtk versions <=0.9.1 used this copied QFileDialogPrivate to access the file filters
// newer versions walk the file dialogs children...
class QFileDialogPrivate {
// KGtk versions <=0.9.1 used this copied T QFileDialogPrivate to access the file filters
// newer versions walk the file dialogs tq children...
class T QFileDialogPrivate {
public :
~ QFileDialogPrivate( ) ;
~ T QFileDialogPrivate( ) ;
QStringList history ;
T QStringList history ;
bool geometryDirty;
QComboBox * paths ;
QComboBox * types ;
bool tq geometryDirty;
T QComboBox * paths ;
T QComboBox * types ;
} ;
# endif
static const QString getFilters ( QFileDialog * dlg , bool scribusSave = false )
static const T QString getFilters ( T QFileDialog * dlg , bool scribusSave = false )
{
QString filter ;
T QString filter ;
# if K QT_USE_QFILEDIALOG_PRIVATE
# if K T QT_USE_T QFILEDIALOG_PRIVATE
if ( dlg & & dlg - > d & & dlg - > d - > types )
{
QTextOStream str ( & filter ) ;
T QTextOStream str ( & filter ) ;
for ( int i = 0 ; i < dlg - > d - > types - > count ( ) ; + + i )
{
if ( i )
str < < " ;; " ;
if ( scribusSave & & - 1 ! = dlg - > d - > types - > text ( i ) . find( " (*.sla *.sla.gz *.scd *scd.gz) " ) )
if ( scribusSave & & - 1 ! = dlg - > d - > types - > text ( i ) . tq find( " (*.sla *.sla.gz *.scd *scd.gz) " ) )
str < < " Compressed Documents (*.sla.gz *scd.gz);;Documents (*.sla *.scd) " ;
else
str < < dlg - > d - > types - > text ( i ) ;
@ -224,25 +224,25 @@ static const QString getFilters(QFileDialog *dlg, bool scribusSave=false)
# else
if ( dlg )
{
const QObjectList * children= ( ( QObject * ) dlg ) - > children ( ) ;
const T QObjectList tq children= ( ( T QObject * ) dlg ) - > children ListObject ( ) ;
if ( children)
if ( ! tq children. isEmpty ( ) )
{
QObjectList: : ConstIterator it ( children- > begin ( ) ) ,
end ( children- > end ( ) ) ;
T QObjectList: : ConstIterator it ( tqchildren. begin ( ) ) ,
end ( tqchildren. end ( ) ) ;
for ( ; it ! = end ; + + it )
if ( : : qt_cast< QComboBox * > ( * it ) & & 0 = = qstrcmp ( ( * it ) - > name ( ) , " file types " ) )
if ( : : tq qt_cast< T QComboBox * > ( * it ) & & 0 = = qstrcmp ( ( * it ) - > name ( ) , " file types " ) )
{
QComboBox * types = ( QComboBox * ) ( * it ) ;
QTextOStream str ( & filter ) ;
T QComboBox * types = ( T QComboBox * ) ( * it ) ;
T QTextOStream str ( & filter ) ;
for ( int i = 0 ; i < types - > count ( ) ; + + i )
{
if ( i )
str < < " ;; " ;
if ( scribusSave & & - 1 ! = types - > text ( i ) . find( " (*.sla *.sla.gz *.scd *scd.gz) " ) )
if ( scribusSave & & - 1 ! = types - > text ( i ) . tq find( " (*.sla *.sla.gz *.scd *scd.gz) " ) )
str < < " Compressed Documents (*.sla.gz *scd.gz);;Documents (*.sla *.scd) " ;
else
str < < types - > text ( i ) ;
@ -257,31 +257,31 @@ static const QString getFilters(QFileDialog *dlg, bool scribusSave=false)
return filter ;
}
static QString getCurrentFileName ( QFileDialog * dlg )
static T QString getCurrentFileName ( T QFileDialog * dlg )
{
if ( dlg )
{
const QObjectList * children= ( ( QObject * ) dlg ) - > children ( ) ;
const T QObjectList tq children= ( ( T QObject * ) dlg ) - > children ListObject ( ) ;
if ( children)
if ( ! tq children. isEmpty ( ) )
{
QObjectList: : ConstIterator it ( children- > begin ( ) ) ,
end ( children- > end ( ) ) ;
T QObjectList: : ConstIterator it ( tqchildren. begin ( ) ) ,
end ( tqchildren. end ( ) ) ;
for ( ; it ! = end ; + + it )
if ( : : qt_cast< QLineEdit * > ( * it ) ) // && 0==qstrcmp((*it)->name(), "name/filter editor"))
return ( ( QLineEdit * ) ( * it ) ) - > text ( ) ;
if ( : : tq qt_cast< T QLineEdit * > ( * it ) ) // && 0==qstrcmp((*it)->name(), "name/filter editor"))
return ( ( T QLineEdit * ) ( * it ) ) - > text ( ) ;
}
}
return QString( ) ;
return T QString( ) ;
}
static QString getDir ( const QString & f )
static T QString getDir ( const T QString & f )
{
QString d ( f ) ;
T QString d ( f ) ;
int slashPos = d . findRev( ' / ' ) ;
int slashPos = d . tq findRev( ' / ' ) ;
if ( slashPos ! = - 1 )
d . remove ( slashPos + 1 , d . length ( ) ) ;
@ -290,9 +290,9 @@ static QString getDir(const QString &f)
}
# endif
static bool writeString ( int fd , const QString & str )
static bool writeString ( int fd , const T QString & str )
{
QCString utf8 ( str . utf8 ( ) ) ;
T QCString utf8 ( str . utf8 ( ) ) ;
int size = utf8 . length ( ) + 1 ;
return writeBlock ( fd , ( char * ) & size , 4 ) & & writeBlock ( fd , utf8 . data ( ) , size ) ;
@ -305,11 +305,11 @@ static bool writeBool(int fd, bool b)
return writeBlock ( fd , ( char * ) & bv , 1 ) ;
}
class K QtDialog : public QDialog
class K T QtDialog : public T QDialog
{
public :
K QtDialog( QWidget * parent) : QDialog( parent, " kqt " , true , WStyle_NoBorder | WX11BypassWM )
K T QtDialog( T QWidget * tq parent) : T QDialog( tq parent, " kqt " , true , WStyle_NoBorder | WX11BypassWM )
{
resize ( 1 , 1 ) ;
setWindowOpacity ( 0.0 ) ;
@ -317,37 +317,37 @@ class KQtDialog : public QDialog
move ( 32768 , 32768 ) ;
}
/* void r() { QDialog::reject(); }*/
/* void r() { T QDialog::reject(); }*/
} ;
class K QtThread : public QThread
class K T QtThread : public T QThread
{
public :
K QtThread( QStringList & l , QString & s , int f , K QtDialog * dlg ) : dialog ( dlg ) , kdialogdError ( false ) , res ( l ) , selFilter ( s ) , fd ( f )
K T QtThread( T QStringList & l , T QString & s , int f , K T QtDialog * dlg ) : dialog ( dlg ) , kdialogdError ( false ) , res ( l ) , selFilter ( s ) , fd ( f )
{ }
bool readData ( QCString & buffer , int size )
bool readData ( T QCString & buffer , int size )
{
buffer . resize ( size ) ;
return : : readBlock ( fd , buffer . data ( ) , size ) ;
}
bool readString ( QString & str , int size )
bool readString ( T QString & str , int size )
{
QCString buffer ;
T QCString buffer ;
buffer . resize ( size ) ;
if ( ! readBlock ( fd , buffer . data ( ) , size ) )
return false ;
str = QString: : fromUtf8 ( buffer . data ( ) ) ;
str = T QString: : fromUtf8 ( buffer . data ( ) ) ;
return true ;
}
void run ( )
{
QString buffer ;
T QString buffer ;
int num = 0 ;
if ( readBlock ( fd , ( char * ) & num , 4 ) )
@ -381,23 +381,23 @@ class KQtThread : public QThread
else
kdialogdError = true ;
QApplication: : postEvent ( dialog , new QCloseEvent) ;
T QApplication: : postEvent ( dialog , new T QCloseEvent) ;
}
K QtDialog * dialog ;
K T QtDialog * dialog ;
bool kdialogdError ;
QStringList & res ;
QString & selFilter ;
T QStringList & res ;
T QString & selFilter ;
int fd ;
} ;
static bool sendMessage ( QWidget * parent, Operation op , QStringList & res , QString & selFilter ,
const QString & title , const QString & p1 , const QString * p2 , bool ow )
static bool sendMessage ( T QWidget * tq parent, Operation op , T QStringList & res , T QString & selFilter ,
const T QString & title , const T QString & p1 , const T QString * p2 , bool ow )
{
if ( connectToKDialogD ( getAppName ( ) ) )
{
char o = ( char ) op ;
int xid = parent ? parent- > topLevelWidget( ) - > winId ( ) : qApp- > activeWindow ( ) - > winId ( ) ;
int xid = tq parent ? tq parent- > tq topLevelWidget( ) - > winId ( ) : t qApp- > activeWindow ( ) - > winId ( ) ;
if ( writeBlock ( kdialogdSocket , & o , 1 ) & &
writeBlock ( kdialogdSocket , ( char * ) & xid , 4 ) & &
@ -406,8 +406,8 @@ static bool sendMessage(QWidget *parent, Operation op, QStringList &res, QString
( p2 ? writeString ( kdialogdSocket , * p2 ) : true ) & &
( OP_FILE_SAVE = = op ? writeBool ( kdialogdSocket , ow ) : true ) )
{
K QtDialog dlg ( parent) ;
K QtThread thread ( res , selFilter , kdialogdSocket , & dlg ) ;
K T QtDialog dlg ( tq parent) ;
K T QtThread thread ( res , selFilter , kdialogdSocket , & dlg ) ;
thread . start ( ) ;
dlg . exec ( ) ;
@ -424,7 +424,7 @@ static bool sendMessage(QWidget *parent, Operation op, QStringList &res, QString
return false ;
}
static QString getTitle ( const QString & title , Operation op )
static T QString getTitle ( const T QString & title , Operation op )
{
if ( ! title . isEmpty ( ) )
return title ;
@ -432,13 +432,13 @@ static QString getTitle(const QString &title, Operation op)
return " . " ;
}
static bool openKdeDialog ( QWidget * widget , const QString & title , const QString & p1 , const QString * p2 ,
Operation op , QStringList & res , QString * selFilter , bool ow = false )
static bool openKdeDialog ( T QWidget * widget , const T QString & title , const T QString & p1 , const T QString * p2 ,
Operation op , T QStringList & res , T QString * selFilter , bool ow = false )
{
QString filter ;
T QString filter ;
bool rv = sendMessage ( widget , op , res , filter , getTitle ( title , op ) , p1 , p2 , ow ) ;
// If we failed to talk to, or start kdialogd, then dont keep trying - just fall back to Qt
// If we failed to talk to, or start kdialogd, then dont keep trying - just fall back to T Qt
if ( ! rv )
/*useKde=false*/ ;
else if ( selFilter )
@ -468,98 +468,98 @@ static bool kqtInit()
return useKde ;
}
static QString lastDir ;
static T QString lastDir ;
static void storeLastDir ( const QString & f )
static void storeLastDir ( const T QString & f )
{
lastDir = f ;
int slashPos ( lastDir . findRev( ' / ' ) ) ;
int slashPos ( lastDir . tq findRev( ' / ' ) ) ;
if ( slashPos ! = - 1 )
lastDir . remove ( slashPos + 1 , lastDir . length ( ) ) ;
}
static const QString & startDir ( const QString & d )
static const T QString & startDir ( const T QString & d )
{
return d . isEmpty ( ) ? lastDir : d ;
}
QString QFileDialog: : getOpenFileName ( const QString & initially , const QString & filter ,
QWidget * parent, const char * name , const QString & caption ,
QString * selectedFilter , bool resolveSymlinks )
T QString T QFileDialog: : getOpenFileName ( const T QString & initially , const T QString & filter ,
T QWidget * tq parent, const char * name , const T QString & caption ,
T QString * selectedFilter , bool resolveSymlinks )
{
QStringList res ;
QString f ( qt2KdeFilter ( filter ) ) ;
T QStringList res ;
T QString f ( qt2KdeFilter ( filter ) ) ;
kqtInit ( ) ;
if ( openKdeDialog ( parent, caption , startDir ( initially ) , & f , OP_FILE_OPEN , res , selectedFilter ) )
if ( openKdeDialog ( tq parent, caption , startDir ( initially ) , & f , OP_FILE_OPEN , res , selectedFilter ) )
{
kde2 QtFilter( filter , selectedFilter ) ;
QString fn ( res . first ( ) ) ;
kde2 T QtFilter( filter , selectedFilter ) ;
T QString fn ( res . first ( ) ) ;
storeLastDir ( fn ) ;
return fn ;
}
return QString : : null ;
return TQString ( ) ;
}
QString QFileDialog: : getSaveFileName ( const QString & initially , const QString & filter , QWidget * parent,
const char * name , const QString & caption ,
QString * selectedFilter , bool resolveSymlinks )
T QString T QFileDialog: : getSaveFileName ( const T QString & initially , const T QString & filter , T QWidget * tq parent,
const char * name , const T QString & caption ,
T QString * selectedFilter , bool resolveSymlinks )
{
QStringList res ;
QString f ( qt2KdeFilter ( filter ) ) ;
T QStringList res ;
T QString f ( qt2KdeFilter ( filter ) ) ;
kqtInit ( ) ;
if ( openKdeDialog ( parent, caption , startDir ( initially ) , & f , OP_FILE_SAVE , res , selectedFilter ) )
if ( openKdeDialog ( tq parent, caption , startDir ( initially ) , & f , OP_FILE_SAVE , res , selectedFilter ) )
{
kde2 QtFilter( filter , selectedFilter ) ;
QString fn ( res . first ( ) ) ;
kde2 T QtFilter( filter , selectedFilter ) ;
T QString fn ( res . first ( ) ) ;
storeLastDir ( fn ) ;
return fn ;
}
return QString : : null ;
return TQString ( ) ;
}
QString QFileDialog: : getExistingDirectory ( const QString & dir , QWidget * parent, const char * name ,
const QString & caption , bool dirOnly , bool resolveSymlinks )
T QString T QFileDialog: : getExistingDirectory ( const T QString & dir , T QWidget * tq parent, const char * name ,
const T QString & caption , bool dirOnly , bool resolveSymlinks )
{
QStringList res ;
QString dummy ;
T QStringList res ;
T QString dummy ;
kqtInit ( ) ;
return openKdeDialog ( parent, caption , dir , NULL , OP_FOLDER , res , & dummy )
return openKdeDialog ( tq parent, caption , dir , NULL , OP_FOLDER , res , & dummy )
? res . first ( )
: QString: : null ;
: TQString( ) ;
}
QStringList QFileDialog: : getOpenFileNames ( const QString & filter , const QString & dir , QWidget * parent,
const char * name , const QString & caption ,
QString * selectedFilter , bool resolveSymlinks )
T QStringList T QFileDialog: : getOpenFileNames ( const T QString & filter , const T QString & dir , T QWidget * tq parent,
const char * name , const T QString & caption ,
T QString * selectedFilter , bool resolveSymlinks )
{
QStringList res ;
QString f ( qt2KdeFilter ( filter ) ) ;
T QStringList res ;
T QString f ( qt2KdeFilter ( filter ) ) ;
kqtInit ( ) ;
openKdeDialog ( parent, caption , startDir ( dir ) , & f , OP_FILE_OPEN_MULTIPLE , res , selectedFilter ) ;
openKdeDialog ( tq parent, caption , startDir ( dir ) , & f , OP_FILE_OPEN_MULTIPLE , res , selectedFilter ) ;
if ( res . count ( ) )
{
kde2 QtFilter( filter , selectedFilter ) ;
kde2 T QtFilter( filter , selectedFilter ) ;
storeLastDir ( res . first ( ) ) ;
}
return res ;
}
# ifdef K QT_OVERLOAD_NON_STATIC_FILEDIALOGS
static QString getFile ( const QString & f )
# ifdef K T QT_OVERLOAD_NON_STATIC_FILEDIALOGS
static T QString getFile ( const T QString & f )
{
QString d ( f ) ;
T QString d ( f ) ;
int slashPos = d . findRev( ' / ' ) ;
int slashPos = d . tq findRev( ' / ' ) ;
if ( slashPos ! = - 1 )
d . remove ( 0 , slashPos + 1 ) ;
@ -567,70 +567,70 @@ static QString getFile(const QString &f)
return d ;
}
int QDialog: : exec ( )
int T QDialog: : exec ( )
{
int res = QDialog: : Rejected ;
int res = T QDialog: : Rejected ;
if ( inherits ( " QFileDialog" ) )
if ( inherits ( " T QFileDialog" ) )
{
QFileDialog * that = ( QFileDialog * ) this ;
T QFileDialog * that = ( T QFileDialog * ) this ;
const QDir * dirp = that - > dir ( ) ;
QString dir ,
const T QDir * dirp = that - > dir ( ) ;
T QString dir ,
selectedFilter ,
file ,
initialDir ( dirp ? dirp - > absPath ( ) : QDir: : homeDirPath ( ) ) ;
QStringList files ;
initialDir ( dirp ? dirp - > absPath ( ) : T QDir: : homeDirPath ( ) ) ;
T QStringList files ;
if ( dirp )
delete dirp ;
QApplication: : eventLoop ( ) - > processEvents ( QEventLoop: : ExcludeUserInput , 1 ) ;
T QApplication: : eventLoop ( ) - > processEvents ( T QEventLoop: : ExcludeUserInput , 1 ) ;
switch ( that - > mode ( ) )
{
case QFileDialog: : Directory :
case QFileDialog: : DirectoryOnly :
dir = QFileDialog: : getExistingDirectory ( initialDir , parentWidget( ) , NULL ,
case T QFileDialog: : Directory :
case T QFileDialog: : DirectoryOnly :
dir = T QFileDialog: : getExistingDirectory ( initialDir , tq parentWidget( ) , NULL ,
caption ( ) , true , true ) ;
if ( ! dir . isEmpty ( ) )
res = QDialog: : Accepted ;
res = T QDialog: : Accepted ;
break ;
case QFileDialog: : AnyFile :
case T QFileDialog: : AnyFile :
{
QString app ( getFile ( qApp- > argv ( ) [ 0 ] ) ) ,
T QString app ( getFile ( t qApp- > argv ( ) [ 0 ] ) ) ,
initialFile ( getCurrentFileName ( that ) ) ;
if ( ! initialFile . isEmpty ( ) )
initialDir = initialDir + QChar( ' / ' ) + initialFile ;
initialDir = initialDir + T QChar( ' / ' ) + initialFile ;
file = QFileDialog: : getSaveFileName ( initialDir ,
file = T QFileDialog: : getSaveFileName ( initialDir ,
getFilters ( that , " scribus " = = app | |
" scribus-ng " = = app ) ,
parentWidget( ) , NULL , caption ( ) , & selectedFilter ,
tq parentWidget( ) , NULL , caption ( ) , & selectedFilter ,
true ) ;
if ( ! file . isEmpty ( ) )
res = QDialog: : Accepted ;
res = T QDialog: : Accepted ;
break ;
}
case QFileDialog: : ExistingFile :
file = QFileDialog: : getOpenFileName ( initialDir , getFilters ( that ) , parentWidget( ) ,
case T QFileDialog: : ExistingFile :
file = T QFileDialog: : getOpenFileName ( initialDir , getFilters ( that ) , tq parentWidget( ) ,
NULL , caption ( ) , & selectedFilter , true ) ;
if ( ! file . isEmpty ( ) )
res = QDialog: : Accepted ;
res = T QDialog: : Accepted ;
break ;
case QFileDialog: : ExistingFiles :
files = QFileDialog: : getOpenFileNames ( getFilters ( that ) , initialDir , parentWidget( ) ,
case T QFileDialog: : ExistingFiles :
files = T QFileDialog: : getOpenFileNames ( getFilters ( that ) , initialDir , tq parentWidget( ) ,
NULL , caption ( ) , & selectedFilter , true ) ;
if ( files . count ( ) )
res = QDialog: : Accepted ;
res = T QDialog: : Accepted ;
break ;
}
if ( QDialog: : Accepted = = res )
if ( T QDialog: : Accepted = = res )
{
if ( file . isEmpty ( ) & & files . count ( ) )
file = files . first ( ) ;
@ -645,16 +645,16 @@ int QDialog::exec()
if ( files . count ( ) & & that - > nameEdit )
{
QStringList: : Iterator it ( files . begin ( ) ) ,
T QStringList: : Iterator it ( files . begin ( ) ) ,
end ( files . end ( ) ) ;
QString filesStr ;
QTextOStream str ( & filesStr ) ;
T QString filesStr ;
T QTextOStream str ( & filesStr ) ;
for ( ; it ! = end ; + + it )
str < < " \" " < < ( * it ) < < " \" " ;
that - > nameEdit - > setText ( filesStr ) ;
}
QApplication: : eventLoop ( ) - > processEvents ( QEventLoop: : ExcludeUserInput , 1 ) ;
T QApplication: : eventLoop ( ) - > processEvents ( T QEventLoop: : ExcludeUserInput , 1 ) ;
}
}
else