Skip to content

Commit 61fa732

Browse files
shun2wangJorisGoosen
authored andcommitted
minor: cleaning version number from qml import statement
1 parent 2a27f2a commit 61fa732

File tree

6 files changed

+29
-30
lines changed

6 files changed

+29
-30
lines changed

Desktop/components/JASP/Theme/DarkTheme.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import QtQuick 2.12
1+
import QtQuick
22

33
Theme
44
{

Desktop/components/JASP/Widgets/FileMenu/OSF.qml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import QtQuick.Controls as QtC
2121
import JASP.Controls
2222
import JASP.Widgets
2323

24-
//import QtQuick.Layouts 1.3
2524

2625
Item
2726
{

Desktop/qquick/datasetview.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ QQuickItem * DataSetView::createTextItem(int row, int col)
666666
if(_itemDelegate == nullptr)
667667
{
668668
_itemDelegate = new QQmlComponent(qmlEngine(this));
669-
_itemDelegate->setData("import QtQuick 2.9\nText { text: itemText; color: itemActive ? 'black' : 'grey'; verticalAlignment: Text.AlignVCenter; }", QUrl());
669+
_itemDelegate->setData("import QtQuick \nText { text: itemText; color: itemActive ? 'black' : 'grey'; verticalAlignment: Text.AlignVCenter; }", QUrl());
670670

671671
emit itemDelegateChanged();
672672
}
@@ -783,7 +783,7 @@ QQuickItem * DataSetView::createRowNumber(int row)
783783
if(_rowNumberDelegate == nullptr)
784784
{
785785
_rowNumberDelegate = new QQmlComponent(qmlEngine(this));
786-
_rowNumberDelegate->setData("import QtQuick 2.9\nItem {\n"
786+
_rowNumberDelegate->setData("import QtQuick \nItem {\n"
787787
"Rectangle { color: jaspTheme.uiBackground; anchors.fill: parent }\n"
788788
"Text { text: rowNumber; anchors.centerIn: parent; color: jaspTheme.textEnabled; }\n"
789789
"}", QUrl());
@@ -873,7 +873,7 @@ QQuickItem * DataSetView::createColumnHeader(int col)
873873
if(_columnHeaderDelegate == nullptr)
874874
{
875875
_columnHeaderDelegate = new QQmlComponent(qmlEngine(this));
876-
_columnHeaderDelegate->setData("import QtQuick 2.9\nItem {\n"
876+
_columnHeaderDelegate->setData("import QtQuick \nItem {\n"
877877
"Rectangle { color: jaspTheme.uiBackground; anchors.fill: parent }\n"
878878
"Text { text: headerText; anchors.centerIn: parent; color: jaspTheme.textEnabled; }\n"
879879
"}", QUrl());
@@ -977,7 +977,7 @@ QQuickItem * DataSetView::createleftTopCorner()
977977
if(_leftTopCornerDelegate == nullptr)
978978
{
979979
_leftTopCornerDelegate = new QQmlComponent(qmlEngine(this));
980-
_leftTopCornerDelegate->setData("import QtQuick 2.9\nItem {}", QUrl());
980+
_leftTopCornerDelegate->setData("import QtQuick \nItem {}", QUrl());
981981
}
982982

983983
QQmlIncubator localIncubator(QQmlIncubator::Synchronous);
@@ -1065,7 +1065,7 @@ void DataSetView::positionEditItem(int row, int col)
10651065
_editDelegate = new QQmlComponent(qmlEngine(this));
10661066

10671067
_editDelegate->setData(
1068-
"import QtQuick 2.9" "\n"
1068+
"import QtQuick" "\n"
10691069
"TextInput { text: itemText; color: itemActive ? 'black' : 'grey'; verticalAlignment: Text.AlignVCenter; \n"
10701070
" onEditingFinished: dataview.commitEdit(rowIndex, columnIndex, text); " "\n"
10711071
"}", QUrl());

Docs/development/jasp-adding-module.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ Click below to see an example. In the next lines, we'll dissect it to understand
6565
<summary>Example</summary>
6666

6767
```qml
68-
import QtQuick 2.12
69-
import JASP.Module 1.0
68+
import QtQuick
69+
import JASP.Module
7070
7171
Description
7272
{

Docs/development/jasp-qml-guide.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -897,10 +897,10 @@ We can begin actual work on the QML file, first we have to tell the engine where
897897
<summary>Code</summary>
898898

899899
```qml
900-
import QtQuick 2.11
901-
import QtQuick.Layouts 1.3
902-
import JASP.Controls 1.0
903-
import JASP.Widgets 1.0
900+
import QtQuick
901+
import QtQuick.Layouts
902+
import JASP.Controls
903+
import JASP.Widgets
904904
```
905905

906906
If you want to import QML components from another jasp module, you can!
@@ -914,11 +914,11 @@ In the future, we will require using qualified namespace for the import statemen
914914
<summary>Code</summary>
915915

916916
```qml
917-
import QtQuick 2.11
918-
import QtQuick.Layouts 1.3
919-
import JASP.Controls 1.0 as JC
920-
import JASP.Theme 1.0 as JT
921-
import JASP.Widgets 1.0 as JW
917+
import QtQuick
918+
import QtQuick.Layouts
919+
import JASP.Controls as JC
920+
import JASP.Theme as JT
921+
import JASP.Widgets as JW
922922
```
923923
</details>
924924

@@ -931,10 +931,10 @@ At this point we add a `Form` which will hold all our input components:
931931
<summary>Code</summary>
932932

933933
```qml
934-
import QtQuick 2.11
935-
import QtQuick.Layouts 1.3
936-
import JASP.Controls 1.0
937-
import JASP.Widgets 1.0
934+
import QtQuick
935+
import QtQuick.Layouts
936+
import JASP.Controls
937+
import JASP.Widgets
938938
939939
Form
940940
{
@@ -951,10 +951,10 @@ It's now a matter of mixing and matching the previously shown components to crea
951951
<summary>Code</summary>
952952

953953
```qml
954-
import QtQuick 2.11
955-
import QtQuick.Layouts 1.3
956-
import JASP.Controls 1.0
957-
import JASP.Widgets 1.0
954+
import QtQuick
955+
import QtQuick.Layouts
956+
import JASP.Controls
957+
import JASP.Widgets
958958
959959
Form
960960
{

Docs/development/jasp-upgrade-qml.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ If you are writing an `Upgrade` for an analysis as it was in JASP before version
1616
Just having a `functionName` and the two `version`s would do very little and the minimal sensible change you could make is adding `newFunctionName` with a new name for the analysis.
1717
A very short example of that would be fixing the typo that someone could have made in 0.9 of a fictional module:
1818
```qml
19-
import QtQuick 2.12
20-
import JASP.Module 1.0
19+
import QtQuick
20+
import JASP.Module
2121
2222
Upgrades
2323
{
@@ -57,8 +57,8 @@ Something important to keep in mind is that a list of these `Changes` will be ap
5757

5858
For all following examples the full QML file would look something like:
5959
```qml
60-
import QtQuick 2.12
61-
import JASP.Module 1.0
60+
import QtQuick
61+
import JASP.Module
6262
6363
Upgrades
6464
{

0 commit comments

Comments
 (0)