Merge lp:~zeller-benjamin/qtcreator-plugin-ubuntu/lp1446062 into lp:qtcreator-plugin-ubuntu

Proposed by Benjamin Zeller
Status: Merged
Approved by: Zoltan Balogh
Approved revision: 376
Merged at revision: 378
Proposed branch: lp:~zeller-benjamin/qtcreator-plugin-ubuntu/lp1446062
Merge into: lp:qtcreator-plugin-ubuntu
Diff against target: 87 lines (+26/-6)
2 files modified
src/ubuntu/ubuntupackagestep.cpp (+25/-6)
src/ubuntu/ubuntupackagestep.h (+1/-0)
To merge this branch: bzr merge lp:~zeller-benjamin/qtcreator-plugin-ubuntu/lp1446062
Reviewer Review Type Date Requested Status
Zoltan Balogh Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+256771@code.launchpad.net

Commit message

Fix bug lp:1446062, RSync failes if translation dir is not created

Description of the change

Fix bug lp:1446062, RSync failes if translation dir is not created

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Zoltan Balogh (bzoltan) wrote :

OK

review: Approve
377. By Benjamin Zeller

- Check if the translation dir exists before adding it to the rsync
command

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/ubuntu/ubuntupackagestep.cpp'
2--- src/ubuntu/ubuntupackagestep.cpp 2015-04-17 09:36:23 +0000
3+++ src/ubuntu/ubuntupackagestep.cpp 2015-04-20 19:52:06 +0000
4@@ -73,6 +73,15 @@
5
6 bool UbuntuPackageStep::init()
7 {
8+ //initialization happens in internalInit,
9+ //because it requires informations that are only available at this
10+ //time
11+ //@TODO refactor into single buildsteps per projecttype
12+ return true;
13+}
14+
15+void UbuntuPackageStep::internalInit()
16+{
17 m_tasks.clear();
18
19 QString projectDir = target()->project()->projectDirectory();
20@@ -81,6 +90,9 @@
21 Utils::Environment env = Utils::Environment::systemEnvironment();
22 Utils::AbstractMacroExpander *mExp = 0;
23
24+ m_MakeParam = m_ClickParam = m_ReviewParam = ProjectExplorer::ProcessParameters();
25+ m_clickPackageName.clear();
26+
27 bool isCMake = target()->project()->id() == CMakeProjectManager::Constants::CMAKEPROJECT_ID;
28 bool isQMake = target()->project()->id() == QmakeProjectManager::Constants::QMAKEPROJECT_ID;
29
30@@ -103,7 +115,7 @@
31 m_tasks.append(t);
32
33 //UbuntuClickPackageStep::run will stop if tasks exist
34- return true;
35+ return;
36 } else {
37 //backward compatibility, old HTML5 projects did not have a Buildconfiguration
38 //this would crash otherwise
39@@ -174,12 +186,17 @@
40 << QStringLiteral("--exclude")<<QStringLiteral("*.ubuntuhtmlproject")
41 << QString(QStringLiteral("--exclude-from=%1")).arg(projectDir+QDir::separator()+QStringLiteral(".excludes"));
42
43- arguments << projectDir+QDir::separator()
44- << m_buildDir
45+ arguments << projectDir+QDir::separator();
46+
47+ QString translationsDir = m_buildDir
48 + QDir::separator()
49 + QString::fromLatin1(Constants::UBUNTU_CLICK_QML_BUILD_TRANSL_DIR)
50- + QDir::separator()
51- << m_deployDir;
52+ + QDir::separator();
53+
54+ if (QDir(translationsDir).exists())
55+ arguments << translationsDir;
56+
57+ arguments << m_deployDir;
58
59 ProjectExplorer::ProcessParameters* params = &m_MakeParam;
60 params->setMacroExpander(mExp);
61@@ -240,11 +257,13 @@
62 params->setEnvironment(tmpEnv);
63 }
64
65- return true;
66+ return;
67 }
68
69 void UbuntuPackageStep::run(QFutureInterface<bool> &fi)
70 {
71+ internalInit();
72+
73 if (m_tasks.size()) {
74 foreach (const ProjectExplorer::Task& task, m_tasks) {
75 addTask(task);
76
77=== modified file 'src/ubuntu/ubuntupackagestep.h'
78--- src/ubuntu/ubuntupackagestep.h 2015-02-16 19:03:04 +0000
79+++ src/ubuntu/ubuntupackagestep.h 2015-04-20 19:52:06 +0000
80@@ -91,6 +91,7 @@
81 void currentSubStepFinished();
82
83 protected:
84+ void internalInit ();
85 void setupAndStartProcess ( const ProjectExplorer::ProcessParameters &params );
86 bool processFinished (FinishedCheckMode mode = CheckReturnCode);
87 void cleanup ();

Subscribers

People subscribed via source and target branches