summaryrefslogtreecommitdiffstats
path: root/src/dialogs/qfiledialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dialogs/qfiledialog.cpp')
-rw-r--r--src/dialogs/qfiledialog.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/src/dialogs/qfiledialog.cpp b/src/dialogs/qfiledialog.cpp
index e323f111..b3dc48e7 100644
--- a/src/dialogs/qfiledialog.cpp
+++ b/src/dialogs/qfiledialog.cpp
@@ -94,15 +94,15 @@
#include "ntqvbox.h"
#include "ntqwidgetstack.h"
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
#include "private/tqttdeintegration_x11_p.h"
#endif
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
#ifdef TQT_THREAD_SUPPORT
# include <private/qmutexpool_p.h>
#endif // TQT_THREAD_SUPPORT
-#endif // Q_WS_WIN
+#endif // TQ_WS_WIN
#if !defined(Q_OS_TEMP)
#include <time.h>
@@ -113,7 +113,7 @@
#include <limits.h>
#include <ctype.h>
-#ifdef Q_WS_MAC
+#ifdef TQ_WS_MAC
#include "qt_mac.h"
extern TQString qt_mac_precomposeFileName(const TQString &); // qglobal.cpp
#undef check
@@ -515,7 +515,7 @@ static void updateLastSize( TQFileDialog *that )
// resolving the W methods manually is needed, because Windows 95 doesn't include
// these methods in Shell32.lib (not even stubs!), so you'd get an unresolved symbol
// when TQt calls getEsistingDirectory(), etc.
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
typedef UINT (WINAPI *PtrExtractIconEx)(LPCTSTR,int,HICON*,HICON*,UINT);
static PtrExtractIconEx ptrExtractIconEx = 0;
@@ -613,7 +613,7 @@ static void makeVariables() {
bShowHiddenFiles = FALSE;
sortFilesBy = (int)TQDir::Name;
detailViewMode = FALSE;
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
if ( !fileIconProvider )
fileIconProvider = new TQWindowsIconProvider( tqApp );
#endif
@@ -1075,7 +1075,7 @@ public:
TQString newStr;
TQCString cName = fName.utf8();
const TQCString sChars(
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
"#%"
#else
"<>#@\"&%$:,;?={}|^~[]\'`\\*"
@@ -1122,7 +1122,7 @@ public:
#ifndef Q_NO_CURSOR
bool cursorOverride; // Remember if the cursor was overridden or not.
#endif
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
int oldPermissionLookup;
#endif
};
@@ -2444,7 +2444,7 @@ TQFileDialog::TQFileDialog( const TQString& dirName, const TQString & filter,
}
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
extern int qt_ntfs_permission_lookup;
#endif
@@ -2472,7 +2472,7 @@ void TQFileDialog::init()
d->pendingItems.setAutoDelete( FALSE );
d->mimeTypeTimer = new TQTimer( this );
d->cursorOverride = FALSE;
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
d->oldPermissionLookup = qt_ntfs_permission_lookup;
#endif
connect( d->mimeTypeTimer, TQ_SIGNAL( timeout() ),
@@ -2661,7 +2661,7 @@ void TQFileDialog::init()
d->modeButtons->insert( d->previewInfo );
d->previewContents = new TQToolButton( this, "preview info view" );
-#if defined(Q_WS_WIN) && !defined(Q_OS_TEMP)
+#if defined(TQ_WS_WIN) && !defined(Q_OS_TEMP)
if ( (qt_winver & WV_NT_based) > TQt::WV_NT )
#else
if ( !qstrcmp(style().className(), "TQWindowsStyle") )
@@ -3486,15 +3486,15 @@ TQString TQFileDialog::getOpenFileName( const TQString & startWith,
if ( workingDirectory->isNull() )
*workingDirectory = ::toRootIfNotExists( TQDir::currentDirPath() );
-#if defined(Q_WS_X11)
+#if defined(TQ_WS_X11)
if ( tqt_use_native_dialogs && TQTDEIntegration::enabled())
return TQTDEIntegration::getOpenFileNames( filter, workingDirectory, parent, name,
caption, selectedFilter, false ).first();
-#elif defined(Q_WS_WIN)
+#elif defined(TQ_WS_WIN)
if ( tqt_use_native_dialogs && tqApp->style().styleHint( TQStyle::SH_GUIStyle ) == WindowsStyle )
return winGetOpenFileName( initialSelection, filter, workingDirectory,
parent, name, caption, selectedFilter );
-#elif defined(Q_WS_MAC)
+#elif defined(TQ_WS_MAC)
if (tqt_use_native_dialogs && (tqApp->style().inherits(TQMAC_DEFAULT_STYLE)
|| tqApp->style().inherits("TQMacStyle")))
return qt_mac_precomposeFileName(macGetOpenFileNames(filter,
@@ -3611,15 +3611,15 @@ TQString TQFileDialog::getSaveFileName( const TQString & startWith,
if ( workingDirectory->isNull() )
*workingDirectory = ::toRootIfNotExists( TQDir::currentDirPath() );
-#if defined(Q_WS_X11)
+#if defined(TQ_WS_X11)
if ( tqt_use_native_dialogs && TQTDEIntegration::enabled())
return TQTDEIntegration::getSaveFileName( initialSelection, filter, workingDirectory,
parent, name, caption, selectedFilter );
-#elif defined(Q_WS_WIN)
+#elif defined(TQ_WS_WIN)
if ( tqt_use_native_dialogs && tqApp->style().styleHint( TQStyle::SH_GUIStyle ) == WindowsStyle )
return winGetSaveFileName( initialSelection, filter, workingDirectory,
parent, name, caption, selectedFilter );
-#elif defined(Q_WS_MAC)
+#elif defined(TQ_WS_MAC)
if (tqt_use_native_dialogs && (tqApp->style().inherits(TQMAC_DEFAULT_STYLE)
|| tqApp->style().inherits("TQMacStyle")))
return qt_mac_precomposeFileName(macGetSaveFileName(initialSelection, filter,
@@ -3666,7 +3666,7 @@ void TQFileDialog::okClicked()
{
TQString fn( nameEdit->text() );
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
TQFileInfo fi( d->url.path() + fn );
if ( fi.isSymLink() ) {
nameEdit->setText( fi.readLink() );
@@ -4128,7 +4128,7 @@ void TQFileDialog::selectDirectoryOrFile( TQListViewItem * newItem )
if ( d->url.isLocalFile() ) {
TQFileInfo fi( d->url.path() + newItem->text(0) );
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
if ( fi.isSymLink() ) {
nameEdit->setText( fi.readLink() );
okClicked();
@@ -4505,7 +4505,7 @@ TQString TQFileDialog::getExistingDirectory( const TQString & dir,
if ( workingDirectory )
wd = *workingDirectory;
-#if defined(Q_WS_X11)
+#if defined(TQ_WS_X11)
TQString initialDir;
if ( !dir.isEmpty() ) {
TQUrlOperator u( dir );
@@ -4515,7 +4515,7 @@ TQString TQFileDialog::getExistingDirectory( const TQString & dir,
initialDir = TQString::null;
if ( tqt_use_native_dialogs && TQTDEIntegration::enabled())
return TQTDEIntegration::getExistingDirectory( initialDir, parent, name, caption );
-#elif defined(Q_WS_WIN)
+#elif defined(TQ_WS_WIN)
TQString initialDir;
if ( !dir.isEmpty() ) {
TQUrlOperator u( dir );
@@ -4526,7 +4526,7 @@ TQString TQFileDialog::getExistingDirectory( const TQString & dir,
if ( tqt_use_native_dialogs && tqApp->style().styleHint( TQStyle::SH_GUIStyle ) == WindowsStyle && dirOnly )
return winGetExistingDirectory( initialDir, parent, name, caption );
#endif
-#if defined(Q_WS_MAC)
+#if defined(TQ_WS_MAC)
TQString *initialDir = 0;
if (!dir.isEmpty()) {
TQUrlOperator u(dir);
@@ -5049,7 +5049,7 @@ TQFileIconProvider * TQFileDialog::iconProvider()
}
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
// ### FIXME: this code is duplicated in qdns.cpp
static TQString getWindowsRegString( HKEY key, const TQString &subKey )
@@ -5442,7 +5442,7 @@ bool TQFileDialog::eventFilter( TQObject * o, TQEvent * e )
} else if ( o == nameEdit && e->type() == TQEvent::KeyPress && d->mode != AnyFile ) {
if ( ( nameEdit->cursorPosition() == (int)nameEdit->text().length() || nameEdit->hasSelectedText() ) &&
isprint(((TQKeyEvent *)e)->ascii()) ) {
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
TQString nt( nameEdit->text().lower() );
#else
TQString nt( nameEdit->text() );
@@ -5450,7 +5450,7 @@ bool TQFileDialog::eventFilter( TQObject * o, TQEvent * e )
nt.truncate( nameEdit->cursorPosition() );
nt += (char)(((TQKeyEvent *)e)->ascii());
TQListViewItem * i = files->firstChild();
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
while( i && i->text( 0 ).left(nt.length()).lower() != nt )
#else
while( i && i->text( 0 ).left(nt.length()) != nt )
@@ -5679,13 +5679,13 @@ TQStringList TQFileDialog::getOpenFileNames( const TQString & filter,
}
}
-#if defined(Q_WS_X11)
+#if defined(TQ_WS_X11)
if ( tqt_use_native_dialogs && TQTDEIntegration::enabled())
return TQTDEIntegration::getOpenFileNames( filter, workingDirectory, parent, name, caption, selectedFilter, true );
-#elif defined(Q_WS_WIN)
+#elif defined(TQ_WS_WIN)
if ( tqt_use_native_dialogs && tqApp->style().styleHint( TQStyle::SH_GUIStyle ) == WindowsStyle )
return winGetOpenFileNames( filter, workingDirectory, parent, name, caption, selectedFilter );
-#elif defined(Q_WS_MAC)
+#elif defined(TQ_WS_MAC)
if (tqt_use_native_dialogs && (tqApp->style().inherits(TQMAC_DEFAULT_STYLE)
|| tqApp->style().inherits("TQMacStyle"))) {
TQStringList sl = macGetOpenFileNames(filter, dir.isEmpty() ? 0 : workingDirectory, parent,
@@ -5786,7 +5786,7 @@ void TQFileDialog::urlStart( TQNetworkOperation *op )
if ( !op )
return;
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
qt_ntfs_permission_lookup--;
#endif
if ( op->operation() == TQNetworkProtocol::OpListChildren ) {
@@ -5812,7 +5812,7 @@ void TQFileDialog::urlStart( TQNetworkOperation *op )
TQString s = d->url.toString( FALSE, FALSE );
bool found = FALSE;
for ( int i = 0; i < d->paths->count(); ++i ) {
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
if ( d->paths->text( i ).lower() == s.lower() ) {
#else
if ( d->paths->text( i ) == s ) {
@@ -5879,7 +5879,7 @@ void TQFileDialog::urlFinished( TQNetworkOperation *op )
op == d->currListChildren ) {
if ( !d->hadDotDot && !isRoot( d->url ) ) {
bool ok = TRUE;
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
if ( d->url.path().left( 2 ) == "//" )
ok = FALSE;
#endif
@@ -5907,7 +5907,7 @@ void TQFileDialog::urlFinished( TQNetworkOperation *op )
d->progressDia = 0;
}
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
if (d->oldPermissionLookup != qt_ntfs_permission_lookup)
qt_ntfs_permission_lookup++;
#endif
@@ -5968,14 +5968,14 @@ void TQFileDialog::insertEntry( const TQValueList<TQUrlInfo> &lst, TQNetworkOper
d->hadDotDot = TRUE;
if ( isRoot( d->url ) )
continue;
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
if ( d->url.path().left( 2 ) == "//" )
continue;
#endif
} else if ( inf.name() == "." )
continue;
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
// Workaround a Windows bug, '..' is apparantly hidden in directories
// that are one level away from root
if ( !bShowHiddenFiles && inf.name() != ".." ) {