Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No use of QtGlobal in c-code #594

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions plugin/dlttestrobotplugin/dlttestrobotplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,7 @@ bool DltTestRobotPlugin::controlMsg(int , QDltMsg &)
return false;
}

bool DltTestRobotPlugin::stateChanged(int index, QDltConnection::QDltConnectionState connectionState,QString hostname){
Q_UNUSED(index)
Q_UNUSED(connectionState)
Q_UNUSED(hostname)

#if QT_5_SUPPORTED_VERSION
//qDebug() << ecuList->at(index) << "ConnectionState:" << connectionState << "Hostname:" << hostname << Qt::endl;
#else
//qDebug() << ecuList->at(index) << "ConnectionState:" << connectionState << "Hostname:" << hostname << endl;
#endif
bool DltTestRobotPlugin::stateChanged(int, QDltConnection::QDltConnectionState, QString) {
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion qdlt/dlt_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
typedef int pid_t;
#endif

#ifdef TARGET_OS_MAC
#ifdef __APPLE__
typedef unsigned long speed_t;
#else
typedef unsigned int speed_t;
Expand Down
1 change: 0 additions & 1 deletion qdlt/dlt_user.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
\{
*/

#include "dlt_types.h"
#include "dlt_common.h"

#ifdef __cplusplus
Expand Down
8 changes: 2 additions & 6 deletions qdlt/export_rules.h
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
#include <QtGlobal>

#ifndef EXPORT_RULES_H
#define EXPORT_RULES_H

#if defined(QDLT_LIBRARY)
# define QDLT_EXPORT Q_DECL_EXPORT
# ifdef Q_OS_WIN
# if defined(_WIN32) || defined(_WIN64)
# define QDLT_C_EXPORT __declspec(dllexport)
# else
# define QDLT_C_EXPORT __attribute__((visibility("default")))
# endif
#else
# define QDLT_EXPORT Q_DECL_IMPORT
# ifdef Q_OS_WIN
# if defined(_WIN32) || defined(_WIN64)
# define QDLT_C_EXPORT __declspec(dllimport)
# else
# define QDLT_C_EXPORT
# endif
#endif

#define QT_5_SUPPORTED_VERSION (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR >= 14) || (QT_VERSION_MAJOR >= 6)

#endif // EXPORT_RULES_H
1 change: 0 additions & 1 deletion qdlt/qdltsegmentedmsg.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "export_rules.h"

#include <qdltmsg.h>
#include <dlt_types.h>

//! Combine segmented network messages
/*!
Expand Down
2 changes: 2 additions & 0 deletions src/dltmsgqueue.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "dltmsgqueue.h"
#include <QThread>

#define QT_5_SUPPORTED_VERSION (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR >= 14) || (QT_VERSION_MAJOR >= 6)

DltMsgQueue::DltMsgQueue(int size)
: bufferSize(size),
buffer(new QPair<QSharedPointer<QDltMsg>, int> [size]),
Expand Down
10 changes: 2 additions & 8 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7139,14 +7139,10 @@ void MainWindow::filterUpdate()

if(filter->enableRegexp_Appid || filter->enableRegexp_Context || filter->enableRegexp_Header || filter->enableRegexp_Payload)
{
if(false == filter->compileRegexps())
if(!filter->compileRegexps())
{
// This is also validated in the UI part
#if QT_5_SUPPORTED_VERSION
qDebug() << "Error compiling a regexp" << Qt::endl << "in" << __FILE__ << __LINE__;
#else
qDebug() << "Error compiling a regexp" << endl << "in" << __FILE__ << __LINE__;
#endif
qDebug() << "Error compiling a regexp\nin" << __FILE__ << __LINE__;
}
}

Expand All @@ -7155,8 +7151,6 @@ void MainWindow::filterUpdate()
qfile.updateSortedFilter();
}



void MainWindow::on_tableView_customContextMenuRequested(QPoint pos)
{
/* show custom pop menu for configuration */
Expand Down