summaryrefslogtreecommitdiff
path: root/gui/apitrace.h
diff options
context:
space:
mode:
authorZack Rusin <zack@kde.org>2011-09-25 14:33:41 -0400
committerZack Rusin <zack@kde.org>2011-09-25 14:34:09 -0400
commitad513b3f5f6e3b1e460d9cf77479715cc05319b4 (patch)
tree9bbb7ea20d991aa31521c243493e665b35f4b704 /gui/apitrace.h
parentbde6db84069fd9dfbc645de02cb22cacff17c298 (diff)
Skip over filtered calls when searching.
Diffstat (limited to 'gui/apitrace.h')
-rw-r--r--gui/apitrace.h38
1 files changed, 30 insertions, 8 deletions
diff --git a/gui/apitrace.h b/gui/apitrace.h
index b73acd6f..d0a6be43 100644
--- a/gui/apitrace.h
+++ b/gui/apitrace.h
@@ -25,6 +25,31 @@ public:
SearchResult_Found,
SearchResult_Wrapped
};
+ struct SearchRequest {
+ enum Direction {
+ Next,
+ Prev
+ };
+ SearchRequest()
+ : direction(Next)
+ {}
+ SearchRequest(Direction dir,
+ ApiTraceFrame *f,
+ ApiTraceCall *call,
+ QString str,
+ Qt::CaseSensitivity caseSens)
+ : direction(dir),
+ frame(f),
+ from(call),
+ text(str),
+ cs(caseSens)
+ {}
+ Direction direction;
+ ApiTraceFrame *frame;
+ ApiTraceCall *from;
+ QString text;
+ Qt::CaseSensitivity cs;
+ };
static bool isCallAFrameMarker(const ApiTraceCall *call,
FrameMarker marker);
@@ -87,7 +112,8 @@ signals:
void changed(ApiTraceCall *call);
void startedSaving();
void saved();
- void findResult(ApiTrace::SearchResult result,
+ void findResult(const ApiTrace::SearchRequest &request,
+ ApiTrace::SearchResult result,
ApiTraceCall *call);
void beginAddingFrames(int oldCount, int numAdded);
@@ -99,12 +125,7 @@ signals:
void foundCallIndex(ApiTraceCall *call);
signals:
- void loaderSearchNext(int startFrame,
- const QString &str,
- Qt::CaseSensitivity sensitivity);
- void loaderSearchPrev(int startFrame,
- const QString &str,
- Qt::CaseSensitivity sensitivity);
+ void loaderSearch(const ApiTrace::SearchRequest &request);
void loaderFindFrameStart(ApiTraceFrame *frame);
void loaderFindFrameEnd(ApiTraceFrame *frame);
void loaderFindCallIndex(int index);
@@ -116,7 +137,8 @@ private slots:
void loaderFrameLoaded(ApiTraceFrame *frame,
const QVector<ApiTraceCall*> &calls,
quint64 binaryDataSize);
- void loaderSearchResult(ApiTrace::SearchResult result,
+ void loaderSearchResult(const ApiTrace::SearchRequest &request,
+ ApiTrace::SearchResult result,
ApiTraceCall *call);
private: