Review Request 122981: add KGlobalAccel::loadShortcutFromGlobalSettings

Gregor Mi codestruct at posteo.org
Sun Mar 22 16:05:47 UTC 2015


-----------------------------------------------------------
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.


Changes
-------

- Unit tests: use setupTest("testLoadShortcutFromGlobalSettings") and check for m_daemonInstalled
- fix typo

Open issue: probably by calling setupTest("testLoadShortcutFromGlobalSettings") now other tests do not work, even when the new test case is not executed anymore.

```
Starting: /home/gregor/dev/kf5/build/frameworks/kglobalaccel/autotests/kglobalshortcuttest
********* 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()
FAIL!  : KGlobalShortcutTest::testSetShortcut() Compared lists differ at index 0.
   Actual   (KGlobalAccel::self()->shortcut(m_actionA)): <null>
   Expected (cutA): <null>
   Loc: [/home/gregor/dev/kf5/src/frameworks/kglobalaccel/autotests/kglobalshortcuttest.cpp(111)]
FAIL!  : KGlobalShortcutTest::testFindActionByKey() Compared values are not the same
   Actual   (actionId.first().uniqueName()): "Action A:testLoadShortcutFromGlobalSettings"
   Expected (actionIdAUniqueName)          : "Action A:testFindActionByKey"
   Loc: [/home/gregor/dev/kf5/src/frameworks/kglobalaccel/autotests/kglobalshortcuttest.cpp(139)]
PASS   : KGlobalShortcutTest::testChangeShortcut()
FAIL!  : KGlobalShortcutTest::testStealShortcut() Compared lists differ at index 0.
   Actual   (KGlobalAccel::self()->shortcut(m_actionA)): <null>
   Expected (cutA): <null>
   Loc: [/home/gregor/dev/kf5/src/frameworks/kglobalaccel/autotests/kglobalshortcuttest.cpp(200)]
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(420)]
PASS   : KGlobalShortcutTest::testLoadShortcutFromGlobalSettings()
PASS   : KGlobalShortcutTest::cleanupTestCase()
Totals: 10 passed, 4 failed, 0 skipped, 0 blacklisted
********* Finished testing of KGlobalShortcutTest *********
QCoreApplication::postEvent: Unexpected null receiver
*** Exited with return code: 4 ***

```


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 (updated)
-----

  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/20150322/be6917da/attachment.html>


More information about the Kde-frameworks-devel mailing list