diff --git a/CMakeLists.txt b/CMakeLists.txt index e9f2439..dc8fb44 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ set(CMAKE_AUTORCC ON) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) -find_package(Qt5 COMPONENTS Widgets Sql Xml DBus REQUIRED) +find_package(Qt6 COMPONENTS Core Core5Compat Widgets Sql Xml DBus REQUIRED) set(SOURCES main.cpp @@ -22,15 +22,17 @@ set(SOURCES handler.cpp xmldriverslistreader.cpp) -qt5_add_resources(SOURCES resources/resources.qrc) +qt6_add_resources(SOURCES resources/resources.qrc) add_executable(ekosdebugger ${SOURCES}) target_link_libraries(ekosdebugger PRIVATE - Qt5::Widgets - Qt5::Sql - Qt5::Xml - Qt5::DBus + Qt6::Widgets + Qt6::Sql + Qt6::Xml + Qt6::DBus + Qt6::Core5Compat + Qt6::Core ) install(TARGETS ekosdebugger RUNTIME DESTINATION bin ) diff --git a/debuggerview.cpp b/debuggerview.cpp index f155a16..1207825 100644 --- a/debuggerview.cpp +++ b/debuggerview.cpp @@ -21,6 +21,9 @@ #include #include #include +#include +#include +#include #include "driverinfo.h" #include "userdb.h" @@ -585,8 +588,8 @@ void DebuggerView::saveKStarsLogs() QStringList pieces = KStarsLogFilePath.split( "/" ); KStarsLogFolderName = pieces.value( pieces.length() - 2 ); KStarsLogFileName = pieces.value( pieces.length() - 1 ); - QRegExp separator("[(_|.)]"); - QStringList parts = KStarsLogFileName.split(separator); +// QRegExp separator("[(_|.)]"); + QStringList parts = KStarsLogFileName.split(QRegularExpression("[(_|.)]")); timestamp = KStarsLogFolderName + "T" + parts[1]; } else @@ -614,7 +617,7 @@ void DebuggerView::saveKStarsLogs() if ( debugfile.open(QIODevice::ReadWrite) ) { QTextStream stream( &debugfile ); - stream << debugLog << endl; + stream << debugLog << Qt::endl; } debugfile.close(); @@ -715,7 +718,7 @@ void DebuggerView::saveINDILogs() if ( debugfile.open(QIODevice::ReadWrite) ) { QTextStream stream( &debugfile ); - stream << debugLog << endl; + stream << debugLog << Qt::endl; } debugfile.close(); @@ -724,7 +727,7 @@ void DebuggerView::saveINDILogs() if ( appfile.open(QIODevice::ReadWrite) ) { QTextStream stream( &appfile ); - stream << appLog << endl; + stream << appLog << Qt::endl; } appfile.close(); diff --git a/ekosdebugger.spec b/ekosdebugger.spec index 28378dc..b2728ae 100644 --- a/ekosdebugger.spec +++ b/ekosdebugger.spec @@ -19,7 +19,7 @@ BuildRequires: boost-regex BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(zlib) -BuildRequires: pkgconfig(Qt5) +BuildRequires: pkgconfig(Qt6) %description Ekos Debugger is a helper application to KStars, Ekos, and INDI debugging. It can be used to troubleshoot KStars, INDI, or both.