diff --git a/.gitignore b/.gitignore index a6f396d..30a7923 100644 --- a/.gitignore +++ b/.gitignore @@ -43,6 +43,7 @@ Makefile* # Excludes compiled files imports cool-retro-term +build # Mac OSX diff --git a/app/main.cpp b/app/main.cpp index 30cbf31..347c0f4 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -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 ] [--program ] [-p|--profile ] [--fullscreen] [-h|--help]" << endl; - cout << " --default-settings Run cool-retro-term with the default settings" << endl; - cout << " --workdir Change working directory to 'dir'" << endl; - cout << " -e Command to execute. This option will catch all following arguments, so use it as the last option." << endl; - cout << " -T 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; } diff --git a/app/qml/ColorButton.qml b/app/qml/ColorButton.qml index a2d97e3..2a925db 100644 --- a/app/qml/ColorButton.qml +++ b/app/qml/ColorButton.qml @@ -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() } } diff --git a/app/qml/InsertNameDialog.qml b/app/qml/InsertNameDialog.qml index fb4d7e9..ae2ea0a 100644 --- a/app/qml/InsertNameDialog.qml +++ b/app/qml/InsertNameDialog.qml @@ -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 diff --git a/app/qml/SettingsGeneralTab.qml b/app/qml/SettingsGeneralTab.qml index 40fbc0d..cf59e19 100644 --- a/app/qml/SettingsGeneralTab.qml +++ b/app/qml/SettingsGeneralTab.qml @@ -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() diff --git a/app/qml/SettingsWindow.qml b/app/qml/SettingsWindow.qml index 435516b..4f3b6b5 100644 --- a/app/qml/SettingsWindow.qml +++ b/app/qml/SettingsWindow.qml @@ -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 diff --git a/app/qml/ShaderTerminal.qml b/app/qml/ShaderTerminal.qml index 2de0d9b..d0ba4c9 100644 --- a/app/qml/ShaderTerminal.qml +++ b/app/qml/ShaderTerminal.qml @@ -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 diff --git a/app/qml/TerminalContainer.qml b/app/qml/TerminalContainer.qml index b6be435..2974886 100644 --- a/app/qml/TerminalContainer.qml +++ b/app/qml/TerminalContainer.qml @@ -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 } diff --git a/qmltermwidget b/qmltermwidget index 6322802..290f542 160000 --- a/qmltermwidget +++ b/qmltermwidget @@ -1 +1 @@ -Subproject commit 63228027e1f97c24abb907550b22ee91836929c5 +Subproject commit 290f542d23a649fe6581a06c055179ef488fb561