Skip to content

Commit

Permalink
Merge pull request #167 from sevketcaba/qt6
Browse files Browse the repository at this point in the history
[ISSUE-166][DEPENDENCY_UPDATE] Compatibility with Qt6
  • Loading branch information
svlad-90 authored May 25, 2023
2 parents 4aadd4a + 057294f commit 61649dc
Show file tree
Hide file tree
Showing 25 changed files with 181 additions and 167 deletions.
7 changes: 6 additions & 1 deletion dltmessageanalyzerplugin/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ endif()

include_directories(../../thirdparty/DMA_Plantuml/src)

# to force variant lite to use nonstd::variant
# otherwise the implementation will throw compile-time errors
# with C++17
add_compile_definitions(variant_CONFIG_SELECT_VARIANT=variant_VARIANT_NONSTD)

DMA_add_subdirectory_with_clang_tidy(common)
DMA_add_subdirectory_with_clang_tidy(components)
DMA_add_subdirectory_with_clang_tidy(plugin)
Expand Down Expand Up @@ -130,7 +135,7 @@ add_custom_command(TARGET DLT-Message-Analyzer POST_BUILD
################### PLANTUML ( END ) ######################

################### QT ####################################
target_link_libraries(DLT-Message-Analyzer qdlt Qt5::Widgets )
target_link_libraries(DLT-Message-Analyzer qdlt ${QT_PREFIX}::Widgets )
################### QT ( END ) ############################

add_plugin(DLT-Message-Analyzer)
2 changes: 1 addition & 1 deletion dltmessageanalyzerplugin/src/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ add_library(DMA_common STATIC
add_subdirectory(PCRE)

################### QT ####################################
target_link_libraries(DMA_common qdlt Qt5::Widgets )
target_link_libraries(DMA_common qdlt ${QT_PREFIX}::Widgets )
################### QT ( END ) ############################
2 changes: 1 addition & 1 deletion dltmessageanalyzerplugin/src/common/Definitions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2565,7 +2565,7 @@ bool convertLogFileToDLT( const QString& sourceFilePath, const QString& targetFi
data.push_back(strLength_high);
data.push_back(strLength_low);

data.append(strCopy);
data.append(strCopy.toUtf8());

// 2-3 bytes: LEN - at last, set the data length.
uint16_t storageHeaderSize = 16;
Expand Down
2 changes: 1 addition & 1 deletion dltmessageanalyzerplugin/src/common/PCRE/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ add_library(DMA_PCRE STATIC
DMA_SuppressClangTidy_END()

################### QT ####################################
target_link_libraries(DMA_PCRE Qt5::Widgets )
target_link_libraries(DMA_PCRE ${QT_PREFIX}::Widgets )
################### QT ( END ) ############################

################### ANTLR_LINKAGE #########################
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
qt5_wrap_cpp(PROCESSED_MOCS
qt_wrap_cpp(PROCESSED_MOCS
../api/IDLTMessageAnalyzerControllerConsumer.hpp
../api/IDLTMessageAnalyzerController.hpp)

Expand All @@ -16,7 +16,7 @@ add_library(DMA_analyzer STATIC

target_link_libraries( DMA_analyzer PUBLIC
qdlt
Qt5::Widgets
${QT_PREFIX}::Widgets
DMA_framework_base
DMA_framework_component
DMA_Plantuml )
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "QClipboard"
#include "QLineEdit"
#include "QKeyEvent"
#include "QActionGroup"

#include "CFiltersModel.hpp"
#include "components/settings/api/ISettingsManager.hpp"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
qt5_wrap_cpp(PROCESSED_MOCS
qt_wrap_cpp(PROCESSED_MOCS
../api/CFiltersView.hpp
../api/IFiltersModel.hpp)

Expand All @@ -11,7 +11,7 @@ add_library(DMA_filtersView STATIC

target_link_libraries( DMA_filtersView PUBLIC
qdlt
Qt5::Widgets
${QT_PREFIX}::Widgets
DMA_framework_base
DMA_framework_component
DMA_Plantuml )
Expand All @@ -24,7 +24,7 @@ DMA_SuppressClangTidy_END()
target_link_libraries( DMA_filtersView_no_clang_tidy
PUBLIC
qdlt
Qt5::Widgets
${QT_PREFIX}::Widgets
DMA_framework_base
DMA_framework_component
DMA_Plantuml )
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
qt5_wrap_cpp(PROCESSED_MOCS
qt_wrap_cpp(PROCESSED_MOCS
../api/CGroupedView.hpp)

add_library(DMA_groupedView STATIC
Expand All @@ -10,7 +10,7 @@ add_library(DMA_groupedView STATIC

target_link_libraries( DMA_groupedView PUBLIC
qdlt
Qt5::Widgets
${QT_PREFIX}::Widgets
DMA_framework_base
DMA_framework_component
DMA_Plantuml )
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
qt5_wrap_cpp(PROCESSED_MOCS
qt_wrap_cpp(PROCESSED_MOCS
../api/CConsoleView.hpp)

add_library(DMA_log STATIC
Expand All @@ -11,7 +11,7 @@ add_library(DMA_log STATIC

target_link_libraries( DMA_log PUBLIC
qdlt
Qt5::Widgets
${QT_PREFIX}::Widgets
DMA_framework_base
DMA_framework_component
DMA_Plantuml )
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
qt5_wrap_cpp(PROCESSED_MOCS
qt_wrap_cpp(PROCESSED_MOCS
../api/CLogo.hpp)

add_library(DMA_logo STATIC
Expand All @@ -8,7 +8,7 @@ add_library(DMA_logo STATIC

target_link_libraries( DMA_logo PUBLIC
qdlt
Qt5::Widgets
${QT_PREFIX}::Widgets
DMA_framework_base
DMA_framework_component
DMA_Plantuml )
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
qt5_wrap_cpp(PROCESSED_MOCS
qt_wrap_cpp(PROCESSED_MOCS
../api/IFileWrapper.hpp)

add_library(DMA_logsWrapper STATIC
Expand All @@ -14,7 +14,7 @@ add_library(DMA_logsWrapper STATIC

target_link_libraries( DMA_logsWrapper PUBLIC
qdlt
Qt5::Widgets
${QT_PREFIX}::Widgets
DMA_framework_base
DMA_framework_component
DMA_Plantuml )
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
qt5_wrap_cpp(PROCESSED_MOCS
qt_wrap_cpp(PROCESSED_MOCS
../api/IPatternsModel.hpp
../api/CPatternsView.hpp)

Expand All @@ -11,7 +11,7 @@ add_library(DMA_patternsView STATIC

target_link_libraries( DMA_patternsView PUBLIC
qdlt
Qt5::Widgets
${QT_PREFIX}::Widgets
DMA_framework_base
DMA_framework_component
DMA_Plantuml )
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ QVariant CPatternsModel::data(const QModelIndex &index, int role) const
result = Qt::AlignLeft;
}
}
else if (role == Qt::BackgroundColorRole)
else if (role == Qt::BackgroundRole)
{
result = QColor(0,0,0,0);
}
Expand All @@ -417,7 +417,7 @@ Qt::ItemFlags CPatternsModel::flags(const QModelIndex &index) const
if ( index.column() == static_cast<int>(ePatternsColumn::Default) ||
index.column() == static_cast<int>(ePatternsColumn::Combine))
{
result = QAbstractItemModel::flags(index) | Qt::ItemIsTristate;
result = QAbstractItemModel::flags(index) | Qt::ItemIsAutoTristate;
}
else
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
qt5_wrap_cpp(PROCESSED_MOCS
qt_wrap_cpp(PROCESSED_MOCS
../api/CUMLView.hpp)

add_library(DMA_plant_uml STATIC
Expand All @@ -10,7 +10,7 @@ add_library(DMA_plant_uml STATIC

target_link_libraries( DMA_plant_uml PUBLIC
qdlt
Qt5::Widgets
${QT_PREFIX}::Widgets
DMA_framework_base
DMA_framework_component
DMA_Plantuml )
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "QMetaEnum"
#include "QPushButton"
#include "QPlainTextEdit"
#include "QActionGroup"

#include "CImageViewer.hpp"
#include "../api/CUMLView.hpp"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
qt5_wrap_cpp(PROCESSED_MOCS
qt_wrap_cpp(PROCESSED_MOCS
../api/CSearchResultView.hpp
../api/CSearchViewComponent.hpp)

Expand All @@ -12,7 +12,7 @@ add_library(DMA_searchView STATIC

target_link_libraries( DMA_searchView PUBLIC
qdlt
Qt5::Widgets
${QT_PREFIX}::Widgets
DMA_framework_base
DMA_framework_component
DMA_Plantuml )
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <QDialogButtonBox>
#include <QFontDialog>
#include <QTableWidget>
#include <QActionGroup>

#include "common/Definitions.hpp"
#include "CSearchResultHighlightingDelegate.hpp"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
qt5_wrap_cpp(PROCESSED_MOCS
qt_wrap_cpp(PROCESSED_MOCS
../api/ISettingsManager.hpp)

add_library(DMA_settings STATIC
Expand All @@ -12,7 +12,7 @@ add_library(DMA_settings STATIC

target_link_libraries( DMA_settings PUBLIC
qdlt
Qt5::Widgets
${QT_PREFIX}::Widgets
DMA_framework_base
DMA_framework_component
DMA_Plantuml )
2 changes: 1 addition & 1 deletion dltmessageanalyzerplugin/src/dltmessageanalyzerplugin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "common/Definitions.hpp"

#define DLT_MESSAGE_ANALYZER_NAME "DLT-Message-Analyzer"
#define DLT_MESSAGE_ANALYZER_PLUGIN_VERSION "1.0.24"
#define DLT_MESSAGE_ANALYZER_PLUGIN_VERSION "1.0.25"
#define DLT_MESSAGE_ANALYZER_PLUGIN_AUTHOR "Vladyslav Goncharuk <svlad1990@gmail.com>"

class CDLTMessageAnalyzer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <QLineEdit>
#include <QPropertyAnimation>
#include <QSequentialAnimationGroup>
#include <QRegExp>
#include <QInputDialog>
#include <QHeaderView>
#include "QFileDialog"
Expand Down
6 changes: 3 additions & 3 deletions dltmessageanalyzerplugin/src/plugin/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
QT5_WRAP_UI( UI_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/form.ui )
QT_WRAP_UI( UI_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/form.ui )

qt5_wrap_cpp(PROCESSED_MOCS
qt_wrap_cpp(PROCESSED_MOCS
../api/form.h
../api/CDLTMessageAnalyzer.hpp)

Expand All @@ -25,7 +25,7 @@ target_link_libraries( DMA_plugin PUBLIC
DMA_patternsView
DMA_PCRE
qdlt
Qt5::Widgets
${QT_PREFIX}::Widgets
DMA_framework_base
DMA_framework_component
DMA_Plantuml )
2 changes: 1 addition & 1 deletion md/installation_guide/installation_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ As of now, they are Linux and Windows.
> sudo apt-get install libqt5serialport5
> sudo apt-get install libqt5serialport5-dev
>```
>
> for Qt6 [__qtserialport__](https://doc.qt.io/qt-6/qtserialport-index.html) module needs to be installed.
----
Expand Down
1 change: 1 addition & 0 deletions md/thirdparty_deps/thirdparty_deps.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
| dma_framework | [Repository](https://github.com/svlad-90/DMA_Framework) | Apache 2.0 | [License](https://github.com/svlad-90/DMA_Framework/blob/master/LICENSE) |
| dma_plantuml | [Repository](https://github.com/svlad-90/DMA_Plantuml) | Apache 2.0 | [License](https://github.com/svlad-90/DMA_Plantuml/blob/master/LICENSE) |
| qt5 | [Repository](https://github.com/qt/qt5) | (L)GPL | [License](https://github.com/qt/qt5/blob/dev/LICENSE.FDL) |
| qt6 (optional) | [Repository](https://github.com/qt/qtbase) | (L)GPL | [License](https://github.com/qt/qtbase/blob/dev/LICENSES) |
| qdlt | [Repository](https://github.com/GENIVI/dlt-viewer/tree/master/qdlt) | MPL 2.0 | [License](https://github.com/GENIVI/dlt-viewer/blob/master/LICENSE.txt) |
| plantuml | [Repository](https://github.com/plantuml/plantuml) | GPL 3.0 | [License](https://github.com/plantuml/plantuml/blob/master/license.txt) |
| antlr4 | [Repository](https://github.com/antlr/antlr4) | MIT | [License](https://github.com/antlr/antlr4/blob/master/LICENSE.txt) |
Expand Down
2 changes: 2 additions & 0 deletions md/thirdparty_deps/thirdparty_deps.puml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package "DLT_Message_Analyzer Dependencies" {

package "Qt" {
[qt5]
[qt6]
}

package "DMA_Family" {
Expand Down Expand Up @@ -64,6 +65,7 @@ package "DLT_Message_Analyzer Dependencies" {
[dlt_message_analyzer_source] --> [dma_plantuml] : https://github.com/svlad-90/DMA_Plantuml

[dlt_message_analyzer_source] --> [qt5] : https://github.com/qt/qt5
[dlt_message_analyzer_source] --> [qt6] : https://github.com/qt/qtbase
[dlt_message_analyzer_source] --> [qdlt] : https://github.com/GENIVI/dlt-viewer/tree/master/qdlt
[dlt_message_analyzer_source] --> [plantuml] : https://github.com/plantuml/plantuml
[dlt_message_analyzer_source] --> [antlr4] : https://github.com/antlr/antlr4
Expand Down
Loading

0 comments on commit 61649dc

Please sign in to comment.