Port back to Qt 5.

To be consistent in app launching, port back to Qt 5. Also, bump the C++ standard to 23, well, just because, and make the installer prompt display on both monitors, instead of just one.
pull/2/head
Simon Quigley 5 months ago
parent c2ac6af2d9
commit ca33c24096

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.22)
project(lubuntu-installer-prompt VERSION 0.3.0 LANGUAGES CXX)
project(lubuntu-installer-prompt VERSION 1.0.0 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
@ -8,10 +8,10 @@ set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt6 REQUIRED COMPONENTS Core Widgets)
find_package(Qt5 REQUIRED COMPONENTS Core Widgets)
include_directories(${PROJECT_SOURCE_DIR}/src)
@ -21,14 +21,9 @@ file(GLOB PROJECT_SOURCES
"${PROJECT_SOURCE_DIR}/src/*.ui"
)
qt_add_executable(lubuntu-installer-prompt
MANUAL_FINALIZATION
${PROJECT_SOURCES}
)
target_link_libraries(lubuntu-installer-prompt PRIVATE Qt6::Widgets)
add_executable(lubuntu-installer-prompt ${PROJECT_SOURCES})
qt_finalize_executable(lubuntu-installer-prompt)
target_link_libraries(lubuntu-installer-prompt Qt5::Widgets)
install(TARGETS lubuntu-installer-prompt DESTINATION bin)
install(PROGRAMS "scripts/lubuntu-installer" DESTINATION libexec)

@ -44,10 +44,12 @@ void InstallerPrompt::installLubuntu()
ui->tryLubuntu->setVisible(false);
ui->installLubuntu->setVisible(false);
QProcess *calamares = new QProcess(this);
calamares->start("/usr/libexec/lubuntu-installer");
QStringList args;
calamares->start("/usr/libexec/lubuntu-installer", args);
// If Calamares exits, it either crashed or the user cancelled the installation. Exit the installer prompt (and start LXQt).
connect(calamares, &QProcess::finished, this, &InstallerPrompt::tryLubuntu);
connect(calamares, static_cast<void(QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
this, [this](int, QProcess::ExitStatus){ this->tryLubuntu(); });
}
InstallerPrompt::~InstallerPrompt()

@ -1,11 +1,29 @@
#include "installerprompt.h"
#include <QApplication>
#include <QScreen>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
InstallerPrompt w;
w.showFullScreen();
return a.exec();
QApplication app(argc, argv);
QList<InstallerPrompt*> windows;
// Iterate through all available screens
for (QScreen *screen : QApplication::screens()) {
InstallerPrompt *window = new InstallerPrompt();
window->setGeometry(screen->geometry());
window->show();
windows.append(window);
}
// Connect signals and slots to synchronize state across windows
for (InstallerPrompt *window : windows) {
for (InstallerPrompt *otherWindow : windows) {
if (window != otherWindow) {
// Connect signals and slots for synchronization
// Example: connect(window, &InstallerPrompt::someSignal, otherWindow, &InstallerPrompt::someSlot);
}
}
}
return app.exec();
}

Loading…
Cancel
Save