Merge lp:~diegosarmentero/clickmanager-plugin/version-compare-fix into lp:clickmanager-plugin

Proposed by Diego Sarmentero on 2013-09-26
Status: Merged
Approved by: Alejandro J. Cura on 2013-09-26
Approved revision: 13
Merged at revision: 11
Proposed branch: lp:~diegosarmentero/clickmanager-plugin/version-compare-fix
Merge into: lp:clickmanager-plugin
Diff against target: 16 lines (+2/-4)
1 file modified
src/application.cpp (+2/-4)
To merge this branch: bzr merge lp:~diegosarmentero/clickmanager-plugin/version-compare-fix
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve on 2013-09-26
Roberto Alsina (community) 2013-09-26 Approve on 2013-09-26
Review via email: mp+187842@code.launchpad.net

Commit message

- Use a single instance of debVersion for comparison.

Description of the change

Creating a new instance of debVersioningSystem each time a version needed to be compared it was causing apt-pkg to crash. Instead a single instance is used for each comparison right now, and that instance if being provided by: <apt-pkg/debversion.h>

To post a comment you must log in.
12. By Diego Sarmentero on 2013-09-26

reverting changes for code clarity, will be added later in a cleanup branch

13. By Diego Sarmentero on 2013-09-26

fixing indentation

Roberto Alsina (ralsina) :
review: Approve
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/application.cpp'
2--- src/application.cpp 2013-09-13 10:12:01 +0000
3+++ src/application.cpp 2013-09-26 16:43:16 +0000
4@@ -47,10 +47,8 @@
5 {
6 this->m_remote_version = version;
7
8- debVersioningSystem debVersion;
9-
10- int result = debVersion.CmpVersion(this->m_local_version.toUtf8().data(),
11- this->m_remote_version.toUtf8().data());
12+ int result = debVS.CmpVersion(this->m_local_version.toUtf8().data(),
13+ this->m_remote_version.toUtf8().data());
14 if(result == -1) {
15 this->m_update = true;
16 }else{

Subscribers

People subscribed via source and target branches