Bug 366620

Summary: the minimal example given at the start page of kirigami docs is broken
Product: [Frameworks and Libraries] frameworks-kirigami Reporter: Florian Jacob <accounts+bugs.kde>
Component: generalAssignee: Marco Martin <notmart>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: Not decided   
Platform: Other   
OS: Linux   
URL: https://api.kde.org/kirigami/html/index.html
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Florian Jacob 2016-08-11 08:47:28 UTC
I tried to copy the example code to a file and execute it as it was the first kirigami code I found that I could try out, but it did not run.

Reproducible: Always

Steps to Reproduce:
1. copy the example in a file, e.g. example.qml
2. execute it with qml example.qml

Actual Results:  
QQmlApplicationEngine failed to load component
file:///home/florian/test.qml:41 Action is not a type

and, after fixing the actions:

file:///home/florian/test.qml:73: ReferenceError: sheet is not defined
file:///home/florian/test.qml:42: ReferenceError: sheet is not defined

Expected Results:  
executing the sample with no error

From line 40 onwards, the example uses Action instead of Kirigami.Action, which seems to cause an import error.

After I replaced all „Action“ with „Kirigam.Action“ the file executes, but throws an error about the used sheet variable.
Comment 1 Marco Martin 2017-07-03 09:03:53 UTC
Git commit 368dd9a656227f80dd7429c6943ac8f4f79c43ac by Marco Martin.
Committed on 03/07/2017 at 09:03.
Pushed by mart into branch 'master'.

make the minimal example work

M  +14   -6    Mainpage.dox

https://commits.kde.org/kirigami/368dd9a656227f80dd7429c6943ac8f4f79c43ac
Comment 2 Florian Jacob 2017-07-06 21:16:27 UTC
Thanks! :)