diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9d9917a --- /dev/null +++ b/.gitignore @@ -0,0 +1,57 @@ +# C++ objects and libs +*.slo +*.lo +*.o +*.a +*.la +*.lai +*.so +*.so.* +*.dll +*.dylib + +# Qt-es +object_script.*.Release +object_script.*.Debug +*_plugin_import.cpp +/.qmake.cache +/.qmake.stash +*.pro.user +*.pro.user.* +*.qbs.user +*.qbs.user.* +*.moc +moc_*.cpp +moc_*.h +qrc_*.cpp +ui_*.h +*.qmlc +*.jsc +Makefile* +*build-* +*.qm +*.prl + +# Qt unit tests +target_wrapper.* + +# QtCreator +*.autosave + +# QtCreator Qml +*.qmlproject.user +*.qmlproject.user.* + +# QtCreator CMake +CMakeLists.txt.user* + +# QtCreator 4.8< compilation database +compile_commands.json + +# QtCreator local machine specific files for imported projects +*creator.user* + +*_qmlcache.qrc + +# build directory used by QMake or QtCreator +build diff --git a/LogHandler.cpp b/LogHandler.cpp index 6632a0f..03349e6 100644 --- a/LogHandler.cpp +++ b/LogHandler.cpp @@ -233,6 +233,8 @@ void LogHandler::shareFile(const QString &filePath) { qWarning("File sharing is only implemented for iOS and Android."); #endif } + +#ifdef Q_OS_ANDROID void LogHandler::shareFileDirectly(const QString &filePath) { QJniObject context = QNativeInterface::QAndroidApplication::context(); @@ -275,4 +277,4 @@ void LogHandler::shareFileDirectly(const QString &filePath) { qWarning("Invalid context or file path object."); } } - +#endif diff --git a/LogHandler.h b/LogHandler.h index 07c32b9..af593fe 100644 --- a/LogHandler.h +++ b/LogHandler.h @@ -36,7 +36,9 @@ public: Q_INVOKABLE QString getFriendlyPath(const QString &path) const; Q_INVOKABLE bool exportLogToAdif(const QString &fileName, const QJsonArray &logData); Q_INVOKABLE void shareFile(const QString &filePath); +#ifdef Q_OS_ANDROID void shareFileDirectly(const QString &filePath); +#endif private: diff --git a/dmr.cpp b/dmr.cpp index 385e091..84364d3 100644 --- a/dmr.cpp +++ b/dmr.cpp @@ -20,7 +20,7 @@ #include #include "dmr.h" #include -#include "DroidStar.h" +#include "droidstar.h" #include #include @@ -60,7 +60,11 @@ DMR::DMR() : m_mode = "DMR"; m_dmrcnt = 0; m_flco = FLCO_GROUP; +#ifdef Q_OS_UNIX + m_attenuation = 1; //On linux audio in volume is very low if attenuation 5 is keeped +#else m_attenuation = 5; +#endif #ifdef USE_MD380_VOCODER md380_init(); #endif diff --git a/dmr.h b/dmr.h index 61eeaa7..7c4caa2 100644 --- a/dmr.h +++ b/dmr.h @@ -29,7 +29,7 @@ #include #include #include -#include "SignalEmitter.h" +//#include "SignalEmitter.h" #include diff --git a/main.cpp b/main.cpp index 1c78d92..7f246b3 100644 --- a/main.cpp +++ b/main.cpp @@ -28,6 +28,8 @@ #include "vuidupdater.h" // Include the new header #include "LogHandler.h" +using namespace Qt::Literals::StringLiterals; + int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); @@ -57,7 +59,7 @@ int main(int argc, char *argv[]) #endif // Load the main QML file - const QUrl url(u"qrc:/DroidStar/main.qml"_qs); + const QUrl url(u"qrc:/DroidStar/main.qml"_s); QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, &app, [url](QObject *obj, const QUrl &objUrl) { if (!obj && url == objUrl)