summaryrefslogtreecommitdiff
path: root/editor/find_in_files.h
diff options
context:
space:
mode:
Diffstat (limited to 'editor/find_in_files.h')
-rw-r--r--editor/find_in_files.h27
1 files changed, 12 insertions, 15 deletions
diff --git a/editor/find_in_files.h b/editor/find_in_files.h
index 41adb156b6..b9d60a8d4f 100644
--- a/editor/find_in_files.h
+++ b/editor/find_in_files.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -31,7 +31,7 @@
#ifndef FIND_IN_FILES_H
#define FIND_IN_FILES_H
-#include "core/hash_map.h"
+#include "core/templates/hash_map.h"
#include "scene/gui/dialogs.h"
// Performs the actual search
@@ -42,8 +42,6 @@ public:
static const char *SIGNAL_RESULT_FOUND;
static const char *SIGNAL_FINISHED;
- FindInFiles();
-
void set_search_text(String p_pattern);
void set_whole_words(bool p_whole_word);
void set_match_case(bool p_match_case);
@@ -76,15 +74,15 @@ private:
String _pattern;
Set<String> _extension_filter;
String _root_dir;
- bool _whole_words;
- bool _match_case;
+ bool _whole_words = true;
+ bool _match_case = true;
// State
- bool _searching;
+ bool _searching = false;
String _current_dir;
Vector<PackedStringArray> _folders_stack;
Vector<String> _files_to_scan;
- int _initial_files_count;
+ int _initial_files_count = 0;
};
class LineEdit;
@@ -123,7 +121,7 @@ protected:
void _notification(int p_what);
void _visibility_changed();
- void custom_action(const String &p_action);
+ void custom_action(const String &p_action) override;
static void _bind_methods();
private:
@@ -188,11 +186,10 @@ private:
void _on_replace_all_clicked();
struct Result {
- int line_number;
- int begin;
- int end;
- float draw_begin;
- float draw_width;
+ int line_number = 0;
+ int begin = 0;
+ int end = 0;
+ int begin_trimmed = 0;
};
void apply_replaces_in_file(String fpath, const Vector<Result> &locations, String new_text);