Merge lp:~akiva/qtcreator-plugin-autopilot/fix-segfault-fix-winsize into lp:qtcreator-plugin-autopilot

Proposed by Akiva on 2015-07-02
Status: Merged
Approved by: Benjamin Zeller on 2015-07-02
Approved revision: 18
Merged at revision: 19
Proposed branch: lp:~akiva/qtcreator-plugin-autopilot/fix-segfault-fix-winsize
Merge into: lp:qtcreator-plugin-autopilot
Diff against target: 62 lines (+8/-5)
2 files modified
src/autopilot/autopilotlocator.cpp (+5/-2)
src/autopilot/autopilotrunconfiguration.cpp (+3/-3)
To merge this branch: bzr merge lp:~akiva/qtcreator-plugin-autopilot/fix-segfault-fix-winsize
Reviewer Review Type Date Requested Status
Benjamin Zeller (community) 2015-07-02 Approve on 2015-07-02
Review via email: mp+263616@code.launchpad.net

Commit Message

    State:
    - Stable, needs testing
    - Should merge in trunk

    Changelog:
    - Fixed a segmentation fault, that would happen if you activated the locator without a project open
    - Set the window dimensions so the window is no longer needlessly bigger than the touch interface displayed within.

    Todo:
    - Fix ID issues
    - Deduplicate code
    - Fix QMake Projects
    - Refresh Testlist to be asynchronous
    - Explore restoring runconfig

Description of the Change

    State:
    - Stable, needs testing
    - Should merge in trunk

    Changelog:
    - Fixed a segmentation fault, that would happen if you activated the locator without a project open
    - Set the window dimensions so the window is no longer needlessly bigger than the touch interface displayed within.

    Todo:
    - Fix ID issues
    - Deduplicate code
    - Fix QMake Projects
    - Refresh Testlist to be asynchronous
    - Explore restoring runconfig

To post a comment you must log in.
Benjamin Zeller (zeller-benjamin) wrote :

OK

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/autopilot/autopilotlocator.cpp'
2--- src/autopilot/autopilotlocator.cpp 2015-07-01 15:15:55 +0000
3+++ src/autopilot/autopilotlocator.cpp 2015-07-02 04:20:50 +0000
4@@ -33,6 +33,9 @@
5 QList<Core::LocatorFilterEntry> AutopilotLocator::matchesFor(QFutureInterface<Core::LocatorFilterEntry> &future, const QString &entry) {
6
7 QList<Core::LocatorFilterEntry> locatorEntries; // Local, as you do not want to edit the static entry, s_LocatorEntries
8+ if (!ProjectExplorer::ProjectExplorerPlugin::instance()->currentProject()) {
9+ return locatorEntries;
10+ }
11 int ii;
12
13 for (int i = 0; ProjectExplorer::ProjectExplorerPlugin::instance()->currentProject()->activeTarget()->runConfigurations().length() > i; i++) {
14@@ -55,7 +58,7 @@
15
16 /* Temporarily set the Run configuration to run the one test */
17 qvariant_cast<AutopilotRunConfiguration*>(selection.internalData)
18- ->setCommandLineArguments(tr("-X ")
19+ ->setCommandLineArguments(tr("-X -s 320x600x24 ")
20 + selection.displayName
21 + tr(".tests.test_")
22 + selection.extraInfo.split(tr(" | ")).first());
23@@ -95,7 +98,7 @@
24 ,this
25 ,SLOT(resetTestList(QObject*)));
26
27- static_cast<AutopilotRunConfiguration*>(arc)->setCommandLineArguments(tr("-X ")
28+ static_cast<AutopilotRunConfiguration*>(arc)->setCommandLineArguments(tr("-X -s 320x600x24 ")
29 + static_cast<AutopilotRunConfiguration*>(arc)->checkedTests()
30 .join(tr(" ")));
31
32
33=== modified file 'src/autopilot/autopilotrunconfiguration.cpp'
34--- src/autopilot/autopilotrunconfiguration.cpp 2015-07-01 15:15:55 +0000
35+++ src/autopilot/autopilotrunconfiguration.cpp 2015-07-02 04:20:50 +0000
36@@ -415,7 +415,7 @@
37 m_CheckedTests.removeAll(test->text());
38 }
39
40- setCommandLineArguments(tr("-X ") + m_CheckedTests.join(tr(" ")));
41+ setCommandLineArguments(tr("-X -s 320x600x24 ") + m_CheckedTests.join(tr(" ")));
42 return;
43 }
44 void AutopilotRunConfiguration::refreshTestList(QWidget * widget) {
45@@ -490,7 +490,7 @@
46 adjustTestList(autopilotCheckListTest);
47
48 }
49- setCommandLineArguments(tr("-X ") + m_CheckedTests.join(tr(" ")));
50+ setCommandLineArguments(tr("-X -s 320x600x24 ") + m_CheckedTests.join(tr(" ")));
51
52 /* Repopulate Locator */
53 setTestList(module());
54@@ -532,7 +532,7 @@
55 autopilotCheckListTest->setCheckState(Qt::Checked);
56 adjustTestList(autopilotCheckListTest);
57 }
58- setCommandLineArguments(tr("-X ") + m_CheckedTests.join(tr(" ")));
59+ setCommandLineArguments(tr("-X -s 320x600x24 ") + m_CheckedTests.join(tr(" ")));
60
61 return autopilotSettingsWidget;
62 }

Subscribers

People subscribed via source and target branches

to all changes: