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
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2015-08-04 19:12:04 +0000
3+++ CMakeLists.txt 2015-08-18 18:49:11 +0000
4@@ -1,4 +1,4 @@
5-set(VERSION "1.5.24")
6+set(VERSION "1.5.24.1")
7
8 # Supress qDebug() output
9 ADD_DEFINITIONS( -DQT_NO_DEBUG_OUTPUT )
10
11=== modified file 'include/scope.h'
12--- include/scope.h 2015-05-21 19:07:53 +0000
13+++ include/scope.h 2015-08-18 18:49:11 +0000
14@@ -47,6 +47,7 @@
15
16 std::vector<std::string> get_declared_scopes(IdType) const;
17 std::vector<std::string> get_declared_keywords() const;
18+ std::string scope_id;
19
20 };
21 #endif
22
23=== modified file 'src/query.cpp'
24--- src/query.cpp 2015-08-04 19:12:04 +0000
25+++ src/query.cpp 2015-08-18 18:49:11 +0000
26@@ -43,8 +43,6 @@
27 #include <QDebug>
28 #include <QDateTime>
29
30-QString CALL_ICON;
31-
32 namespace us = unity::scopes;
33 using namespace std;
34
35@@ -62,15 +60,7 @@
36 agg_scope_(agg_scope)
37 {
38 setlocale(LC_ALL, "");
39- CALL_ICON = QString("%1/images/placed.png").arg(QString::fromStdString(scope_dir));
40-
41- //there does not seem to be a method to get *this* scope id
42- //so I resort to hack of disassembling the scope path
43- QStringList tokens = QString::fromStdString(scope_dir_).split("/");
44- QString id = tokens[3];
45- QString app = tokens[5];
46- scope_id = (QString("%1_%2").arg(id,app)).toStdString();
47-
48+ scope_id = agg_scope_->scope_id;
49 }
50
51 Query::~Query()
52
53=== modified file 'src/scope.cpp'
54--- src/scope.cpp 2015-08-04 19:12:04 +0000
55+++ src/scope.cpp 2015-08-18 18:49:11 +0000
56@@ -41,6 +41,8 @@
57
58 void AggScope::start(std::string const& scope_name)
59 {
60+ qDebug() <<"==== AggScope scope_name" << qstr(scope_name);
61+ scope_id = scope_name;
62 }
63
64 void AggScope::stop()

Subscribers

People subscribed via source and target branches