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

Proposed by Diego Sarmentero
Status: Merged
Approved by: Alejandro J. Cura
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
Roberto Alsina (community) Approve
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

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

13. By Diego Sarmentero

fixing indentation

Revision history for this message
Roberto Alsina (ralsina) :
review: Approve
Revision history for this message
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
=== modified file 'src/application.cpp'
--- src/application.cpp 2013-09-13 10:12:01 +0000
+++ src/application.cpp 2013-09-26 16:43:16 +0000
@@ -47,10 +47,8 @@
47{47{
48 this->m_remote_version = version;48 this->m_remote_version = version;
4949
50 debVersioningSystem debVersion;50 int result = debVS.CmpVersion(this->m_local_version.toUtf8().data(),
5151 this->m_remote_version.toUtf8().data());
52 int result = debVersion.CmpVersion(this->m_local_version.toUtf8().data(),
53 this->m_remote_version.toUtf8().data());
54 if(result == -1) {52 if(result == -1) {
55 this->m_update = true;53 this->m_update = true;
56 }else{54 }else{

Subscribers

People subscribed via source and target branches