1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-22 22:13:35 +02:00
Commit Graph

118 Commits

Author SHA1 Message Date
Joakim Thorén
75ad171285 Remove redundant 'selectedFilePath'. This information is stored in the currently selected widget anyway. 2024-11-24 16:58:43 +01:00
Joakim Thorén
bdaaa0b584 RecentFileDialog widgets are pointers 2024-11-24 16:57:44 +01:00
Joakim Thorén
5747781dda Store "selectedFilePath" internally in RecentFileDialog instead of connecting to dialog internals from outside RecentFileDialog 2024-11-24 16:35:38 +01:00
Joakim Thorén
9b0e6763e7 Oops, accedentially undid reordering of parent argument. 2024-11-24 16:30:44 +01:00
Joakim Thorén
d1e40411dd Connect "actionOpenRecentMore" directly to "on_actionOpenRecent_triggered" 2024-11-24 16:29:34 +01:00
Joakim Thorén
02a656d16f Fix compilation error 2024-11-24 15:24:19 +01:00
Joakim Thorén
2678bf1e05 RecentFileDialog is class instead of struct 2024-11-24 15:23:30 +01:00
Joakim Thorén
e3b520a1f1 Header inclusion style consistency 2024-11-24 15:22:19 +01:00
Joakim Thorén
3304e55346
Rename "filename" to "filePath". Previous name was misleading at best.
Co-authored-by: Andrey Filipenkov <kambaladecapitator@gmail.com>
2024-11-24 15:16:17 +01:00
Joakim Thorén
1b9b925ab9
Localized string for "Recently Opened Files"'
Co-authored-by: Andrey Filipenkov <kambaladecapitator@gmail.com>
2024-11-24 15:15:38 +01:00
Joakim Thorén
5bff1ec2c1
Update mapeditor/mainwindow.cpp
Co-authored-by: Andrey Filipenkov <kambaladecapitator@gmail.com>
2024-11-24 15:14:21 +01:00
Joakim Thorén
2ed83e53b7 Prompt about unsaved changes when trying to load a map instead of prompting when opening the dialogue. 2024-11-18 23:09:08 +01:00
Joakim Thorén
5e898b9aa8 Fix bug where onSelect was triggered twice on double click in Recently Opened Files 2024-11-18 23:07:16 +01:00
Joakim Thorén
7d53150bdb Open Recent is a submenu with recently opened files and a "More..."-action. 2024-11-18 22:55:46 +01:00
Joakim Thorén
b892221b9f Replace "actionOpenRecent" with "menuOpenRecent". Add "actionOpenRecentMore" as an element in the "menuOpenRecent"-submenu. 2024-11-18 22:05:03 +01:00
Joakim Thorén
e9e129263a Add 'Open Recent' to mapeditor 2024-11-18 21:07:17 +01:00
Ivan Savenko
08fbcd5239 TerrainTile now uses identifiers instead of pointers to VLC 2024-10-30 16:22:11 +00:00
godric3
7e66bd4a90 Don't use separate versioning for map editor 2024-10-26 13:48:12 +02:00
godric3
786be6f253 map-editor: add hero placeholder with heroType defined to reservedCampaignHeroes on map save 2024-08-22 16:53:43 +02:00
Alexander Wilms
187b7b0517 Show debug message instead of warning if no .qm file for selected language exists 2024-07-18 20:44:24 +02:00
Alexander Wilms
6599db4461 Less noise when switching languages in launcher
* Check if .qm file exists
* Don't call installTranslator() for English

Fixes #4277
2024-07-18 20:44:24 +02:00
gigas002
2f19133638 Icons renaming refactoring 2024-06-06 02:04:36 +00:00
gigas002
958a2ef835 Fix missing translations 2024-06-05 21:46:42 +09:00
gigas002
de3dc929ac Add missing icons to mapeditor 2024-06-05 08:56:35 +00:00
gigas002
d8c4d3654f Embed translations and icons for mapeditor 2024-06-05 04:52:17 +00:00
Ivan Savenko
7461df161c lib now uses shared_ptr for entities. Removed manual memory management. 2024-05-17 15:04:05 +00:00
Laserlicht
284cc3460d mapeditor: add extension and open vcmi folder 2024-05-16 00:01:02 +02:00
Ivan Savenko
3e23a55c66 Fix build 2024-04-23 17:15:59 +03:00
Ivan Savenko
54796c7c56 Rename toJson to toString/toCompactString for consistency 2024-02-26 12:55:49 +02:00
Ivan Savenko
a15366f5a5 Make IObjectInterface::cb non-static 2024-01-19 13:55:21 +02:00
Ivan Savenko
bd5682ecc3 Merge remote-tracking branch 'vcmi/master' into develop 2024-01-19 13:49:54 +02:00
Alexander Wilms
1b85abb508 Use auto instead of redundant type in initializations using new
grep -r --include \*.h --include \*.cpp "=" * | grep -v "auto\|int\|char\|bool\|float|\double\|for\|if\|googletest\|fuzzylite\|size_t\|using\|return\|{\|}\|= \"\|= tr(\|virtual\|void" | grep -Po ".*[^ ]+ [^ ]+ [^ ]*[ ]*=.*;" | grep -v "float\|nullptr" | grep "new" | grep -v "AI/FuzzyLite" | grep \( | grep "= new" > redundant_types.txt

import re

with open("redundant_types.txt") as f:
    for line in f:
        line = line.strip()
        path = line.split(":", 1)[0]
        original_code = line.split(":")[1].strip()
        if "new " in original_code:

            cpp_type = original_code.split(" ")[0]
            if original_code.count(cpp_type) == 2:
                print()
                print(path)
                print(original_code)
                new_code = "auto "+" ".join(original_code.split(" ")[1:])
                print(new_code)

                with open(path, "r") as f:
                    filedata = f.read()

                filedata = filedata.replace(original_code, new_code)

                with open(path, "w") as f:
                    f.write(filedata)
2024-01-16 21:40:53 +00:00
Alexander Wilms
781328f282 Convert C-style casts to the more verbose C++ style 2024-01-10 00:30:35 +00:00
Alexander Wilms
f3277b7953 Define each identifier in a dedicated statement 2024-01-10 00:22:23 +00:00
Ivan Savenko
ef5686634d Removed no longer used code 2024-01-04 23:48:58 +02:00
Andrii Danylchenko
b579ca8a33 #1912 trap, exception on adding duplicating hero 2023-10-29 11:03:37 +02:00
nordsoft
b9a660f6c3 Redesign map editor rendering 2023-10-20 01:25:06 +02:00
Nordsoft91
d03b75696a
Merge pull request #3067 from Nordsoft91/editor-improvements-1.4
Add hero placeholder properties
2023-10-19 22:23:58 +02:00
Johannes Schauer Marin Rodrigues
f9e1b302c7
some spelling fixes 2023-10-18 01:41:02 +02:00
nordsoft
f6d7755c6a Add hero placeholder properties 2023-10-16 22:24:12 +02:00
nordsoft
4ab203eaae Add more object search flexibility 2023-10-14 03:16:17 +02:00
nordsoft
788147a897 Add line and fill brushes 2023-10-14 02:58:13 +02:00
nordsoft
d85c5189ba Add object lock and zoom functinoality 2023-10-13 11:07:17 +02:00
nordsoft
006def7690 ui improvements 2023-10-13 11:07:17 +02:00
nordsoft
e2b8c2e9f8 PickObject delegate for random dwellings 2023-10-09 01:24:00 +02:00
nordsoft
cfa1a6d880 Show coordinates on map 2023-10-08 20:25:59 +02:00
nordsoft
9c5725da66 Convertion finished 2023-10-01 13:32:35 +02:00
nordsoft
4e5580f3d9 Fix typo 2023-10-01 02:39:03 +02:00
nordsoft
3018178956 Remember folder for images as well 2023-09-30 03:44:13 +02:00
nordsoft
53dadc6dc3 Add map converter 2023-09-30 03:42:29 +02:00