#include "SUIT_Tools.h"
#include "SUIT_Session.h"
-#include "SUIT_Desktop.h"
#include "SUIT_MessageBox.h"
#include "SUIT_ResourceMgr.h"
#include "SUIT_FileValidator.h"
-#include <qdir.h>
-#include <qlabel.h>
-#include <qregexp.h>
-#include <qpalette.h>
-#include <qobjectlist.h>
-#include <qcombobox.h>
-#include <qpushbutton.h>
-#include <qapplication.h>
+#include <QDir>
+#include <QEvent>
+#include <QRegExp>
+#include <QLabel>
+#include <QComboBox>
+#include <QPushButton>
+#include <QGridLayout>
+#include <QApplication>
#define MIN_COMBO_SIZE 100
QString SUIT_FileDlg::myLastVisitedPath;
/*! Constructor */
-SUIT_FileDlg::SUIT_FileDlg( QWidget* parent, bool open, bool showQuickDir, bool modal ) :
-QFileDialog( parent, 0, modal ),
+SUIT_FileDlg::SUIT_FileDlg( QWidget* parent, bool open, bool showQuickDir, bool modal )
+: QFileDialog( parent ),
+myOpen( open ),
myValidator( 0 ),
-myQuickCombo( 0 ), myQuickButton( 0 ), myQuickLab( 0 ),
-myOpen( open )//,
+myQuickLab( 0 ),
+myQuickCombo( 0 ),
+myQuickButton( 0 )//,
//myAccepted( false )
-{
- const QObjectList* child = children();
- QObjectList::const_iterator anIt = child->begin(), aLast = child->end();
- for( ; anIt!=aLast; anIt++ )
- if( (*anIt)->inherits( "QPushButton" ) )
+{
+ setModal( modal );
+
+ const QObjectList& child = children();
+ for ( QObjectList::const_iterator anIt = child.begin(); anIt != child.end(); ++anIt )
+ {
+ QPushButton* pb = ::qobject_cast<QPushButton*>( *anIt );
+ if ( pb )
{
- QPushButton* bt = ( QPushButton* )( *anIt );
- bt->setDefault( false );
- bt->setAutoDefault( false );
+ pb->setDefault( false );
+ pb->setAutoDefault( false );
}
+ }
- if ( parent->icon() )
- setIcon( *parent->icon() );
+ if ( parent )
+ setWindowIcon( parent->windowIcon() );
setSizeGripEnabled( true );
- if ( showQuickDir ) {
+ QGridLayout* grid = ::qobject_cast<QGridLayout*>( layout() );
+ if ( showQuickDir && grid )
+ {
// inserting quick dir combo box
- myQuickLab = new QLabel(tr("LAB_QUICK_PATH"), this);
- myQuickCombo = new QComboBox(false, this);
- myQuickCombo->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
- myQuickCombo->setMinimumSize(MIN_COMBO_SIZE, 0);
+ myQuickLab = new QLabel( tr( "LAB_QUICK_PATH" ), this );
+ myQuickCombo = new QComboBox( this );
+ myQuickCombo->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+ myQuickCombo->setMinimumSize( MIN_COMBO_SIZE, 0 );
- myQuickButton = new QPushButton(tr("BUT_ADD_PATH"), this);
+ myQuickButton = new QPushButton( tr( "BUT_ADD_PATH" ), this );
+
+ connect( myQuickCombo, SIGNAL( activated( const QString& ) ), this, SLOT( quickDir( const QString& ) ) );
+ connect( myQuickButton, SIGNAL( clicked() ), this, SLOT( addQuickDir() ) );
- connect(myQuickCombo, SIGNAL(activated(const QString&)), this, SLOT(quickDir(const QString&)));
- connect(myQuickButton, SIGNAL(clicked()), this, SLOT(addQuickDir()));
- addWidgets(myQuickLab, myQuickCombo, myQuickButton);
+ int row = grid->rowCount();
+ grid->addWidget( myQuickLab, row, 0 );
+ grid->addWidget( myQuickCombo, row, 1, 1, 3 );
+ grid->addWidget( myQuickButton, row, 5 );
// getting dir list from settings
QString dirs;
if ( resMgr )
dirs = resMgr->stringValue( "FileDlg", QString( "QuickDirList" ) );
- QStringList dirList = QStringList::split(';', dirs, false);
- if (dirList.count() > 0) {
- for (unsigned i = 0; i < dirList.count(); i++)
- myQuickCombo->insertItem(dirList[i]);
- }
- else {
- myQuickCombo->insertItem(QDir::homeDirPath());
+ QStringList dirList = dirs.split( ';' );
+ if ( dirList.count() > 0 )
+ {
+ for ( int i = 0; i < dirList.count(); i++ )
+ myQuickCombo->addItem( dirList[i] );
}
+ else
+ myQuickCombo->addItem( QDir::homePath() );
}
- setMode( myOpen ? ExistingFile : AnyFile );
- setCaption( myOpen ? tr( "INF_DESK_DOC_OPEN" ) : tr( "INF_DESK_DOC_SAVE" ) );
+ setAcceptMode( myOpen ? AcceptOpen: AcceptSave );
+ setWindowTitle( myOpen ? tr( "INF_DESK_DOC_OPEN" ) : tr( "INF_DESK_DOC_SAVE" ) );
// If last visited path doesn't exist -> switch to the first preferred path
- if ( !myLastVisitedPath.isEmpty() ) {
+ if ( !myLastVisitedPath.isEmpty() )
+ {
if ( !processPath( myLastVisitedPath ) && showQuickDir )
- processPath( myQuickCombo->text( 0 ) );
+ processPath( myQuickCombo->itemText( 0 ) );
}
- else {
+ else
+ {
if ( showQuickDir )
- processPath(myQuickCombo->text( 0 ) );
- }
+ processPath( myQuickCombo->itemText( 0 ) );
+ }
// set default file validator
myValidator = new SUIT_FileValidator(this);
setValidator( 0 );
}
+bool SUIT_FileDlg::event( QEvent* e )
+{
+ bool res = QFileDialog::event( e );
+
+ if ( e->type() == QEvent::Polish )
+ polish();
+
+ return res;
+}
+
/*! Redefined from QFileDialog.*/
void SUIT_FileDlg::polish()
{
- QFileDialog::polish();
- if ( myQuickButton && myQuickLab ) {
+/*
+ if ( myQuickButton && myQuickLab )
+ {
// the following is a workaround for proper layouting of custom widgets
QValueList<QPushButton*> buttonList;
QValueList<QLabel*> labelList;
(*lListIt)->setFixedWidth( maxLabWidth );
}
}
+*/
}
/*! Sets validator for file names to open/save
* (e.g. permission denied)
*/
// if ( !myAccepted ) {
- if ( mode() != ExistingFiles ) {
- mySelectedFile = QFileDialog::selectedFile();
+ if ( acceptMode() != AcceptOpen )
+ {
+ QString fn;
+ QStringList lst = QFileDialog::selectedFiles();
+ if ( !lst.isEmpty() )
+ fn = lst.first();
+ mySelectedFile = fn;
addExtension();
}
- if ( acceptData() ) {
- myLastVisitedPath = dirPath();
+ if ( acceptData() )
+ {
+ myLastVisitedPath = directory().path();
QFileDialog::accept();
// myAccepted = true;
}
{
if ( isOpenDlg() )
{
- if ( mode() == ExistingFiles )
+ if ( acceptMode() == AcceptOpen )
{
QStringList fileNames = selectedFiles();
for ( int i = 0; i < (int)fileNames.count(); i++ )
void SUIT_FileDlg::addExtension()
{
// check if file name entered is empty
- if ( mySelectedFile.stripWhiteSpace().isEmpty() )
+ if ( mySelectedFile.trimmed().isEmpty() )
return;
// current file extension
- QString anExt = "." + SUIT_Tools::extension( mySelectedFile.stripWhiteSpace() ).stripWhiteSpace();
+ QString anExt = "." + SUIT_Tools::extension( mySelectedFile.trimmed() ).trimmed();
// If the file already has extension and it does not match the filter there are two choices:
// - to leave it 'as is'
if ( anExt != "." && !IGNORE_NON_MATCHING_EXTENSION )
return;
- // get selected file filter
-#if QT_VERSION < 0x030000
- QRegExp r( QString::fromLatin1("(?[a-zA-Z0-9.*? +;#|]*)?$") );
- int len, index = r.match( selectedFilter().stripWhiteSpace(), 0, &len );
-#else
QRegExp r( QString::fromLatin1("\\(?[a-zA-Z0-9.*? +;#|]*\\)?$") );
- int index = r.search( selectedFilter().stripWhiteSpace() );
-#endif
+ int index = r.indexIn( selectedFilter().trimmed() );
if ( index >= 0 ) {
// Create wildcard regular expression basing on selected filter
// Due to transformations from the filter list (*.txt *.*xx *.c++ SUIT*.* ) we
// will have the pattern (\.txt|\..*xx|\.c\+\+|\..*) (as we validate extension only,
// we remove everything except extension mask from the pattern
-#if QT_VERSION < 0x030000
- QString wildcard = selectedFilter().mid( index, len ).stripWhiteSpace();
-#else
- QString wildcard = selectedFilter().mid( index, r.matchedLength() ).stripWhiteSpace();
-#endif
+ QString wildcard = selectedFilter().mid( index, r.matchedLength() ).trimmed();
// replace '|' and ';' separators by space symbol and also brackets if there are some
wildcard.replace( QRegExp( "[\\|;|(|)]" )," " );
- QString aPattern = wildcard.replace( QRegExp( "(^| )(\\s*)[0-9a-zA-Z*_?]*\\."), " \\." ).stripWhiteSpace().
+ QString aPattern = wildcard.replace( QRegExp( "(^| )(\\s*)[0-9a-zA-Z*_?]*\\."), " \\." ).trimmed().
replace( QRegExp( "\\s+" ), "|" ).replace( QRegExp( "[?]" ),".?" ).
replace( QRegExp( "[*]" ),".*" ).replace( QRegExp( "[+]" ),"\\+" );
// now we get the list of all extension masks and remove all which does not contain wildcard symbols
- QStringList extList = QStringList::split( "|",aPattern );
- for( int i = extList.count() - 1; i >= 0; i-- ) {
+ QStringList extList = aPattern.split( "|", QString::SkipEmptyParts );
+ for ( int i = extList.count() - 1; i >= 0; i-- )
+ {
if ( !extList[i].contains( "." ) )
- extList.remove( extList.at( i ) );
+ extList.removeAt( i );
}
aPattern = extList.join( "|" );
QRegExp anExtRExp( "^("+ aPattern + ")$" );
// Check if the current file extension matches the pattern
- if ( anExtRExp.match( anExt ) < 0 )
+ if ( !anExtRExp.exactMatch( anExt ) )
{
// find first appropriate extension in the selected filter
// (it should be without wildcard symbols)
for ( int i = 0; i < (int)extList.count(); i++ )
{
QString newExt = extList[i].replace( QRegExp( "[\\\\][+]" ),"+" );
- int res = newExt.findRev( '.' );
+ int res = newExt.lastIndexOf( '.' );
if ( res >= 0 )
newExt = newExt.mid( res + 1 );
- if ( newExt.find( QRegExp("[*|?]" ) ) < 0 )
+ if ( newExt.indexOf( QRegExp("[*|?]" ) ) < 0 )
{
- mySelectedFile.stripWhiteSpace();
+ mySelectedFile.trimmed();
mySelectedFile += mySelectedFile.endsWith(".") ? newExt : QString(".") + newExt;
break;
}
/*! Processes selection : tries to set given path or filename as selection */
bool SUIT_FileDlg::processPath( const QString& path )
{
- if ( !path.isNull() ) {
+ if ( !path.isNull() )
+ {
QFileInfo fi( path );
- if ( fi.exists() ) {
+ if ( fi.exists() )
+ {
if ( fi.isFile() )
- setSelection( path );
+ selectFile( path );
else if ( fi.isDir() )
- setDir( path );
+ setDirectory( path );
return true;
}
- else {
- if ( QFileInfo( fi.dirPath() ).exists() ) {
- setDir( fi.dirPath() );
- setSelection( path );
- return true;
+ else
+ {
+ if ( QFileInfo( SUIT_Tools::dir( path ) ).exists() )
+ {
+ setDirectory( SUIT_Tools::dir( path ) );
+ selectFile( path );
+ return true;
}
}
}
void SUIT_FileDlg::quickDir(const QString& dirPath)
{
QString aPath = dirPath;
- if ( !QDir(aPath).exists() ) {
- aPath = QDir::homeDirPath();
+ if ( !QDir(aPath).exists() )
+ {
+ aPath = QDir::homePath();
SUIT_MessageBox::error1(this,
tr("ERR_ERROR"),
tr("ERR_DIR_NOT_EXIST").arg(dirPath),
*/
void SUIT_FileDlg::addQuickDir()
{
- QString dp = dirPath();
- if ( !dp.isEmpty() ) {
+ QString dp = directory().path();
+ if ( !dp.isEmpty() )
+ {
QDir dir( dp );
// getting dir list from settings
QString dirs;
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
if ( resMgr )
dirs = resMgr->stringValue( "FileDlg", QString( "QuickDirList" ) );
- QStringList dirList = QStringList::split(';', dirs, false);
+ QStringList dirList = dirs.split( ';', QString::SkipEmptyParts );
bool found = false;
bool emptyAndHome = false;
- if ( dirList.count() > 0 ) {
- for ( unsigned i = 0; i < dirList.count(); i++ ) {
- QDir aDir( dirList[i] );
- if ( aDir.canonicalPath().isNull() && dirList[i] == dir.absPath() ||
- !aDir.canonicalPath().isNull() && aDir.exists() && aDir.canonicalPath() == dir.canonicalPath() ) {
- found = true;
- break;
- }
+ if ( dirList.count() > 0 )
+ {
+ for ( int i = 0; i < dirList.count(); i++ )
+ {
+ QDir aDir( dirList[i] );
+ if ( aDir.canonicalPath().isNull() && dirList[i] == dir.absolutePath() ||
+ !aDir.canonicalPath().isNull() && aDir.exists() && aDir.canonicalPath() == dir.canonicalPath() )
+ {
+ found = true;
+ break;
+ }
}
}
- else {
- emptyAndHome = dir.canonicalPath() == QDir(QDir::homeDirPath()).canonicalPath();
- }
- if ( !found ) {
+ else
+ emptyAndHome = dir.canonicalPath() == QDir( QDir::homePath() ).canonicalPath();
+
+ if ( !found )
+ {
dirList.append( dp );
- resMgr->setValue( "FileDlg", QString( "QuickDirList" ), dirList.join(";") );
+ resMgr->setValue( "FileDlg", QString( "QuickDirList" ), dirList.join( ";" ) );
if ( !emptyAndHome )
- myQuickCombo->insertItem( dp );
+ myQuickCombo->addItem( dp );
}
}
}
/*!
Returns the file name for Open/Save [ static ]
*/
-QString SUIT_FileDlg::getFileName( QWidget* parent,
- const QString& initial,
- const QStringList& filters,
- const QString& caption,
- bool open,
- bool showQuickDir,
- SUIT_FileValidator* validator )
+QString SUIT_FileDlg::getFileName( QWidget* parent, const QString& initial, const QStringList& filters,
+ const QString& caption, bool open, bool showQuickDir,
+ SUIT_FileValidator* validator )
{
SUIT_FileDlg* fd = new SUIT_FileDlg( parent, open, showQuickDir, true );
if ( !caption.isEmpty() )
- fd->setCaption( caption );
- if ( !initial.isEmpty() ) {
+ fd->setWindowTitle( caption );
+ if ( !initial.isEmpty() )
fd->processPath( initial ); // VSR 24/03/03 check for existing of directory has been added to avoid QFileDialog's bug
- }
- fd->setFilters( filters );
+
+ fd->setFilters( filters );
if ( validator )
fd->setValidator( validator );
+
fd->exec();
+
QString filename = fd->selectedFile();
delete fd;
- qApp->processEvents();
+
+ QApplication::processEvents();
+
return filename;
}
-
/*!
Returns the list of files to be opened [ static ]
*/
-QStringList SUIT_FileDlg::getOpenFileNames( QWidget* parent,
- const QString& initial,
- const QStringList& filters,
- const QString& caption,
- bool showQuickDir,
- SUIT_FileValidator* validator )
+QStringList SUIT_FileDlg::getOpenFileNames( QWidget* parent, const QString& initial, const QStringList& filters,
+ const QString& caption, bool showQuickDir, SUIT_FileValidator* validator )
{
SUIT_FileDlg* fd = new SUIT_FileDlg( parent, true, showQuickDir, true );
- fd->setMode( ExistingFiles );
+ fd->setFileMode( ExistingFiles );
if ( !caption.isEmpty() )
- fd->setCaption( caption );
- if ( !initial.isEmpty() ) {
+ fd->setWindowTitle( caption );
+ if ( !initial.isEmpty() )
fd->processPath( initial ); // VSR 24/03/03 check for existing of directory has been added to avoid QFileDialog's bug
- }
+
fd->setFilters( filters );
if ( validator )
fd->setValidator( validator );
+
fd->exec();
QStringList filenames = fd->selectedFiles();
delete fd;
- qApp->processEvents();
+
+ QApplication::processEvents();
return filenames;
}
/*!
Existing directory selection dialog [ static ]
*/
-QString SUIT_FileDlg::getExistingDirectory( QWidget* parent,
- const QString& initial,
- const QString& caption,
- bool showQuickDir )
+QString SUIT_FileDlg::getExistingDirectory( QWidget* parent, const QString& initial,
+ const QString& caption, bool showQuickDir )
{
- SUIT_FileDlg* fd = new SUIT_FileDlg( parent, true, showQuickDir, true);
+ SUIT_FileDlg* fd = new SUIT_FileDlg( parent, true, showQuickDir, true );
if ( !caption.isEmpty() )
- fd->setCaption( caption );
- if ( !initial.isEmpty() ) {
+ fd->setWindowTitle( caption );
+ if ( !initial.isEmpty() )
fd->processPath( initial ); // VSR 24/03/03 check for existing of directory has been added to avoid QFileDialog's bug
- }
- fd->setMode( DirectoryOnly );
- fd->setFilters(tr("INF_DIRECTORIES_FILTER"));
+
+ fd->setFileMode( DirectoryOnly );
+ fd->setFilters( QStringList( tr( "INF_DIRECTORIES_FILTER" ) ) );
+
fd->exec();
+
QString dirname = fd->selectedFile();
delete fd;
- qApp->processEvents();
- return dirname;
-
-}
-
-/*!
- QFileDialog::dirPath() has a bug on Linux Debian (1 level up from correct
- directory is returned). This function fixes the bug.
-*/
-QString SUIT_FileDlg::dirPath() const
-{
- if ( !mySelectedFile.isNull() )
- return QFileInfo( mySelectedFile ).dirPath();
- const QDir* aDir = dir();
- if ( aDir->exists() )
- return aDir->absPath();
-
- return QFileDialog::dirPath();
+ QApplication::processEvents();
+ return dirname;
}
*/
#include "SUIT_MessageBox.h"
+
#include "SUIT_OverrideCursor.h"
-#include <qmessagebox.h>
-#include <qapplication.h>
+#include <QMessageBox>
+#include <QApplication>
/*!
Shows info message box with one button [ static ]
*/
-int SUIT_MessageBox::info1( QWidget* parent,
- const QString& caption,
- const QString& text,
- const QString& textButton0 )
+int SUIT_MessageBox::info1( QWidget* parent, const QString& caption,
+ const QString& text, const QString& textButton0 )
{
- SUIT_OverrideCursor cw( parent ? parent->cursor() : Qt::arrowCursor );
+ SUIT_OverrideCursor cw( parent ? parent->cursor() : Qt::ArrowCursor );
int ret = QMessageBox::information( parent, caption, text, textButton0,
QString::null, QString::null, 0, 0 );
- qApp->processEvents();
+ QApplication::processEvents();
return ret;
}
const QString& text,
const QString& textButton0 )
{
- SUIT_OverrideCursor cw( parent ? parent->cursor() : Qt::arrowCursor );
+ SUIT_OverrideCursor cw( parent ? parent->cursor() : Qt::ArrowCursor );
int ret = QMessageBox::warning( parent, caption, text, textButton0,
QString::null, QString::null, 0, 0 );
- qApp->processEvents();
+ QApplication::processEvents();
return ret;
}
const QString& text,
const QString& textButton0 )
{
- SUIT_OverrideCursor cw( parent ? parent->cursor() : Qt::arrowCursor );
+ SUIT_OverrideCursor cw( parent ? parent->cursor() : Qt::ArrowCursor );
int ret = QMessageBox::critical( parent, caption, text, textButton0,
QString::null, QString::null, 0, 0 );
- qApp->processEvents();
+ QApplication::processEvents();
return ret;
}
const QString& text,
const QString& textButton0 )
{
- SUIT_OverrideCursor cw( parent ? parent->cursor() : Qt::arrowCursor );
+ SUIT_OverrideCursor cw( parent ? parent->cursor() : Qt::ArrowCursor );
int ret = QMessageBox::question( parent, caption, text, textButton0,
QString::null, QString::null, 0, 0 );
- qApp->processEvents();
+ QApplication::processEvents();
return ret;
}
const QString& textButton1,
int idButton0, int idButton1, int idDefault )
{
- SUIT_OverrideCursor cw( parent ? parent->cursor() : Qt::arrowCursor );
+ SUIT_OverrideCursor cw( parent ? parent->cursor() : Qt::ArrowCursor );
if ( idDefault == idButton0 )
idDefault = 0;
else if ( idDefault == idButton1 )
int ret = QMessageBox::information( parent, caption, text, textButton0,
textButton1, QString::null, idDefault );
- qApp->processEvents();
+ QApplication::processEvents();
return ( ret == 0 ? idButton0 : idButton1 );
}
const QString& textButton1,
int idButton0, int idButton1, int idDefault )
{
- SUIT_OverrideCursor cw( parent ? parent->cursor() : Qt::arrowCursor );
+ SUIT_OverrideCursor cw( parent ? parent->cursor() : Qt::ArrowCursor );
if ( idDefault == idButton0 )
idDefault = 0;
int ret = QMessageBox::warning( parent, caption, text, textButton0,
textButton1, QString::null, idDefault );
- qApp->processEvents();
+ QApplication::processEvents();
return ( ret == 0 ? idButton0 : idButton1 );
}
const QString& textButton1,
int idButton0, int idButton1, int idDefault )
{
- SUIT_OverrideCursor cw( parent ? parent->cursor() : Qt::arrowCursor );
+ SUIT_OverrideCursor cw( parent ? parent->cursor() : Qt::ArrowCursor );
if ( idDefault == idButton0 )
idDefault = 0;
int ret = QMessageBox::critical( parent, caption, text, textButton0,
textButton1, QString::null, idDefault );
- qApp->processEvents();
+ QApplication::processEvents();
return ( ret == 0 ? idButton0 : idButton1 );
}
const QString& textButton1,
int idButton0, int idButton1, int idDefault )
{
- SUIT_OverrideCursor cw( parent ? parent->cursor() : Qt::arrowCursor );
+ SUIT_OverrideCursor cw( parent ? parent->cursor() : Qt::ArrowCursor );
if ( idDefault == idButton0 )
idDefault = 0;
int ret = QMessageBox::question( parent, caption, text, textButton0,
textButton1, QString::null, idDefault );
- qApp->processEvents();
+ QApplication::processEvents();
return ( ret == 0 ? idButton0 : idButton1 );
}
int idButton0, int idButton1,
int idButton2, int idDefault )
{
- SUIT_OverrideCursor cw( parent ? parent->cursor() : Qt::arrowCursor );
+ SUIT_OverrideCursor cw( parent ? parent->cursor() : Qt::ArrowCursor );
if ( idDefault == idButton0 )
idDefault = 0;
int ret = QMessageBox::information( parent, caption, text, textButton0,
textButton1, textButton2, idDefault );
- qApp->processEvents();
+ QApplication::processEvents();
switch ( ret )
{
case 0:
int idButton0, int idButton1,
int idButton2, int idDefault )
{
- SUIT_OverrideCursor cw( parent ? parent->cursor() : Qt::arrowCursor );
+ SUIT_OverrideCursor cw( parent ? parent->cursor() : Qt::ArrowCursor );
if ( idDefault == idButton0 )
idDefault = 0;
int ret = QMessageBox::warning( parent, caption, text, textButton0,
textButton1, textButton2, idDefault );
- qApp->processEvents();
+ QApplication::processEvents();
switch ( ret )
{
case 0:
int idButton0, int idButton1,
int idButton2, int idDefault )
{
- SUIT_OverrideCursor cw( parent ? parent->cursor() : Qt::arrowCursor );
+ SUIT_OverrideCursor cw( parent ? parent->cursor() : Qt::ArrowCursor );
if ( idDefault == idButton0 )
idDefault = 0;
int ret = QMessageBox::critical( parent, caption, text, textButton0,
textButton1, textButton2, idDefault );
- qApp->processEvents();
+ QApplication::processEvents();
switch ( ret )
{
case 0:
int idButton0, int idButton1,
int idButton2, int idDefault )
{
- SUIT_OverrideCursor cw( parent ? parent->cursor() : Qt::arrowCursor );
+ SUIT_OverrideCursor cw( parent ? parent->cursor() : Qt::ArrowCursor );
if ( idDefault == idButton0 )
idDefault = 0;
int ret = QMessageBox::question( parent, caption, text, textButton0,
textButton1, textButton2, idDefault );
- qApp->processEvents();
+ QApplication::processEvents();
switch ( ret )
{
case 0: