File tree Expand file tree Collapse file tree 3 files changed +15
-13
lines changed Expand file tree Collapse file tree 3 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,6 @@ ObjectQuery MapFindFeature::makeQuery() const
182182}
183183
184184
185- // slot
186185void MapFindFeature::findNext ()
187186{
188187 auto query = makeQuery ();
@@ -235,7 +234,6 @@ void MapFindFeature::findNextMatchingObject(ObjectQuery& query)
235234}
236235
237236
238- // slot
239237void MapFindFeature::findAll ()
240238{
241239 auto map = controller.getMap ();
@@ -267,14 +265,12 @@ void MapFindFeature::findAllMatchingObjects(ObjectQuery& query)
267265}
268266
269267
270- // slot
271268void MapFindFeature::showHelp () const
272269{
273270 Util::showHelp (controller.getWindow (), " find_objects.html" );
274271}
275272
276273
277- // slot
278274void MapFindFeature::tagSelectorToggled (bool active)
279275{
280276 editor_stack->setCurrentIndex (active ? 1 : 0 );
Original file line number Diff line number Diff line change @@ -54,15 +54,20 @@ class MapFindFeature : public QObject
5454
5555 void setEnabled (bool enabled);
5656
57- QAction* showDialogAction () const { return show_action; }
57+ QAction* showDialogAction () { return show_action; }
5858
59- QAction* findNextAction () const { return find_next_action; }
59+ QAction* findNextAction () { return find_next_action; }
6060
61+ protected:
6162 void findNextMatchingObject (ObjectQuery& query);
6263
6364 void findAllMatchingObjects (ObjectQuery& query);
6465
65- private slots:
66+ private:
67+ void showDialog ();
68+
69+ ObjectQuery makeQuery () const ;
70+
6671 void findNext ();
6772
6873 void findAll ();
@@ -71,11 +76,6 @@ private slots:
7176
7277 void tagSelectorToggled (bool active);
7378
74- private:
75- void showDialog ();
76-
77- ObjectQuery makeQuery () const ;
78-
7979
8080 MapEditorController& controller;
8181 QPointer<QDialog> find_dialog; // child of controller's window
Original file line number Diff line number Diff line change @@ -263,7 +263,13 @@ void ToolsTest::testFindObjects()
263263
264264 TestMapEditor editor (map); // taking ownership
265265 editor.editor ->setTool (nullptr );
266- MapFindFeature find_feature {*editor.editor };
266+
267+ struct TestMapFindFeature : public MapFindFeature {
268+ TestMapFindFeature (MapEditorController &controller) : MapFindFeature(controller) {}
269+ using MapFindFeature::findNextMatchingObject;
270+ using MapFindFeature::findAllMatchingObjects;
271+ } find_feature {*editor.editor };
272+
267273 ObjectQuery symbol_query {QLatin1String (" match" ), ObjectQuery::OperatorIs, QLatin1String (" yes" )};
268274
269275 map->clearObjectSelection (false );
You can’t perform that action at this time.
0 commit comments