Review Request 122981: add KGlobalAccel::loadShortcutFromGlobalSettings
Gregor Mi
codestruct at posteo.org
Thu Apr 2 14:42:06 UTC 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122981/#review78410
-----------------------------------------------------------
I finally managed to make most the master unit tests pass:
********* Start testing of KGlobalShortcutTest *********
Config: Using QtTest library 5.4.2, Qt 5.4.2 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 4.8.3 20140627 [gcc-4_8-branch revision 212064])
PASS : KGlobalShortcutTest::initTestCase()
PASS : KGlobalShortcutTest::testSetShortcut()
QDEBUG : KGlobalShortcutTest::testActivateShortcut() kf5.kiconthemes: "Theme tree: (Oxygen)"
FAIL! : KGlobalShortcutTest::testActivateShortcut() 'actionASpy.wait()' returned FALSE. ()
Loc: [/home/gregor/dev/kf5/src/frameworks/kglobalaccel/autotests/kglobalshortcuttest.cpp(172)]
PASS : KGlobalShortcutTest::testFindActionByKey()
PASS : KGlobalShortcutTest::testChangeShortcut()
PASS : KGlobalShortcutTest::testStealShortcut()
PASS : KGlobalShortcutTest::testSaveRestore()
PASS : KGlobalShortcutTest::testListActions()
PASS : KGlobalShortcutTest::testComponentAssignment()
PASS : KGlobalShortcutTest::testConfigurationActions()
PASS : KGlobalShortcutTest::testNotification()
PASS : KGlobalShortcutTest::testOverrideMainComponentData()
FAIL! : KGlobalShortcutTest::testForgetGlobalShortcut() '!components.contains(componentId)' returned FALSE. ()
Loc: [/home/gregor/dev/kf5/src/frameworks/kglobalaccel/autotests/kglobalshortcuttest.cpp(481)]
PASS : KGlobalShortcutTest::testLoadShortcutFromGlobalSettings()
PASS : KGlobalShortcutTest::cleanupTestCase()
Totals: 13 passed, 2 failed, 0 skipped, 0 blacklisted
********* Finished testing of KGlobalShortcutTest *********
I did this by altering the test QKeySequences to:
const QKeySequence sequenceA = QKeySequence(Qt::SHIFT + Qt::META + Qt::CTRL + Qt::ALT + Qt::Key_F11);
const QKeySequence sequenceB = QKeySequence(Qt::Key_F26);
const QKeySequence sequenceC = QKeySequence(Qt::SHIFT + Qt::META + Qt::CTRL + Qt::Key_F26);
const QKeySequence sequenceD = QKeySequence(Qt::META + Qt::ALT + Qt::Key_F25);
const QKeySequence sequenceE = QKeySequence(Qt::META + Qt::Key_F24);
const QKeySequence sequenceF = QKeySequence(Qt::META + Qt::Key_F23);
and by replacing the component id "qttest" by "qt-test-1".
The problem is, I cannot go back to the original test code because it will fail because of old registered keyboard shortcuts.
I tried to reset my runtime settings manually by doing:
1)
* delete ~/.qttest/
* delete ~/.cache5
* delete ~/.config5/
* delete ~/.local5/
2)
I know the wrong actual string "testLoadShortcutFromGlobalSettings" because I added it in another branch to the test case but I am on master now.
I did a `find . -type f -size -900k | grep testLoadShortcutFromGlobalSettings` on my home directory which finds no result.
But somewhere this string must be stored. Any idea where?
3)
I used QDbusViewer to to query the method org.kde.kglobalaccel.getGlobalShortcutsByKey (where 16777292 is the number of the key):
Received reply from :1.15
Arguments: [Argument: a(ssssssaiai) {[Argument: (ssssssaiai) "Action A:testLoadShortcutFromGlobalSettings", "Text For Action A", "qttest", "KDE Test Program 1", "default", "Default Context", [Argument: ai {0, 16777292}], [Argument: ai {520093771}]]}]
There is the wrong "Action A:testLoadShortcutFromGlobalSettings" again.
So the question is: How can I unregister the value retrieved by the method "getGlobalShortcutsByKey"? This would also fix the unit tests.
- Gregor Mi
On March 22, 2015, 4:05 p.m., Gregor Mi wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122981/
> -----------------------------------------------------------
>
> (Updated March 22, 2015, 4:05 p.m.)
>
>
> Review request for KDE Frameworks, Martin Gräßlin and Thomas Lübking.
>
>
> Repository: kglobalaccel
>
>
> Description
> -------
>
> In some cases you need to call loadShortcutFromGlobalSettings() in order not to get a an empty list when calling shortcut(). See discussion in https://git.reviewboard.kde.org/r/122249/.
>
>
> Diffs
> -----
>
> autotests/kglobalshortcuttest.h 2a7b40d34875e16345a659fb9764e4f536ad79c6
> autotests/kglobalshortcuttest.cpp 169bf92ffbff985cd4381e771c2fcecaff77156b
> src/kglobalaccel.h 3fe20ca8e4ec6ceb0bb9e54235aef7f1aeeb8c16
> src/kglobalaccel.cpp 1b6b3f5cb6d42401d684e6a491d12a6e57248fd1
>
> Diff: https://git.reviewboard.kde.org/r/122981/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Gregor Mi
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150402/b15680ec/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list