Changeset 8 for trunk/src/dialogs
- Timestamp:
- Nov 16, 2005, 8:36:46 PM (20 years ago)
- Location:
- trunk/src/dialogs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/dialogs/qfiledialog.cpp
r7 r8 991 991 return 1; 992 992 993 #if defined(Q_OS_WIN32) 993 #if defined(Q_OS_WIN32) || defined(Q_OS_OS2) 994 994 if ( sortFilesBy == QDir::Name ) { 995 995 QString name1 = i1->name().lower(); … … 3693 3693 if ( !nameEdit->text().contains( "/" ) && 3694 3694 !nameEdit->text().contains( "\\" ) 3695 #if defined(Q_OS_WIN32) 3695 #if defined(Q_OS_WIN32) || defined(Q_OS_OS2) 3696 3696 && nameEdit->text()[ 1 ] != ':' 3697 3697 #endif … … 3700 3700 else if ( nameEdit->text()[ 0 ] == '/' || 3701 3701 nameEdit->text()[ 0 ] == '\\' 3702 #if defined(Q_OS_WIN32) 3702 #if defined(Q_OS_WIN32) || defined(Q_OS_OS2) 3703 3703 || nameEdit->text()[ 1 ] == ':' 3704 3704 #endif … … 4597 4597 void QFileDialog::done( int i ) 4598 4598 { 4599 // stop any pending operations 4600 d->url.stop(); 4601 4599 4602 if ( i == QDialog::Accepted && (d->mode == ExistingFile || d->mode == ExistingFiles) ) { 4600 4603 QStringList selection = selectedFiles(); … … 5339 5342 if ( ( nameEdit->cursorPosition() == (int)nameEdit->text().length() || nameEdit->hasSelectedText() ) && 5340 5343 isprint(((QKeyEvent *)e)->ascii()) ) { 5341 #if defined(Q_WS_WIN) 5344 #if defined(Q_WS_WIN) || defined(Q_OS_OS2) 5342 5345 QString nt( nameEdit->text().lower() ); 5343 5346 #else … … 5347 5350 nt += (char)(((QKeyEvent *)e)->ascii()); 5348 5351 QListViewItem * i = files->firstChild(); 5349 #if defined(Q_WS_WIN) 5352 #if defined(Q_WS_WIN) || defined(Q_OS_OS2) 5350 5353 while( i && i->text( 0 ).left(nt.length()).lower() != nt ) 5351 5354 #else … … 5643 5646 if ( u.path() == "/" ) 5644 5647 return TRUE; 5645 #elif defined(Q_OS_WIN32) 5648 #elif defined(Q_OS_WIN32) || defined(Q_OS_OS2) 5646 5649 QString p = u.path(); 5647 5650 if ( p.length() == 3 && … … 5702 5705 bool found = FALSE; 5703 5706 for ( int i = 0; i < d->paths->count(); ++i ) { 5704 #if defined(Q_WS_WIN) 5707 #if defined(Q_WS_WIN) || defined(Q_OS_OS2) 5705 5708 if ( d->paths->text( i ).lower() == s.lower() ) { 5706 5709 #else … … 5769 5772 if ( !d->hadDotDot && !isRoot( d->url ) ) { 5770 5773 bool ok = TRUE; 5771 #if defined(Q_WS_WIN) 5774 #if defined(Q_WS_WIN) || defined(Q_OS_OS2) 5772 5775 if ( d->url.path().left( 2 ) == "//" ) 5773 5776 ok = FALSE; … … 5857 5860 if ( isRoot( d->url ) ) 5858 5861 continue; 5859 #if defined(Q_WS_WIN) 5862 #if defined(Q_WS_WIN) || defined(Q_OS_OS2) 5860 5863 if ( d->url.path().left( 2 ) == "//" ) 5861 5864 continue; … … 5885 5888 } 5886 5889 } 5890 #elif defined(Q_OS_OS2) 5891 if ( !bShowHiddenFiles ) { 5892 if ( d->url.isLocalFile() ) { 5893 QString file = d->url.path(); 5894 if ( !file.endsWith( "/" ) ) 5895 file.append( "/" ); 5896 file += inf.name(); 5897 if ( QFileInfo( file ).isHidden() ) 5898 continue; 5899 } else { 5900 if ( inf.name() != ".." && inf.name()[0] == QChar('.') ) 5901 continue; 5902 } 5903 } 5887 5904 #else 5888 5905 if ( !bShowHiddenFiles && inf.name() != ".." ) { -
trunk/src/dialogs/qmessagebox.cpp
r7 r8 53 53 #include "qnc_win.h" 54 54 #endif 55 55 #if defined(Q_WS_PM) 56 //@@TODO (dmik): this is necessary for WinAlarm() which will be 57 // probably removed from here later. 58 #include "qt_os2.h" 59 #endif 56 60 57 61 // Internal class - don't touch … … 592 596 "<p>Qt provides single-source " 593 597 "portability across MS Windows, Mac OS X, " 598 "IBM OS/2 Warp and eComStation, " 594 599 "Linux, and all major commercial Unix variants." 595 600 "<br>Qt is also available for embedded devices.</p>" … … 1034 1039 #if defined(QT_ACCESSIBILITY_SUPPORT) 1035 1040 QAccessible::updateAccessibility( this, 0, QAccessible::Alert ); 1041 #else 1042 #if defined(Q_WS_PM) 1043 //@@TODO (dmik): currently, the accessibility support is not implemented 1044 // on OS/2, but we still need to play a sound when QMessageBox is opened. 1045 ULONG alarmStyle; 1046 bool playAlarm = TRUE; 1047 switch ( icon() ) { 1048 case Warning: 1049 alarmStyle = WA_WARNING; 1050 break; 1051 case Critical: 1052 alarmStyle = WA_ERROR; 1053 break; 1054 case Information: 1055 alarmStyle = WA_NOTE; 1056 break; 1057 default: 1058 playAlarm = FALSE; 1059 break; 1060 } 1061 if ( playAlarm ) 1062 WinAlarm( HWND_DESKTOP, alarmStyle ); 1063 #endif 1036 1064 #endif 1037 1065 QDialog::showEvent( e );
Note:
See TracChangeset
for help on using the changeset viewer.