1
0
mirror of https://github.com/Swordfish90/cool-retro-term.git synced 2026-02-08 00:32:27 +00:00

Make it compile with Qt6.

This commit is contained in:
Filippo Scognamiglio
2025-12-09 10:41:41 +01:00
parent f157648d1e
commit 1d73abda51
9 changed files with 29 additions and 29 deletions

1
.gitignore vendored
View File

@@ -43,6 +43,7 @@ Makefile*
# Excludes compiled files
imports
cool-retro-term
build
# Mac OSX

View File

@@ -49,15 +49,15 @@ int main(int argc, char *argv[])
if (argc>1 && (!strcmp(argv[1],"-h") || !strcmp(argv[1],"--help"))) {
QTextStream cout(stdout, QIODevice::WriteOnly);
cout << "Usage: " << argv[0] << " [--default-settings] [--workdir <dir>] [--program <prog>] [-p|--profile <prof>] [--fullscreen] [-h|--help]" << endl;
cout << " --default-settings Run cool-retro-term with the default settings" << endl;
cout << " --workdir <dir> Change working directory to 'dir'" << endl;
cout << " -e <cmd> Command to execute. This option will catch all following arguments, so use it as the last option." << endl;
cout << " -T <title> Set window title to 'title'." << endl;
cout << " --fullscreen Run cool-retro-term in fullscreen." << endl;
cout << " -p|--profile <prof> Run cool-retro-term with the given profile." << endl;
cout << " -h|--help Print this help." << endl;
cout << " --verbose Print additional information such as profiles and settings." << endl;
cout << "Usage: " << argv[0] << " [--default-settings] [--workdir <dir>] [--program <prog>] [-p|--profile <prof>] [--fullscreen] [-h|--help]" << Qt::endl;
cout << " --default-settings Run cool-retro-term with the default settings" << Qt::endl;
cout << " --workdir <dir> Change working directory to 'dir'" << Qt::endl;
cout << " -e <cmd> Command to execute. This option will catch all following arguments, so use it as the last option." << Qt::endl;
cout << " -T <title> Set window title to 'title'." << Qt::endl;
cout << " --fullscreen Run cool-retro-term in fullscreen." << Qt::endl;
cout << " -p|--profile <prof> Run cool-retro-term with the given profile." << Qt::endl;
cout << " -h|--help Print this help." << Qt::endl;
cout << " --verbose Print additional information such as profiles and settings." << Qt::endl;
return 0;
}
@@ -65,7 +65,7 @@ int main(int argc, char *argv[])
if (argc>1 && (!strcmp(argv[1],"-v") || !strcmp(argv[1],"--version"))) {
QTextStream cout(stdout, QIODevice::WriteOnly);
cout << "cool-retro-term " << appVersion << endl;
cout << "cool-retro-term " << appVersion << Qt::endl;
return 0;
}

View File

@@ -18,7 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************/
import QtQuick 2.2
import QtQuick.Dialogs 1.1
import QtQuick.Dialogs
Item {
id: rootItem
@@ -31,11 +31,13 @@ Item {
id: colorDialog
title: qsTr("Choose a color")
modality: Qt.ApplicationModal
visible: false
selectedColor: rootItem.color
//This is a workaround to a Qt 5.2 bug.
onColorChanged: if (!appSettings.isMacOS) colorSelected(color)
onAccepted: if (appSettings.isMacOS) colorSelected(color)
onSelectedColorChanged: {
if (!appSettings.isMacOS && visible)
colorSelected(selectedColor)
}
onAccepted: colorSelected(selectedColor)
}
Rectangle {
anchors.fill: parent
@@ -57,6 +59,6 @@ Item {
}
MouseArea {
anchors.fill: parent
onClicked: colorDialog.visible = true
onClicked: colorDialog.open()
}
}

View File

@@ -21,7 +21,7 @@ import QtQuick 2.2
import QtQuick.Window 2.0
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.1
import QtQuick.Dialogs 1.1
import QtQuick.Dialogs
Window {
id: insertnamedialog

View File

@@ -20,7 +20,7 @@
import QtQuick 2.2
import QtQuick.Controls 2.4
import QtQuick.Layouts 1.1
import QtQuick.Dialogs 1.1
import QtQuick.Dialogs
ColumnLayout {
GroupBox {
@@ -237,6 +237,7 @@ ColumnLayout {
MessageDialog {
id: messageDialog
title: qsTr("File Error")
buttons: MessageDialog.Ok
onAccepted: {
messageDialog.close()
}
@@ -248,10 +249,8 @@ ColumnLayout {
sourceComponent: FileDialog {
nameFilters: ["Json files (*.json)"]
selectMultiple: false
selectFolder: false
selectExisting: fileDialog.selectExisting
onAccepted: callBack(fileUrl)
fileMode: fileDialog.selectExisting ? FileDialog.OpenFile : FileDialog.SaveFile
onAccepted: callBack(selectedFile)
}
onSelectExistingChanged: reload()

View File

@@ -22,7 +22,7 @@ import QtQuick 2.2
import QtQuick.Controls 2.1
import QtQuick.Window 2.1
import QtQuick.Layouts 1.3
import QtQuick.Dialogs 1.1
import QtQuick.Dialogs
Window {
id: settings_window

View File

@@ -19,7 +19,6 @@
*******************************************************************************/
import QtQuick 2.2
import QtGraphicalEffects 1.0
import "utils.js" as Utils
@@ -377,7 +376,7 @@ Item {
property color fontColor: parent.fontColor
property color backgroundColor: parent.backgroundColor
property real bloom: appSettings.bloom * 2.5
property real bloom: bloomSource ? appSettings.bloom * 2.5 : 0
property real screenCurvature: parent.screenCurvature

View File

@@ -18,7 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************/
import QtQuick 2.2
import QtGraphicalEffects 1.0
import Qt5Compat.GraphicalEffects
import "utils.js" as Utils
@@ -38,6 +38,7 @@ ShaderTerminal {
terminalWindow.width * devicePixelRatio * appSettings.windowScaling,
terminalWindow.height * devicePixelRatio * appSettings.windowScaling
)
bloomSource: bloomSourceLoader.item
TimeManager {
id: timeManager
@@ -75,6 +76,4 @@ ShaderTerminal {
visible: false
}
}
bloomSource: bloomSourceLoader.item
}