Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NIFSKOPE_VERSION and version comparison #61

Closed
hexabits opened this issue Jun 2, 2014 · 0 comments
Closed

NIFSKOPE_VERSION and version comparison #61

hexabits opened this issue Jun 2, 2014 · 0 comments
Assignees
Milestone

Comments

@hexabits
Copy link
Member

hexabits commented Jun 2, 2014

Currently the entire version string is compared with the version stored in the registry each time NifSkope is opened. This is done in NifSkope::migrateSettings() in order to clear stored settings when moving between versions. This was changed from having separate settings per version. (See #11) I have updated the ticket there with more recent developments

Going from 1.2.0a1.dev19 to 1.2.0a1.dev20, for example, will cause the UI to reset. This is annoying for testers. As I elaborated in #11 this is also completely unnecessary as it is only changes in Qt versions that need this reset.

The entire version string being the only thing available for comparison is definitely not ideal. Instead, the version string should be parsed and turned into an object which can be used for comparison, with configurable granularity.

For example:

    // Max of 7 parts:
    // 0 = Major
    // 1 = Minor
    // 2 = Revision
    // 3 = Stage Code (Alpha, Beta, RC, Final)
    // 4 = Stage Version
    // 5 = Dev Code (dev, post)
    // 6 = Dev Version

    auto ver3 = NifSkopeVersion( "1.2.0a1.dev19" );
    ver3.setNumParts( 3 );
    auto ver4 = NifSkopeVersion( "1.2.0a1.dev20" );
    ver4.setNumParts( 7 );
    auto ver5 = NifSkopeVersion( "1.2.0a1.dev20" );
    ver5.setNumParts( 3 );

    qDebug() << (ver3 == ver4);  // True
    qDebug() << (ver4 == ver3);  // False
    qDebug() << (ver5 == ver3);  // True

As you can see, ver5 and ver4 are the same except for their granularity.


It would also be useful for displaying the version in a more human friendly way. A display version would be nice for the window title for example. (It currently says only "NifSkope")

untitled-1

Related

#11 Revert change which did separate registry settings per version
#12 Add a "Restore Defaults" function which clears stored settings

@hexabits hexabits added this to the v1.2.0 milestone Jun 2, 2014
@hexabits hexabits self-assigned this Jun 2, 2014
hexabits referenced this issue in hexabits/nifskope Jun 7, 2014
#61

Class for treating app version strings as comparable objects, to help
with migration code.  Also for formatting the version string with
various levels of detail for display purposes (e.g. application window
title)
hexabits referenced this issue in hexabits/nifskope Jun 7, 2014
#61, #11

QHash was made in order to rename and reorganize all of the QSettings,
and explicitly allow specific settings to import from pre-1.2.  Will be
used in NifSkope::migrateSettings().
hexabits referenced this issue in hexabits/nifskope Jun 7, 2014
#61, #11

A `config.h` file was unnecessary as the default QSettings constructor
takes into account the values set in `setOrganizationName` and
`setApplicationName` in the main() function.

Thus, removed the use of the macro.

Reorganized multiple settings. Renamed, fixed typos, consistent
capitalization.
@hexabits hexabits mentioned this issue Jun 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant