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 0d15babaa..987744d0f 100644
--- a/src/dialogs/qfiledialog.cpp
+++ b/src/dialogs/qfiledialog.cpp
@@ -95,15 +95,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>
@@ -114,7 +114,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
@@ -516,7 +516,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;
@@ -614,7 +614,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
@@ -1076,7 +1076,7 @@ public:
TQString newStr;
TQCString cName = fName.utf8();
const TQCString sChars(
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
"#%"
#else
"<>#@\"&%$:,;?={}|^~[]\'`\\*"
@@ -1123,7 +1123,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
};
@@ -2451,7 +2451,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
@@ -2479,7 +2479,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() ),
@@ -2668,7 +2668,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") )
@@ -3493,15 +3493,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,
@@ -3618,15 +3618,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,
@@ -3673,7 +3673,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() );
@@ -4135,7 +4135,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();
@@ -4512,7 +4512,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 );
@@ -4522,7 +4522,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 );
@@ -4533,7 +4533,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);
@@ -5056,7 +5056,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 )
@@ -5449,7 +5449,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() );
@@ -5457,7 +5457,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 )
@@ -5686,13 +5686,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,
@@ -5793,7 +5793,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 ) {
@@ -5819,7 +5819,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 ) {
@@ -5886,7 +5886,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
@@ -5914,7 +5914,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
@@ -5975,14 +5975,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() != ".." ) {