Commit graph

45 commits

Author SHA1 Message Date
bruvzg
80b8eff6aa
[Complex Test Layouts] Change String to use UTF-32 encoding on all platforms. 2020-09-03 19:56:24 +03:00
Stijn Hinlopen
526e060b73 Resize dialogs (FileDialog, EditorFileDialog, Reparent, SceneTreeDialog and resource depency dialogs). 2020-07-14 14:35:22 +02:00
Stijn Hinlopen
a86521d0bd Search result highlights follow font size 2020-06-17 00:53:23 +02:00
Rémi Verschelde
0ee0fa42e6 Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14 21:57:34 +02:00
Rémi Verschelde
0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.

This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.

There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).

Part of #33027.
2020-05-14 16:54:55 +02:00
lupoDharkael
95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
Juan Linietsky
441f1a5fe9 Popups are now windows also (broken!) 2020-03-26 15:49:42 +01:00
Juan Linietsky
4758057f20 Working multiple window support, including editor 2020-03-26 15:49:40 +01:00
Rémi Verschelde
f742dabafe Signals: Manually port most of remaining connect_compat uses
It's tedious work...

Some can't be ported as they depend on private or protected methods
of different classes, which is not supported by callable_mp (even if
it's a class inherited by the current one).
2020-02-28 14:24:09 +01:00
Rémi Verschelde
01afc442c7 Signals: Port connect calls to use callable_mp
Remove now unnecessary bindings of signal callbacks in the public API.
There might be some false positives that need rebinding if they were
meant to be public.

No regular expressions were harmed in the making of this commit.
(Nah, just kidding.)
2020-02-28 14:24:09 +01:00
Rémi Verschelde
eced623c57 Fix build after merge of #36077 2020-02-27 20:51:43 +01:00
Rémi Verschelde
7530824cc4
Merge pull request #36077 from pycbouh/repeat-search-in-files
Add a button to quickly repeat last search in files
2020-02-27 20:19:55 +01:00
Juan Linietsky
69c95f4b4c Reworked signal connection system, added support for Callable and Signal objects and made them default. 2020-02-20 08:24:50 +01:00
Juan Linietsky
3205a92ad8 PoolVector is gone, replaced by Vector
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are
sugar for `Vector<Type>`.
2020-02-18 10:10:36 +01:00
Dominik 'dreamsComeTrue' Jasiński
4c80beab44 Added 'Replace in files' functionality to text editors
Fixes issue #31146
2020-02-13 23:45:05 +01:00
Yuri Sizov
8c80b602ac Add a button to quickly repeat last search in files 2020-02-10 18:41:23 +03:00
Pedro J. Estébanez
aeff876868 Ignore hidden files and directories in find in files 2020-02-10 09:32:15 +01:00
Haoyu Qiu
3042b4f4cb Fixes leak in Find in Files utility 2020-01-21 08:47:59 +08:00
Rémi Verschelde
a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
Rafał Mikrut
ed1c4bc77d Removed unused variables, add some constants numbers 2019-12-10 05:13:02 +01:00
qarmin
17732fe698 Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
Klesomik
d3c879fe1b Memory leak fixed
In some functions in editor/find_in_files.cpp was detected a memory leak
DirAccess* and FileAccess* were replaced by DirAccessRef and FileAccessRef
DirAccessRef and FileAccessRef are just wrappers for DirAccess* and FileAccess*

Fixes for issue #31659
2019-08-26 20:48:10 +03:00
Fabian Stiewitz
f330add2b8 fix(find_in_files): crash when selecting with RMB
in replace mode, if no search result has been selected and RMB is pressed on a checkbox, the editor
crashes in editor/find_in_files.cpp:712 because item is NULL
2019-08-12 11:05:06 +02:00
Michael Alexsander Silva Dias
699afca7ef Fix error when going to a text file by clicking in a result from "Find in files" 2019-08-07 23:06:33 -03:00
Rémi Verschelde
62c9af4072
Merge pull request #25647 from QbieShay/fix_25440
Added a setting for files in which the editor should search (project specific)
2019-05-29 16:58:28 +02:00
Hugo Locurcio
a411067829
Allow empty replacement texts in the Find in Files replace dialog
This closes #29026.
2019-05-20 14:43:42 +02:00
marxin
8d51618949 Add -Wshadow=local to warnings and fix reported issues.
Fixes #25316.
2019-02-20 19:44:12 +01:00
Rémi Verschelde
5fc86026ca Fix typos with codespell
Using codespell 1.14.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
doubleclick
lod
nd
numer
que
te
unselect
EOF
$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2019-02-13 09:23:29 +01:00
QbieShay
c4eb974a8a Added a setting for files in which the editor should search (project wise).
Remembers the tickboxes but only during the same execution

Fixes #25440
2019-02-12 21:24:07 +01:00
Rémi Verschelde
b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Michael Alexsander Silva Dias
f6d137d3d0 Added "shader" filter to "Find in Files" 2018-11-05 12:13:08 -02:00
Michael Alexsander Silva Dias
e030317b6c General fixup of the "Find in Files" dialog 2018-11-05 04:51:34 -02:00
Hugo Locurcio
f7848f234f
Improve the editor's Find in Files function
- Disable Whole Words and Match Case by default
- Hide the Cancel button once the search is completed
- Pad line numbers to the right for more readable search results
2018-10-09 00:00:51 +02:00
Hugo Locurcio
7063878243
Fix Find in Files font size on hiDPI displays
This closes #22692.
2018-10-05 21:37:26 +02:00
Rémi Verschelde
0349d6db23
Merge pull request #22220 from Naryosha/dialog
Fix find-in-files and go-to-line dialog (partially)
2018-10-02 09:41:21 +02:00
Hugo Locurcio
c4770a5b5d
Tweak some editor texts' capitalization, use "Go to" instead of "Goto"
This also fixes a typo in the `debugger/debug_with_external_editor`
shortcut.
2018-09-25 22:51:13 +02:00
Poommetee Ketson
e74876028e Fix find-in-files and go-to-line dialog (partially) 2018-09-18 22:07:13 +07:00
luz.paz
08bde5b2de Misc. typos
Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
2018-09-12 21:39:17 -04:00
Rémi Verschelde
52466d57e9 Make some debug prints verbose-only, remove others 2018-08-24 14:59:01 +02:00
Marc Gilleron
09c55f43cf Find in Files improvements
- Search results are now grouped by file using a Tree control
- You can opt out occurences when using replace mode
- Double-check search results in case files have been tampered with, so occurrences don't get badly replaced
- Fixed replace bug when an occurrence is found twice in one line
2018-08-19 19:24:39 +01:00
Hein-Pieter van Braam
0e29f7974b Reduce unnecessary COW on Vector by make writing explicit
This commit makes operator[] on Vector const and adds a write proxy to it.  From
now on writes to Vectors need to happen through the .write proxy. So for
instance:

Vector<int> vec;
vec.push_back(10);
std::cout << vec[0] << std::endl;
vec.write[0] = 20;

Failing to use the .write proxy will cause a compilation error.

In addition COWable datatypes can now embed a CowData pointer to their data.
This means that String, CharString, and VMap no longer use or derive from
Vector.

_ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug
builds. This is a lot faster for Vector in the editor and while running tests.
The reason why this difference used to exist is because force-inlined methods
used to give a bad debugging experience. After extensive testing with modern
compilers this is no longer the case.
2018-07-26 00:54:16 +02:00
Marc Gilleron
6f6ee60e19 Fix potential bugs with Find in Files
- Iteration still going on after scan finished
- Comparing milliseconds with seconds
- Potential imprecision due to accumulating milliseconds (iteration could take fewer than 1ms)
- Folders to scan not cleared when a new search starts
2018-05-24 01:09:11 +02:00
Ibrahn Sahir
8afb00a8ec fixup project_manager and find_in_files for text_changed signal change.
Background:
Commit 2abec59db9 removing text_changed
signal emmision from LineEdit::set_text broke the project manager and
find_in_files.
2018-05-20 16:45:22 +01:00
Marc Gilleron
4c415001b2 Fix Find in Files:
- FileAccess was accessed null (remains of GDScript port)
- `_current_file` wasn't going up correctly in case a scanned directory had no subdirectories
- Paths stored in `_files_to_scan` were not full paths
2018-05-01 22:07:16 +02:00
Marc Gilleron
f637ad84e3 Added find & replace in files 2018-02-19 22:38:58 +01:00