Try to fix macOS FTBFS

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5483 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
scorpio810
2018-08-16 01:59:51 +00:00
parent 4e9fb1b664
commit 85b0efbc68
3 changed files with 19 additions and 20 deletions

View File

@@ -110,8 +110,7 @@ void SingleApplicationPrivate::genBlockServerName()
} else { } else {
appData.addData( QStandardPaths::standardLocations( QStandardPaths::HomeLocation ).join("").toUtf8() ); appData.addData( QStandardPaths::standardLocations( QStandardPaths::HomeLocation ).join("").toUtf8() );
} }
#endif #else
#ifdef Q_OS_UNIX
QProcess process; QProcess process;
process.start( "whoami" ); process.start( "whoami" );
if( process.waitForFinished( 100 ) && if( process.waitForFinished( 100 ) &&

View File

@@ -1755,23 +1755,23 @@ void QETApp::fetchWindowStats(
every_editor_reduced = every_element_reduced && every_diagram_reduced; every_editor_reduced = every_element_reduced && every_diagram_reduced;
} }
#ifdef Q_OS_DARWIN //#ifdef Q_OS_DARWIN
/** ///**
Gere les evenements, en particulier l'evenement FileOpen sous MacOs. // Gere les evenements, en particulier l'evenement FileOpen sous MacOs.
@param e Evenement a gerer // @param e Evenement a gerer
*/ //*/
bool QETApp::event(QEvent *e) { //bool QETApp::event(QEvent *e) {
// gere l'ouverture de fichiers (sous MacOs) // // gere l'ouverture de fichiers (sous MacOs)
if (e -> type() == QEvent::FileOpen) { // if (e -> type() == QEvent::FileOpen) {
// nom du fichier a ouvrir // // nom du fichier a ouvrir
QString filename = static_cast<QFileOpenEvent *>(e) -> file(); // QString filename = static_cast<QFileOpenEvent *>(e) -> file();
openFiles(QStringList() << filename); // openFiles(QStringList() << filename);
return(true); // return(true);
} else { // } else {
return(QApplication::event(e)); // return(QApplication::event(e));
} // }
} //}
#endif //#endif
/** /**
Affiche l'aide et l'usage sur la sortie standard Affiche l'aide et l'usage sur la sortie standard

View File

@@ -142,7 +142,7 @@ class QETApp : public QObject
protected: protected:
#ifdef Q_OS_DARWIN #ifdef Q_OS_DARWIN
bool event(QEvent *); //bool event(QEvent *);
#endif #endif
// attributes // attributes