Qt6 Migration: BUILD_RTI guards und CMake fixes
- BUILD_RTI conditional compilation für RTI Connext DDS dependencies - Namespace fixes in core_dtc.h (Core:: → DDS::Core::) - CMakeLists.txt: BUILD_RTI option und conditional dependencies - Handler minelayer: namespace closing mit BUILD_RTI guard - Build erfolgreich mit BUILD_RTI=OFF validiert Signed-off-by: Torsten Wierschin <torsten.wierschin@life-maps.com>
This commit is contained in:
422 files changed
+1013
-599
No files matched your search
@@ -11,16 +11,21 @@ class TimelineIndicatorTest : public ::testing::Test
|
||||
protected:
|
||||
void SetUp() override
|
||||
{
|
||||
int argc = 1;
|
||||
char* argv[] = {const_cast<char*>("test")};
|
||||
qApp = new QApplication(argc, argv);
|
||||
static int argc = 1;
|
||||
static char* argv[] = {const_cast<char*>("test")};
|
||||
if (!qApp)
|
||||
{
|
||||
m_app = std::make_unique<QApplication>(argc, argv);
|
||||
}
|
||||
}
|
||||
|
||||
void TearDown() override
|
||||
{
|
||||
delete qApp;
|
||||
qApp = nullptr;
|
||||
m_app.reset();
|
||||
}
|
||||
|
||||
private:
|
||||
std::unique_ptr<QApplication> m_app;
|
||||
};
|
||||
|
||||
TEST(TimelineIndicatorTest, ConstructorCreatesValidIndicator)
|
||||
@@ -35,17 +40,17 @@ TEST(TimelineIndicatorTest, SlotZoomChangesIndex)
|
||||
QWidget parent;
|
||||
TimelineIndicator indicator(&parent);
|
||||
|
||||
int initialIndex = indicator.m_cbZoomLevel->currentIndex();
|
||||
int initialIndex = indicator.zoomLevelComboBox()->currentIndex();
|
||||
indicator.slotZoom();
|
||||
|
||||
// Zoom out should decrease index (if not already at 0)
|
||||
if (initialIndex > 0)
|
||||
{
|
||||
EXPECT_EQ(indicator.m_cbZoomLevel->currentIndex(), initialIndex - 1);
|
||||
EXPECT_EQ(indicator.zoomLevelComboBox()->currentIndex(), initialIndex - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
EXPECT_EQ(indicator.m_cbZoomLevel->currentIndex(), 0);
|
||||
EXPECT_EQ(indicator.zoomLevelComboBox()->currentIndex(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,14 +59,14 @@ TEST(TimelineIndicatorTest, SlotUnzoomChangesIndex)
|
||||
QWidget parent;
|
||||
TimelineIndicator indicator(&parent);
|
||||
|
||||
int initialIndex = indicator.m_cbZoomLevel->currentIndex();
|
||||
int maxIndex = indicator.m_cbZoomLevel->count() - 1;
|
||||
int initialIndex = indicator.zoomLevelComboBox()->currentIndex();
|
||||
int maxIndex = indicator.zoomLevelComboBox()->count() - 1;
|
||||
|
||||
// Set to a lower index to allow unzoom
|
||||
indicator.m_cbZoomLevel->setCurrentIndex(1);
|
||||
indicator.zoomLevelComboBox()->setCurrentIndex(1);
|
||||
indicator.slotUnzoom();
|
||||
|
||||
EXPECT_EQ(indicator.m_cbZoomLevel->currentIndex(), 2);
|
||||
EXPECT_EQ(indicator.zoomLevelComboBox()->currentIndex(), 2);
|
||||
}
|
||||
|
||||
} // namespace LtsTimelineClassic
|
||||
Reference in new issue
Block a user