From 85b0efbc68f70789a45d2b01163b80306755ea4d Mon Sep 17 00:00:00 2001 From: scorpio810 Date: Thu, 16 Aug 2018 01:59:51 +0000 Subject: [PATCH] Try to fix macOS FTBFS git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5483 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- SingleApplication/singleapplication_p.cpp | 3 +- sources/qetapp.cpp | 34 +++++++++++------------ sources/qetapp.h | 2 +- 3 files changed, 19 insertions(+), 20 deletions(-) diff --git a/SingleApplication/singleapplication_p.cpp b/SingleApplication/singleapplication_p.cpp index 708c0105c..d19765329 100644 --- a/SingleApplication/singleapplication_p.cpp +++ b/SingleApplication/singleapplication_p.cpp @@ -110,8 +110,7 @@ void SingleApplicationPrivate::genBlockServerName() } else { appData.addData( QStandardPaths::standardLocations( QStandardPaths::HomeLocation ).join("").toUtf8() ); } -#endif -#ifdef Q_OS_UNIX +#else QProcess process; process.start( "whoami" ); if( process.waitForFinished( 100 ) && diff --git a/sources/qetapp.cpp b/sources/qetapp.cpp index 7d690a05a..156f52577 100644 --- a/sources/qetapp.cpp +++ b/sources/qetapp.cpp @@ -1755,23 +1755,23 @@ void QETApp::fetchWindowStats( every_editor_reduced = every_element_reduced && every_diagram_reduced; } -#ifdef Q_OS_DARWIN -/** - Gere les evenements, en particulier l'evenement FileOpen sous MacOs. - @param e Evenement a gerer -*/ -bool QETApp::event(QEvent *e) { - // gere l'ouverture de fichiers (sous MacOs) - if (e -> type() == QEvent::FileOpen) { - // nom du fichier a ouvrir - QString filename = static_cast(e) -> file(); - openFiles(QStringList() << filename); - return(true); - } else { - return(QApplication::event(e)); - } -} -#endif +//#ifdef Q_OS_DARWIN +///** +// Gere les evenements, en particulier l'evenement FileOpen sous MacOs. +// @param e Evenement a gerer +//*/ +//bool QETApp::event(QEvent *e) { +// // gere l'ouverture de fichiers (sous MacOs) +// if (e -> type() == QEvent::FileOpen) { +// // nom du fichier a ouvrir +// QString filename = static_cast(e) -> file(); +// openFiles(QStringList() << filename); +// return(true); +// } else { +// return(QApplication::event(e)); +// } +//} +//#endif /** Affiche l'aide et l'usage sur la sortie standard diff --git a/sources/qetapp.h b/sources/qetapp.h index 991a12ca2..841c337b3 100644 --- a/sources/qetapp.h +++ b/sources/qetapp.h @@ -142,7 +142,7 @@ class QETApp : public QObject protected: #ifdef Q_OS_DARWIN - bool event(QEvent *); + //bool event(QEvent *); #endif // attributes