D28859: Detect QQC2 version at build time with actual detection.

2020-04-20 Thread Xuetian Weng
This revision was automatically updated to reflect the committed changes.
Closed by commit R858:aa57b34f75f0: Detect QQC2 version at build time with 
actual detection. (authored by xuetianweng).

REPOSITORY
  R858 Qt Quick Controls 2: Desktop Style

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28859?vs=80646=80647

REVISION DETAIL
  https://phabricator.kde.org/D28859

AFFECTED FILES
  CMakeLists.txt

To: xuetianweng, #plasma, rizzitello, davidedmundson, apol, mart
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28859: Detect QQC2 version at build time with actual detection.

2020-04-20 Thread Xuetian Weng
xuetianweng added a comment.


  In D28859#652379 , @davidedmundson 
wrote:
  
  > So the problem we're solving is that we want to go
  >
  > Qt5.12 - QQC2.5
  >  Qt5.13 - QQC2.6
  >  Qt5.14 - QQC2.7
  >  Qt5.15 - QQC2.15
  >
  > correct?
  >
  > We now know all Qt5 versions, and we know that Qt6 won't have versions.
  >
  > I don't see why need this complicated thing instead of an "if" statement on 
Qt5QuickControls2_VERSION_MINOR
  
  
  Just to correct it, the change is since 5.12.
  5.11 -> 5.4
  5.12 -> 5.12

REPOSITORY
  R858 Qt Quick Controls 2: Desktop Style

REVISION DETAIL
  https://phabricator.kde.org/D28859

To: xuetianweng, #plasma, rizzitello, davidedmundson, apol, mart
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28859: Detect QQC2 version at build time with actual detection.

2020-04-20 Thread Xuetian Weng
xuetianweng updated this revision to Diff 80646.
xuetianweng added a comment.


  Just fix the version by if-else check.

REPOSITORY
  R858 Qt Quick Controls 2: Desktop Style

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28859?vs=80227=80646

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D28859

AFFECTED FILES
  CMakeLists.txt

To: xuetianweng, #plasma, rizzitello, davidedmundson, apol, mart
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28859: Detect QQC2 version at build time with actual detection.

2020-04-20 Thread David Edmundson
davidedmundson added a comment.


  So the problem we're solving is that we want to go
  
  Qt5.12 - QQC2.5
  Qt5.13 - QQC2.6
  Qt5.14 - QQC2.7
  Qt5.15 - QQC2.15
  
  correct?
  
  We now know all Qt5 versions, and we know that Qt6 won't have versions.
  
  I don't see why need this complicated thing instead of an "if" statement on 
Qt5QuickControls2_VERSION_MINOR

REPOSITORY
  R858 Qt Quick Controls 2: Desktop Style

REVISION DETAIL
  https://phabricator.kde.org/D28859

To: xuetianweng, #plasma, rizzitello, davidedmundson, apol, mart
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28859: Detect QQC2 version at build time with actual detection.

2020-04-19 Thread Xuetian Weng
xuetianweng added a comment.


  ping? :)

REPOSITORY
  R858 Qt Quick Controls 2: Desktop Style

REVISION DETAIL
  https://phabricator.kde.org/D28859

To: xuetianweng, #plasma, rizzitello, davidedmundson, apol, mart
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28859: Detect QQC2 version at build time with actual detection.

2020-04-15 Thread Xuetian Weng
xuetianweng added a comment.


  In D28859#649191 , @davidedmundson 
wrote:
  
  > I don't understand.
  >
  > We're still running this at compile time, so what's the practical 
difference?
  
  
  The old implement hard-codes it to (minor_version - 7), which is the old 
contract.
  
  This commit message says it will ties the version with minor version. (I 
don't think this will change anymore, because patch version will not introduce 
new API anyway).
  
https://github.com/qt/qtquickcontrols2/commit/3c7bfc156797b2f3ef08a8cf620b79da80e4b061
  
  In order to cover both cases, this code is doing the check simply checking 
minor , minor - 1 until it finds the highest available version.

REPOSITORY
  R858 Qt Quick Controls 2: Desktop Style

REVISION DETAIL
  https://phabricator.kde.org/D28859

To: xuetianweng, #plasma, rizzitello, davidedmundson, apol, mart
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28859: Detect QQC2 version at build time with actual detection.

2020-04-15 Thread David Edmundson
davidedmundson added a comment.


  I don't understand.
  
  We're still running this at compile time, so what's the practical difference?

REPOSITORY
  R858 Qt Quick Controls 2: Desktop Style

REVISION DETAIL
  https://phabricator.kde.org/D28859

To: xuetianweng, #plasma, rizzitello, davidedmundson, apol, mart
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28859: Detect QQC2 version at build time with actual detection.

2020-04-15 Thread Xuetian Weng
xuetianweng updated this revision to Diff 80227.
xuetianweng added a comment.


  fix header

REPOSITORY
  R858 Qt Quick Controls 2: Desktop Style

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28859?vs=80226=80227

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D28859

AFFECTED FILES
  CMakeLists.txt
  detectqqc2version.qml

To: xuetianweng, #plasma, rizzitello, davidedmundson, apol, mart
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28859: Detect QQC2 version at build time with actual detection.

2020-04-15 Thread Xuetian Weng
xuetianweng created this revision.
xuetianweng added reviewers: Plasma, rizzitello, davidedmundson, apol, mart.
xuetianweng added a project: Plasma.
Herald added a subscriber: plasma-devel.
xuetianweng requested review of this revision.

REVISION SUMMARY
  Whenever qqc release a new version the version need to be updated.
  Otherwise the feature is not available to user. This change tries
  to use real qml code to detect the version by creating object until
  success, force to use a minimal qpa platform when running it.

TEST PLAN
  Run the cmake under a env without display server and version is detected
  correctly.

REPOSITORY
  R858 Qt Quick Controls 2: Desktop Style

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D28859

AFFECTED FILES
  CMakeLists.txt
  detectqqc2version.qml

To: xuetianweng, #plasma, rizzitello, davidedmundson, apol, mart
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart