mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-04-11 17:59:58 +02:00
Fix windows vista warning.
Thanks LETARTARE git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4994 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -48,13 +48,12 @@ QString QETApp::config_dir = QString();
|
|||||||
QString QETApp::lang_dir = QString();
|
QString QETApp::lang_dir = QString();
|
||||||
TitleBlockTemplatesFilesCollection *QETApp::common_tbt_collection_;
|
TitleBlockTemplatesFilesCollection *QETApp::common_tbt_collection_;
|
||||||
TitleBlockTemplatesFilesCollection *QETApp::custom_tbt_collection_;
|
TitleBlockTemplatesFilesCollection *QETApp::custom_tbt_collection_;
|
||||||
ElementsCollectionCache *QETApp::collections_cache_ = 0;
|
ElementsCollectionCache *QETApp::collections_cache_ = nullptr;
|
||||||
QMap<uint, QETProject *> QETApp::registered_projects_ = QMap<uint, QETProject *>();
|
QMap<uint, QETProject *> QETApp::registered_projects_ = QMap<uint, QETProject *>();
|
||||||
uint QETApp::next_project_id = 0;
|
uint QETApp::next_project_id = 0;
|
||||||
RecentFiles *QETApp::projects_recent_files_ = 0;
|
RecentFiles *QETApp::projects_recent_files_ = nullptr;
|
||||||
RecentFiles *QETApp::elements_recent_files_ = 0;
|
RecentFiles *QETApp::elements_recent_files_ = nullptr;
|
||||||
AboutQET *QETApp::about_dialog_ = 0;
|
TitleBlockTemplate *QETApp::default_titleblock_template_ = nullptr;
|
||||||
TitleBlockTemplate *QETApp::default_titleblock_template_ = 0;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Constructeur
|
Constructeur
|
||||||
@@ -125,9 +124,6 @@ QETApp::~QETApp() {
|
|||||||
delete splash_screen_;
|
delete splash_screen_;
|
||||||
delete elements_recent_files_;
|
delete elements_recent_files_;
|
||||||
delete projects_recent_files_;
|
delete projects_recent_files_;
|
||||||
if (about_dialog_) {
|
|
||||||
delete about_dialog_;
|
|
||||||
}
|
|
||||||
delete qsti;
|
delete qsti;
|
||||||
if (custom_tbt_collection_) delete custom_tbt_collection_;
|
if (custom_tbt_collection_) delete custom_tbt_collection_;
|
||||||
if (common_tbt_collection_) delete common_tbt_collection_;
|
if (common_tbt_collection_) delete common_tbt_collection_;
|
||||||
@@ -1233,32 +1229,17 @@ void QETApp::configureQET() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Dialogue "A propos de QElectroTech"
|
* @brief QETApp::aboutQET
|
||||||
Le dialogue en question est cree lors du premier appel de cette fonction.
|
* Open the dialog about qet.
|
||||||
En consequence, sa premiere apparition n'est pas immediate. Par la suite,
|
*/
|
||||||
le dialogue n'a pas a etre recree et il apparait instantanement. Il est
|
void QETApp::aboutQET()
|
||||||
detruit en meme temps que l'application.
|
{
|
||||||
*/
|
AboutQET aq(activeWindow());
|
||||||
void QETApp::aboutQET() {
|
|
||||||
// determine le widget parent a utiliser pour le dialogue
|
|
||||||
QWidget *parent_widget = activeWindow();
|
|
||||||
|
|
||||||
// cree le dialogue si cela n'a pas deja ete fait
|
#ifdef Q_OS_MACOS
|
||||||
if (!about_dialog_) {
|
aq.setWindowFlags(Qt::Sheet);
|
||||||
about_dialog_ = new AboutQET();
|
|
||||||
}
|
|
||||||
|
|
||||||
// associe le dialogue a un eventuel widget parent
|
|
||||||
if (parent_widget) {
|
|
||||||
#ifdef Q_OS_MAC
|
|
||||||
about_dialog_ -> setWindowFlags(Qt::Sheet);
|
|
||||||
#endif
|
#endif
|
||||||
about_dialog_ -> setParent(parent_widget, about_dialog_ -> windowFlags());
|
aq.exec();
|
||||||
}
|
|
||||||
|
|
||||||
// affiche le dialogue puis evite de le lier a un quelconque widget parent
|
|
||||||
about_dialog_ -> exec();
|
|
||||||
about_dialog_ -> setParent(0, about_dialog_ -> windowFlags());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -175,7 +175,6 @@ class QETApp : public QETSingleApplication {
|
|||||||
static uint next_project_id;
|
static uint next_project_id;
|
||||||
static RecentFiles *projects_recent_files_;
|
static RecentFiles *projects_recent_files_;
|
||||||
static RecentFiles *elements_recent_files_;
|
static RecentFiles *elements_recent_files_;
|
||||||
static AboutQET *about_dialog_;
|
|
||||||
static TitleBlockTemplate *default_titleblock_template_;
|
static TitleBlockTemplate *default_titleblock_template_;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|||||||
Reference in New Issue
Block a user