<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/122981/">https://git.reviewboard.kde.org/r/122981/</a>
     </td>
    </tr>
   </table>
   <br />





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I finally managed to make most the master unit tests pass:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><strong style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;"><em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">*</em></strong><strong style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;"> Start testing of KGlobalShortcutTest <strong style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;"><em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">*</em></strong></strong>
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
<strong style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;"><em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">*</em></strong><strong style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;"> Finished testing of KGlobalShortcutTest <strong style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;"><em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">*</em></strong></strong></p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I did this by altering the test QKeySequences to:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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);</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">and by replacing the component id "qttest" by "qt-test-1".</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The problem is, I cannot go back to the original test code because it will fail because of old registered keyboard shortcuts.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I tried to reset my runtime settings manually by doing:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">1)
<em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;"> delete ~/.qttest/
</em> delete ~/.cache5
<em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;"> delete ~/.config5/
</em> delete ~/.local5/</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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 <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">find . -type f -size -900k | grep testLoadShortcutFromGlobalSettings</code> on my home directory which finds no result.
But somewhere this string must be stored. Any idea where?</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">3)
I used QDbusViewer to to query the method org.kde.kglobalaccel.getGlobalShortcutsByKey (where 16777292 is the number of the key):</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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}]]}]</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">There is the wrong "Action A:testLoadShortcutFromGlobalSettings" again.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">So the question is: How can I unregister the value retrieved by the method "getGlobalShortcutsByKey"? This would also fix the unit tests.</p></pre>
 <br />









<p>- Gregor Mi</p>


<br />
<p>On March 22nd, 2015, 4:05 p.m. UTC, Gregor Mi wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
 <tr>
  <td>

<div>Review request for KDE Frameworks, Martin Gräßlin and Thomas Lübking.</div>
<div>By Gregor Mi.</div>


<p style="color: grey;"><i>Updated March 22, 2015, 4:05 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kglobalaccel
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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/.</p></pre>
  </td>
 </tr>
</table>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>autotests/kglobalshortcuttest.h <span style="color: grey">(2a7b40d34875e16345a659fb9764e4f536ad79c6)</span></li>

 <li>autotests/kglobalshortcuttest.cpp <span style="color: grey">(169bf92ffbff985cd4381e771c2fcecaff77156b)</span></li>

 <li>src/kglobalaccel.h <span style="color: grey">(3fe20ca8e4ec6ceb0bb9e54235aef7f1aeeb8c16)</span></li>

 <li>src/kglobalaccel.cpp <span style="color: grey">(1b6b3f5cb6d42401d684e6a491d12a6e57248fd1)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/122981/diff/" style="margin-left: 3em;">View Diff</a></p>






  </td>
 </tr>
</table>







  </div>
 </body>
</html>