Skip to content

Commit

Permalink
Update min version to qt 5.8
Browse files Browse the repository at this point in the history
Using new fallback style function for setting the style to Fusion
Groupbox width now the same as the window
Version bump
  • Loading branch information
jplsek committed Jan 10, 2018
1 parent cc47702 commit 6965d01
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ os:
- linux

before_install:
- sudo add-apt-repository -y ppa:beineri/opt-qt571-trusty
- sudo add-apt-repository -y ppa:beineri/opt-qt58-trusty
- sudo apt-get -qq update
- sudo apt-get install -qy libxcb-keysyms1-dev qt57-meta-minimal qt57quickcontrols2 qt57quickcontrols
- sudo apt-get install -qy libxcb-keysyms1-dev qt58-meta-minimal qt58quickcontrols2 qt58quickcontrols

script:
- source /opt/qt57/bin/qt57-env.sh
- source /opt/qt58/bin/qt58-env.sh
- qmake -v
- qmake puush-qt.pro
- make
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ Ubuntu: `scrot qt5-default qml-module-qtquick-{controls,controls2,templates2,dia

## Compiling
### Extra Build Dependencies
Ubuntu 17.04 or newer: `qtbase5-private-dev libxcb-keysyms1-dev qtdeclarative5-dev`
For other Ubuntu versions, you will need qt5.7 or newer. PPA's are available [here](https://launchpad.net/~beineri/+ppa-packages).
This is an example for 16.04 with qt5.7:
Ubuntu 17.10 or newer: `qtbase5-private-dev libxcb-keysyms1-dev qtdeclarative5-dev`
For other Ubuntu versions, you will need qt5.8 or newer. PPA's are available [here](https://launchpad.net/~beineri/+ppa-packages).
This is an example for 16.04 with qt5.8:

```
sudo add-apt-repository ppa:beineri/opt-qt571-xenial
sudo apt-get install qt57-meta-minimal qt57quickcontrols2 qt57quickcontrols
qtchooser -install qt5.7 /opt/qt57/bin/qmake
export QT_SELECT=qt5.7
sudo add-apt-repository ppa:beineri/opt-qt58-xenial
sudo apt-get install qt58-meta-minimal qt58quickcontrols2 qt58quickcontrols
qtchooser -install qt5.8 /opt/qt58/bin/qmake
export QT_SELECT=qt5.8
```

### Building
Expand Down
2 changes: 1 addition & 1 deletion app/app.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include($$PWD/../puush-qt.pri)

QT += core network widgets qml quick
QT += core network widgets qml quick quickcontrols2

TEMPLATE = app
TARGET = puush-qt
Expand Down
7 changes: 6 additions & 1 deletion app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <QApplication>
#include <QQmlApplicationEngine>
#include <QDebug>
#include <QQuickStyle>

#include "systray.h"
#include "information.h"
Expand All @@ -16,7 +17,7 @@ int main(int argc, char *argv[])
QApplication app(argc, argv);
QApplication::setOrganizationName("puush-qt");
QApplication::setApplicationName("puush-qt");
QApplication::setApplicationVersion("0.2.1");
QApplication::setApplicationVersion("0.2.2");

// TODO
// keep only one instance of the application up at a time
Expand All @@ -36,6 +37,10 @@ int main(int argc, char *argv[])
QApplication::setQuitOnLastWindowClosed(false);
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);

// Linux desktops (particularly Plasma) may have pre-built styles,
// so we will set the fallback to Fusion until native styles are one day implemented (please?)
QQuickStyle::setFallbackStyle("Fusion");

Systray *systray = new Systray();
Information *information = new Information();
Authentication *authentication = new Authentication();
Expand Down
1 change: 1 addition & 0 deletions app/ui/Account.qml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ Item {
GroupBox {
id: accountBox
title: qsTr("Account Details")
width: root.width

Column {
Column {
Expand Down
3 changes: 3 additions & 0 deletions app/ui/Advanced.qml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Item {

GroupBox {
title: qsTr("Screen Capture Quality")
width: root.width

Column {
RadioButton {
Expand Down Expand Up @@ -57,6 +58,7 @@ Item {

GroupBox {
title: qsTr("Fullscreen Capture")
width: root.width

Column {
RadioButton {
Expand All @@ -80,6 +82,7 @@ Item {
}
GroupBox {
title: "API Location"
width: root.width

GridLayout {
columns: 2
Expand Down
2 changes: 2 additions & 0 deletions app/ui/General.qml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Item {

GroupBox {
title: qsTr("On Successful Puush")
width: root.width

Column {
CheckBox {
Expand Down Expand Up @@ -80,6 +81,7 @@ Item {

GroupBox {
title: qsTr("Tray Icon Behavior on Double Click")
width: root.width

Column {
RadioButton {
Expand Down
2 changes: 2 additions & 0 deletions app/ui/KeyBindings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@ Item {
GroupBox {
id: keyBindingsBox
title: qsTr("Key Bindings")
width: root.width

Column {
spacing: 10
width: parent.width

GridLayout {
columns: 3
Expand Down
5 changes: 3 additions & 2 deletions puush-qt.pri
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# qt-5.7 is needed because of "qt-quick control 2".
# qt-5.8 is needed for QQuickStyle::setFallbackStyle()
# can't use QT_VERSION, because lessThan is for integers
MIN_MESSAGE = "This application requires a minimum verion of Qt 5.7"
MIN_MESSAGE = "This application requires a minimum verion of Qt 5.8"
lessThan(QT_MAJOR_VERSION, 5) {
error($${MIN_MESSAGE})
}
equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 7) {
equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 8) {
error($${MIN_MESSAGE})
}

Expand Down

0 comments on commit 6965d01

Please sign in to comment.