BUILD_RTI conditional fixes and Qt6 API updates
- cmake/FindRTI.cmake: Add INTERFACE placeholder targets when RTI not found - cmake/FindRTI.cmake: Force BUILD_RTI=OFF when RTI not installed - Lts/Common/LtsSession/CMakeLists.txt: Make LtsSessionDataDds conditional on BUILD_RTI - Lts/Viewer/CMakeLists.txt: Make LtsDataView conditional on BUILD_RTI - Lts/Plugins/*/CMakeLists.txt: 97 plugin files wrapped in BUILD_RTI conditionals - cmake/NGLMacros.cmake: Fix NGL_ADD_BIG_RESOURCES macro (removed premature return()) - Multiple Qt6 API fixes: QLinkedList→std::list, QStringRef→QStringView, etc. - BUILD_RTI_FIXES_SUMMARY.md: Comprehensive documentation of all fixes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2065 files changed
+48219
-1763
No files matched your search
@@ -1,15 +1,21 @@
|
||||
|
||||
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Keeps the DDS Connector and common data about the session
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*
|
||||
* Created by Mike Wille, SLSE, 2016-05-15
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <QObject>
|
||||
|
||||
#include "lts_session_data_dds.h"
|
||||
#include "lts_session_manager.h"
|
||||
|
||||
#include "ltssession_export.h"
|
||||
#include <LtsSession/ltssession_export.h>
|
||||
#include <LtsWidgets/lts_base.h>
|
||||
#include <QtCore/qobjectdefs.h>
|
||||
#include <QtCore/qobjectdefs.h> // for connections
|
||||
|
||||
#include <memory>
|
||||
#include <QMap>
|
||||
@@ -72,7 +78,7 @@ public:
|
||||
{
|
||||
UNKNOWN = 0,
|
||||
LOADED,
|
||||
FAILED,
|
||||
FAILED, // e.g. fetchInterfaces gone wrong
|
||||
};
|
||||
|
||||
static QString appToString(LtsAppDescriptor::App app);
|
||||
@@ -93,13 +99,18 @@ public:
|
||||
const QVector<LtsPluginManager::AppPluginInstance> &dataPluginList,
|
||||
const QVector<LtsPluginManager::AppPluginInstance> &guiPluginList);
|
||||
void makeVisible();
|
||||
void setPayloadsEnabled() { m_payloads = true; }
|
||||
void setPayloadsEnabled() { m_payloads = true; } // cannot be reverted
|
||||
void aboutToClose();
|
||||
bool isInitializationDone() const { return m_initDone; }
|
||||
void presetBaseLayoutAsSecondaryWidget() { m_presetBaseLayoutAsSecondaryWidget = true; }
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief addAction - IMPORTANT: Actions have to be translated on retranslate by adding the same action (with same identifier)
|
||||
* but with translated text & menu group! This replaces the text & menu group only. The pointer to the action stays the same.
|
||||
* @param plData
|
||||
* @param isFirstRun
|
||||
* @return
|
||||
*/
|
||||
LtsWidgets::LtsDragIcon *addAction(const LtsWidgets::PluginData &plData, bool isFirstRun = false);
|
||||
void setMenuVisible(bool visible = true);
|
||||
bool removeMenuAction(LtsWidgets::LtsDragIcon *icon);
|
||||
@@ -113,29 +124,38 @@ public:
|
||||
|
||||
LtsNotification::LtsNotification *createNotification(const QString &identifier);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief setExerciseData is called by the ExerciseManagement plugin and sets the human reabale name of the exercise and puts the text into all base layouts of this session
|
||||
* @param exerciseData the human reable exercise name of the current exercise
|
||||
*/
|
||||
void setExerciseData(const LtsWidgets::ExerciseData &exerciseData);
|
||||
const LtsWidgets::ExerciseData *exerciseData() const;
|
||||
void setProfilePicture(const QPixmap &pixmap);
|
||||
void setBaseLayoutVisible() { m_hasBaseLayout = true; }
|
||||
void setBaseLayoutVisible() { m_hasBaseLayout = true; } // cannot be reverted after base layout was created (creation begins after all payloads have been executed OR if makeVisible was called)!
|
||||
bool isVisible() const { return (m_baseLayout != nullptr); }
|
||||
const QString &name() const { return m_name; }
|
||||
void setName(const QString &name) { m_name = name; }
|
||||
|
||||
|
||||
/**
|
||||
* @brief isChildOfSession can be used to check if a fiven QWidget is part of the current Session's application
|
||||
*
|
||||
* @param child widget to check against.
|
||||
* @return true if widget is child of session baselayout
|
||||
*/
|
||||
bool isChildOfSession(QWidget* child);
|
||||
LtsWidgets::LtsBaseLayoutWidget* baseLayout() { return m_baseLayout; }
|
||||
QWidget *baseLayoutWidget();
|
||||
void setMarkForDeletion() { m_markedForDeletion = true; }
|
||||
void doneInitializingSession();
|
||||
bool notifyUnsavedChanges();
|
||||
QWidget *baseLayoutWidget(); // prevents some classes to include LtsBaseLayoutWidget.h just to specify the blw as a parent widget
|
||||
void setMarkForDeletion() { m_markedForDeletion = true; } // session not needed anymore after payloads? then mark for deletion and after payloads, this session will be deleted(Later)
|
||||
void doneInitializingSession(); // TODO: private
|
||||
bool notifyUnsavedChanges(); // true if NO unsaved changes
|
||||
const QVector<LtsWidgets::LtsBackgroundWidget *> &bgWidgets() const { return m_bgWidgets; }
|
||||
|
||||
|
||||
// checks if a widget with the given data already exists
|
||||
bool widgetExists(const QString &menuGroup, const QString &identifier, LtsWidgets::LayoutArea area) const;
|
||||
|
||||
|
||||
/**
|
||||
* @brief addWidget <exact copy of addWidget in LtsBaseLayoutWidget [is redirected to the coherent LtsBaseLayoutWidget]>
|
||||
* keep identifier empty to prevent checking for existing tabs
|
||||
* @return (see addWidget in LtsBaseLayoutWidget)
|
||||
*/
|
||||
bool addWidget(LtsWidgets::LtsDialog *widget,
|
||||
const QString &menuGroup,
|
||||
const QString &identifier,
|
||||
@@ -145,29 +165,42 @@ public:
|
||||
LtsWidgets::LtsDialog *getWidget(const QString &menuGroup, const QString &identifier, LtsWidgets::LayoutArea area);
|
||||
bool focusTab(const QString &menuGroup, const QString &identifier, LtsWidgets::LayoutArea area);
|
||||
|
||||
|
||||
|
||||
/** WARNING: do not save the returned value, as baseLayouts can die (which kills LtsTabWidget also), so reuse this method instead of saving the pointer to the LtsTabWidget
|
||||
* @brief locateWidget locates the given widget 'widget' and returning the TabWidget on which it is on - widgets can be available in one of many LayoutAreas (TabWidgets) of many LtsBaseLayoutWidgets
|
||||
* @param widgetToLocate the widget to look for in the given layoutArea which is located in one of many LtsBaseLayoutWidget
|
||||
* @param area the area the widget is located
|
||||
* @return LtsTabWidget on which the widget is located
|
||||
*/
|
||||
LtsWidgets::LtsTabWidget *locateWidget(QWidget *widgetToLocate, LtsWidgets::LayoutArea area);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief enable/disable baseLayout menu
|
||||
* @param on if true enable otherwise disable
|
||||
*/
|
||||
void enableBaseLayoutMenu(bool on = true);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief enable/disable LayoutArea
|
||||
* @param area the area to enable/disable
|
||||
* @param on if true enable otherwise disable
|
||||
*/
|
||||
void enableBaseLayoutArea(LtsWidgets::LayoutArea area, bool on = true);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Return the workstation ip for this workstation (== full ipv4 adress) - workstation id comes later from Asm
|
||||
*/
|
||||
static int workstationIp(); // really in LtsSession?
|
||||
/**
|
||||
* @brief Return the workstation name
|
||||
*/
|
||||
static QString workstationName(); // really in LtsSession?
|
||||
|
||||
static int workstationIp();
|
||||
|
||||
|
||||
static QString workstationName();
|
||||
|
||||
|
||||
|
||||
QVector<LtsWidgets::PluginData> &missingRightActions() { return m_missingRightActions; }
|
||||
/**
|
||||
* @brief missingRightActions Do not use.
|
||||
* @return
|
||||
*/
|
||||
/*const*/ QVector<LtsWidgets::PluginData> &missingRightActions() /*const*/ { return m_missingRightActions; }
|
||||
|
||||
void setSavegame(const QJsonObject &sg) { m_savegame = sg; }
|
||||
const QJsonObject &getSavegame() const { return m_savegame; }
|
||||
@@ -182,21 +215,21 @@ public:
|
||||
void setLoadedFromSavegame() { m_loadedFromSavegame = true; }
|
||||
bool isLoadedFromSavegame() const { return m_loadedFromSavegame; }
|
||||
void addDeveloperActions();
|
||||
void refetchActions();
|
||||
void refetchActions(); // Do not use.
|
||||
void setDependency(LtsSession *session);
|
||||
bool hasDependency(LtsSession *session) { return (m_dependency.data() == session); }
|
||||
LtsSession *dependency() const { return m_dependency; }
|
||||
|
||||
|
||||
void setNeedsToBeSuccessfullyPlaced(bool needed = true) { m_needsToBeSuccessfullyPlaced = needed; }
|
||||
// bogus.
|
||||
void setNeedsToBeSuccessfullyPlaced(bool needed = true) { m_needsToBeSuccessfullyPlaced = needed; } // works even after session creation as 'slotStartPluginInit', which finalizes the session (creates blw, etc.) is called async!
|
||||
|
||||
int id() const { return m_id; }
|
||||
|
||||
public slots:
|
||||
void slotExecuteNextPayload();
|
||||
void slotPluginInitDone();
|
||||
void slotExecuteNextPayload(); // NEVER call this directly, queue a signal to this slot !
|
||||
void slotPluginInitDone(); // NEVER call this directly, queue a signal to this slot !
|
||||
void slotShowOnlineHelp(const QString &fileName);
|
||||
|
||||
//void takeOverBdv();
|
||||
|
||||
private slots:
|
||||
void slotShowOperatorSettings();
|
||||
@@ -209,11 +242,11 @@ private slots:
|
||||
|
||||
signals:
|
||||
void signalInitializationAborted();
|
||||
void _signalDoneInitializingSession();
|
||||
void signalDoneInitializingSession();
|
||||
void signalClose();
|
||||
void _signalDoneInitializingSession(); // internal
|
||||
void signalDoneInitializingSession(); // is called AFTER all payloads have been executed (on no payloads, called after session was created) FOR LTSLOGIN !
|
||||
void signalClose(); // tells the session manager to close this session
|
||||
void signalLogout();
|
||||
void signalQuit();
|
||||
void signalQuit(); // for payloads, so that they can quit an app
|
||||
void signalStillAlive();
|
||||
void signalExerciseDataChanged();
|
||||
void signalScreenIdChanged(int screenId, int screenContainerId, int screenTypeId);
|
||||
@@ -238,49 +271,49 @@ private:
|
||||
void clearGuiPluginInterfaces();
|
||||
void executePayloads();
|
||||
void connectOnlineHelpButton(LtsWidgets::LtsDialog *widget);
|
||||
|
||||
// TODO: AFTER FAT !! void stapleWidget(LtsWidgets::LtsDialog *dialog); // FIXME: HACK: because an LtsDialog can directly add widgets to the base layout and misses the staples...
|
||||
void aboutToCloseTab(LtsWidgets::LayoutArea area);
|
||||
|
||||
QPointer<LtsSessionManager> m_sessionManager;
|
||||
QMap<int , std::shared_ptr<GuiPluginBase::Interface> > m_payloadPriorityMap;
|
||||
QList<std::shared_ptr<GuiPluginBase::Interface> > m_payloadList;
|
||||
QMap<int /*priority*/, std::shared_ptr<GuiPluginBase::Interface> > m_payloadPriorityMap; // QMap automatically sorts by key on iteration and overwrites multiple occurences with the latest)
|
||||
QList<std::shared_ptr<GuiPluginBase::Interface> > m_payloadList; // for payloads that don't care when they are executed (prio '9999' plugins)
|
||||
LtsWidgets::LtsBackgroundWidget *m_mainBackground;
|
||||
bool m_hasBaseLayout;
|
||||
LtsWidgets::LtsBaseLayoutWidget *m_baseLayout;
|
||||
bool m_markedForDeletion;
|
||||
bool m_payloads;
|
||||
QVector<LtsNotification::LtsNotificationController *> m_notiCtlList;
|
||||
bool m_initDone;
|
||||
bool m_payloadsDone { false };
|
||||
bool m_initDone; // set by doneInitializingSession / signalDoneInitializingSession
|
||||
bool m_payloadsDone { false }; // for debug
|
||||
bool m_menuVisible;
|
||||
|
||||
//bool m_ignoreSignalInLoop = false;
|
||||
bool m_firstActionsFetch;
|
||||
LtsWidgets::ExerciseData *m_exerciseData;
|
||||
QVector<LtsWidgets::PluginData> m_missingRightActions;
|
||||
std::shared_ptr<Core::Interface::Ftc> m_coreFtc;
|
||||
GuiPluginBase::Interface *m_currentInitIfc;
|
||||
GuiPluginBase::Interface *m_currentInitIfc; // not owning
|
||||
bool m_slotPluginInitDoneMutex;
|
||||
bool m_pluginInitDone;
|
||||
bool m_pluginInitDone; // set by slotPluginInitDone
|
||||
QJsonObject m_savegame;
|
||||
bool m_hidden;
|
||||
bool m_hidden; // if true, does not create BLW
|
||||
int m_screenId { -1 };
|
||||
int m_screenContainerId { -1 };
|
||||
int m_screenIdPreset { -1 };
|
||||
int m_screenContainerIdPreset { -1 };
|
||||
bool m_loadedFromSavegame;
|
||||
std::shared_ptr<OnlineHelp::ForeignOnlineHelpViewerGuiInterface> m_ohvIfc;
|
||||
bool m_foreverInvisible;
|
||||
bool m_foreverInvisible; // if true, creates BLW but hides it and does not use MMM
|
||||
QStringList m_failedFetches;
|
||||
QVector<LtsWidgets::LtsBackgroundWidget *> m_bgWidgets;
|
||||
QString m_workspaceId;
|
||||
bool m_needsToBeSuccessfullyPlaced { true };
|
||||
bool m_needsToBeSuccessfullyPlaced { true /* ALWAYS! */ /*false*/ }; // if set to true, 'signalDoneInitializingSession' will only be called after the blw was successfully placed by MMM (even works if MMM inavtive (off))
|
||||
QString m_name;
|
||||
QTimer *m_blub { nullptr };
|
||||
QTimer *m_scriptEditorTimer { nullptr };
|
||||
int m_blub2;
|
||||
QPointer<LtsSession> m_dependency;
|
||||
QPointer<LtsSession> m_dependency; // when MMM iprovides the screen selection for this app, it isn't allowed to replace apps that are dependencies of this app (e.g. logout bug)
|
||||
bool m_presetBaseLayoutAsSecondaryWidget { false };
|
||||
int m_id;
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace LtsSession
|
||||
Reference in new issue
Block a user