Merge lp:~knitzsche/scope-aggregator/scope-id_fixes-bug-1486184 into lp:scope-aggregator

Proposed by Kyle Nitzsche
Status: Merged
Approved by: Kyle Nitzsche
Approved revision: 148
Merged at revision: 146
Proposed branch: lp:~knitzsche/scope-aggregator/scope-id_fixes-bug-1486184
Merge into: lp:scope-aggregator
Diff against target: 64 lines (+5/-12)
4 files modified
CMakeLists.txt (+1/-1)
include/scope.h (+1/-0)
src/query.cpp (+1/-11)
src/scope.cpp (+2/-0)
To merge this branch: bzr merge lp:~knitzsche/scope-aggregator/scope-id_fixes-bug-1486184
Reviewer Review Type Date Requested Status
Gary.Wang Approve
Review via email: mp+268371@code.launchpad.net

Commit message

let's start using feature branches and MRs for scope-aggreagor

Description of the change

obtain the current scope id from Scope::start(scope_id), not by parsing the scope_directory() path.

To post a comment you must log in.
147. By Kyle Nitzsche

just adding a --fixes arg to commit

148. By Kyle Nitzsche

suppress qDebug()

Revision history for this message
Gary.Wang (gary-wzl77) wrote :

Looks good to me.
Thanks.

review: Approve
Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

Thanks Gary.

In future for simple MRs like this you can Top Approve too.

(I will do it this time.)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2015-08-04 19:12:04 +0000
+++ CMakeLists.txt 2015-08-18 18:49:11 +0000
@@ -1,4 +1,4 @@
1set(VERSION "1.5.24")1set(VERSION "1.5.24.1")
22
3# Supress qDebug() output3# Supress qDebug() output
4ADD_DEFINITIONS( -DQT_NO_DEBUG_OUTPUT )4ADD_DEFINITIONS( -DQT_NO_DEBUG_OUTPUT )
55
=== modified file 'include/scope.h'
--- include/scope.h 2015-05-21 19:07:53 +0000
+++ include/scope.h 2015-08-18 18:49:11 +0000
@@ -47,6 +47,7 @@
4747
48 std::vector<std::string> get_declared_scopes(IdType) const;48 std::vector<std::string> get_declared_scopes(IdType) const;
49 std::vector<std::string> get_declared_keywords() const;49 std::vector<std::string> get_declared_keywords() const;
50 std::string scope_id;
5051
51};52};
52#endif53#endif
5354
=== modified file 'src/query.cpp'
--- src/query.cpp 2015-08-04 19:12:04 +0000
+++ src/query.cpp 2015-08-18 18:49:11 +0000
@@ -43,8 +43,6 @@
43#include <QDebug>43#include <QDebug>
44#include <QDateTime>44#include <QDateTime>
4545
46QString CALL_ICON;
47
48namespace us = unity::scopes;46namespace us = unity::scopes;
49using namespace std;47using namespace std;
5048
@@ -62,15 +60,7 @@
62 agg_scope_(agg_scope)60 agg_scope_(agg_scope)
63{61{
64 setlocale(LC_ALL, "");62 setlocale(LC_ALL, "");
65 CALL_ICON = QString("%1/images/placed.png").arg(QString::fromStdString(scope_dir));63 scope_id = agg_scope_->scope_id;
66
67 //there does not seem to be a method to get *this* scope id
68 //so I resort to hack of disassembling the scope path
69 QStringList tokens = QString::fromStdString(scope_dir_).split("/");
70 QString id = tokens[3];
71 QString app = tokens[5];
72 scope_id = (QString("%1_%2").arg(id,app)).toStdString();
73
74}64}
7565
76Query::~Query()66Query::~Query()
7767
=== modified file 'src/scope.cpp'
--- src/scope.cpp 2015-08-04 19:12:04 +0000
+++ src/scope.cpp 2015-08-18 18:49:11 +0000
@@ -41,6 +41,8 @@
4141
42void AggScope::start(std::string const& scope_name)42void AggScope::start(std::string const& scope_name)
43{43{
44 qDebug() <<"==== AggScope scope_name" << qstr(scope_name);
45 scope_id = scope_name;
44}46}
4547
46void AggScope::stop()48void AggScope::stop()

Subscribers

People subscribed via source and target branches