Code TODO List #3419
Replies: 10 comments 9 replies
-
Cool! Really, really good approach. 😄 |
Beta Was this translation helpful? Give feedback.
-
Why not use SPDX notation for licenses in each source and header file? |
Beta Was this translation helpful? Give feedback.
-
Appending work item Expand Command Line Abilities to list |
Beta Was this translation helpful? Give feedback.
-
Appending work item Verify Switch Statements with Case Structure Returns |
Beta Was this translation helpful? Give feedback.
-
Appending work item Remove |
Beta Was this translation helpful? Give feedback.
-
Appending work item Update Dependent Libraries and Document Update Methodology |
Beta Was this translation helpful? Give feedback.
-
@scottfurry Do you mind if I put some of own to-dos in here, and track them? |
Beta Was this translation helpful? Give feedback.
-
Appending work item Update Preferences Dialog - Correct Poor Font Size Display |
Beta Was this translation helpful? Give feedback.
-
Appending work item Update CMake Usage - Deprecation - Minimum Version |
Beta Was this translation helpful? Give feedback.
-
Re-opening this issue, as it's still actively used. 😄 |
Beta Was this translation helpful? Give feedback.
-
Background
Walking through code progressing settings handling update, I'm struck by a spat of changes that could be made to clean things up. However, these changes would not be apart of updating settings. I won't try to slip changes into the mix that have nothing to do with the problem at hand. However, I also do not want to lose visibility of these changes.
When in doubt...make a TODO list
If you feel inclined, you're welcome to grab an item and make it go away with a pull request. Please let me know here once completed in case I miss the conversation thread elsewhere.
Items
Renaming Menu Items Removing Ampersands
Ref:
MainWindow.cpp:504
Is this still a thing in Qt 5.15 | Qt.6.X? Multiplatform checking necessary.
Consistent UI Item Naming Practice
Ref:
MainWindow.cpp: 2354, 2356
We have
dbToolBar
as a ui element name followed by a similar item namedtoolbarSql
. Go through the source code and ensure ui elements have a coherent and non-clashing naming scheme that is consistently applied throughout.Consistent Pointer|Reference Usage
Ref: Multiple Files
Ensure code is following a clear and consistent pattern when using references and pointers. This is pretty much the code version of nails-on-chalkboard for me. I see both variations of...
<type>[*|&][space][variable]
and
<type>[space][*|&][variable]
Pick ONE and ensure that it is enforced throughout all header and source files.
sidebar
I tried to pull in astyle a couple years back. It was preferable than clang-tidy as not all users/platforms could easily incorporate llvm. Pointer|Reference type usage is one aspect of many that
astyle
could address. There are other code formatters that could be employed. When set up they work beautifully. Getting there is the challenge.License Headers
Ref: Multiple Files
I was surprised to edit code to find that multiple source files are missing a licensing attribute at the top. Yup, it is repetitive, noisy legalese. A necessary evil in our modern, digital age. Ensure others know to respect distribution requirements.
See this about how to use the GPL or this for common GPL questions.
Expand Command Line Abilities
Ref #3422
Command Line flags of DB4S should be expanded to include select flags of
sqlcipher
command line. Specifically, thesqlcipher
flaginit
should be incorporated to allow decryption of a database from command line.Work may involve incorporating a better software library to better help manage and maintain command line flags.
Verify Switch Statements with Case Structure Returns
Ref:
DbStructureModel.cpp:36
and othersFunction
QVariant DbStructureModel::data(const QModelIndex& index, int role) const
returns a QVariant from within a case statement in a switch structure. However, there are NObreak
statements prior to return.Also, there was a recent discussion of an issue (Issue # TBD) where the fix was to rework the return from the switch structure. Unfortunately, the resolution caused another compiler warning about the switch structure and function return.
Verify these types of switch structures in the source code in order to silence any/all compiler/static analysis warnings.
There is also an issue in switch structure formatting. The structures are inconsistently formatted. This has a similar solution as work item Renaming Menu Items Removing Ampersands above. Automated Code Formatting tools would correct this problem easily but would require identification/setup of a format to be applied.
Remove
sourceforge
domain in project filesRef: comment to #3341
Reference identified usage of
sourceforge
domain for storage of settings. Matter is specific to MacOS where a plist file explicitly uses URL pointing to DB4S project onsourceforge
. Item was thought to be originally addressable via work under #3317. Search of sources found numerous references to reverse URL. Removal ofsourceforge
domain requires more involved effort that needs to addressed independently.Update Dependent Libraries and Document Update Methodology
Ref:
[project root]/libs/
directoryCurrent project dependencies, QScintilla et al, are lagging behind. People are busy. Others are not able to pick up the slack because of a lack of knowledge or ability. Personally, I tripped over a possible updating methodology for QScintilla as part of #3410.
QScintilla
Internal version 2.11.1 from 2019.
Latest upstream is 2.14.1.
QHexEdit
Internal version 0.8.6 from 2019.
Latest upstream is 0.8.9 from 2020.
NOTE: we should have a mitigation strategy if this dependency is not being actively maintained.
QCustomPlot
Internal version 2.1.0 from March 2021.
Latest upstream is version 2.1.1 from November, 2022.
nlohmann/json
Internal version 3.10.4 from October, 2021.
Latest upstream is version 3.11.2 dated August, 2022.
ColinDuquesnoy/QDarkStyleSheet
Internal version is unknown and not documented
Latest upstream is version 3.0.2 dated April, 2021.
The key takeaway on this item is Update and Document how for the next person.
Update Preferences Dialog - Correct Poor Font Size Display
ref: image
Under Qt 5.15.10 on Linux, control sizing/layout needs to be improved to prevent poor presentation of font size. Image above shows example of current experience (2023Aug). Suspect
sizeHint()
code needs tweaking. Problem is persistent and occurs for both Light and Dark Mode presentations.Update CMake Usage - Deprecation - Minimum Version
ref: CMake 3.27 Release Notes - Deprecation
Recent build on MacOS with latest CMake installed resulted in numerous warnings. Issue stems from Kitware implementing a deprecation warning for calling out
cmake_minimum_required
orcmake_policy
with a version LESS THAN 3.5. Multiple projectcmake
files still use a minimum CMake of 2.8.X.more as required
...
Beta Was this translation helpful? Give feedback.
All reactions