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 {
appData.addData( QStandardPaths::standardLocations( QStandardPaths::HomeLocation ).join("").toUtf8() );
}
#endif
#ifdef Q_OS_UNIX
#else
QProcess process;
process.start( "whoami" );
if( process.waitForFinished( 100 ) &&

View File

@@ -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<QFileOpenEvent *>(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<QFileOpenEvent *>(e) -> file();
// openFiles(QStringList() << filename);
// return(true);
// } else {
// return(QApplication::event(e));
// }
//}
//#endif
/**
Affiche l'aide et l'usage sur la sortie standard

View File

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