MantisBT - Doomseeker |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0003796 | Doomseeker | [All Projects] Cleanup | public | 2020-06-05 07:40 | 2022-03-22 11:11 |
|
Reporter | WubTheCaptain | |
Assigned To | WubTheCaptain | |
Priority | none | Severity | minor | Reproducibility | N/A |
Status | closed | Resolution | no change required | |
Platform | | OS | | OS Version | |
Product Version | 1.3.1 | |
Target Version | 1.3.3 | Fixed in Version | 1.3.3 | |
|
Summary | 0003796: qt-json dependency is duplicated to different files (2nd report) |
Description | Quote from WubTheCaptain qt-json (aka Eeli Reilin's JSON library) has code duplication in the Doomseeker source distribution: Once for Doomseeker, and another time for Wadseeker.
I hit this issue again while submitting patches for issue 0003794. The former issue 0003310 is closed, so I'm reporting this again for more discussion due to changes in circumstances. (E.g.: We've also changed from Mercurial to Git, and can use Git submodules like proposed in 0003795. I've also pointed a trivial reason to change those json.{cpp,h} files since that former report.) |
Steps To Reproduce | Quote from WubTheCaptain
$ diff -s src/core/json.cpp src/wadseeker/protocols/json.cpp
Files src/core/json.cpp and src/wadseeker/protocols/json.cpp are identical
$ diff -s src/core/json.h src/wadseeker/protocols/json.h
Files src/core/json.h and src/wadseeker/protocols/json.h are identical |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | 0003310 | closed | | qt-json dependency is duplicated to different files, deduplicate it | related to | 0003821 | closed | Blzut3 | Replacing Eili Reilin's JSON library (qt-json) with JSON support in Qt |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2020-06-05 07:40 | WubTheCaptain | New Issue | |
2020-06-05 07:41 | WubTheCaptain | Description Updated | bug_revision_view_page.php?rev_id=13098#r13098 |
2020-06-05 07:41 | WubTheCaptain | Relationship added | related to 0003310 |
2020-06-05 08:04 | WubTheCaptain | Note Added: 0021355 | |
2020-06-08 04:23 | Blzut3 | Relationship added | related to 0003821 |
2020-06-08 04:24 | Blzut3 | Note Added: 0021422 | |
2020-06-08 04:24 | Blzut3 | Assigned To | => Blzut3 |
2020-06-08 04:24 | Blzut3 | Status | new => acknowledged |
2020-06-08 04:24 | Blzut3 | Assigned To | Blzut3 => |
2020-06-08 05:34 | WubTheCaptain | Note Added: 0021423 | |
2020-06-08 05:34 | WubTheCaptain | Status | acknowledged => resolved |
2020-06-08 05:34 | WubTheCaptain | Resolution | open => no change required |
2020-06-08 05:34 | WubTheCaptain | Assigned To | => WubTheCaptain |
2021-08-07 16:52 | Blzut3 | Status | resolved => closed |
2021-08-16 18:42 | WubTheCaptain | Note Added: 0021730 | |
2021-08-16 18:42 | WubTheCaptain | Status | closed => resolved |
2021-08-16 18:42 | WubTheCaptain | Resolution | no change required => fixed |
2021-08-16 18:42 | WubTheCaptain | Fixed in Version | => 1.3.3 |
2021-08-16 18:42 | WubTheCaptain | Target Version | => 1.3.3 |
2021-08-16 18:45 | WubTheCaptain | Resolution | fixed => no change required |
2022-03-22 11:11 | WubTheCaptain | Status | resolved => closed |
Notes |
|
|
0003794:0021354:
Quote from WubTheCaptain
$ diff -u src/core/json.cpp src/wadseeker/protocols/json.cpp # master branch
--- src/core/json.cpp 2020-06-05 07:48:38.577780264 +0000
+++ src/wadseeker/protocols/json.cpp 2020-06-05 07:48:38.577780264 +0000
@@ -468,11 +468,11 @@
index = lastIndex + 1;
if (numberStr.contains('.')) {
- return QVariant(numberStr.toDouble(NULL));
+ return QVariant(numberStr.toDouble(nullptr));
} else if (numberStr.startsWith('-')) {
- return QVariant(numberStr.toLongLong(NULL));
+ return QVariant(numberStr.toLongLong(nullptr));
} else {
- return QVariant(numberStr.toULongLong(NULL));
+ return QVariant(numberStr.toULongLong(nullptr));
}
}
Though I agree with preferring nullptr over NULL (with little C++ knowledge), my patch in 0003794 would revert this back to NULL to match upstream.
But more importantly, to make my point here, even we haven't been consistent with these duplicated files in our source tree. This wasn't noticed or brought up in 0003310. |
|
|
(0021422)
|
Blzut3
|
2020-06-08 04:24
|
|
Technically would be done as a result of migrating to Qt 5's JSON support, but I guess this ticket can be resolved when that happens. |
|
|
|
I'll resolve this now. OP assumes it would be resolved so that qt-json becomes available from one place, but 0003821 is the apparent solution here.
And 0003821 fixes this issue too, so technically this is not "won't fix" but "no change required". |
|
|
|
|