| 29 | namespace lay { |
| 30 | |
| 31 | bool |
| 32 | has_gui () |
| 33 | { |
| 34 | #if defined(HAVE_QT) |
| 35 | #if QT_VERSION < 0x50000 |
| 36 | return (QApplication::type () != QApplication::Tty); |
| 37 | #else |
| 38 | return (dynamic_cast<QGuiApplication *> (QCoreApplication::instance ()) != 0); |
| 39 | #endif |
| 40 | #else |
| 41 | return false; |
| 42 | #endif |
| 43 | } |
| 44 | |
| 45 | } |
no test coverage detected