Open romgen opened 11 years ago
Yes, it is supposed that main program provides these QSettings. You should create and fill QSettings variable by yourself. It is made that way because if the main program uses QSettings class for other activities, the usage of QSettings in main program and in Fervor library might not coincide (for example, one stores settings in ini-file, another one in registry on Windows - this isn't easy to understand and to maintain).
Is there any documentation what settings are required to be filled into QSettings?
Ok, after browsing through the code i ofund something like "FV_NEW_VERSION_POLICY_KEY" which determines on how to handle updates.
But I wonder why the UI is disabled for QT5 in the .pri file? I enabled the UI manually in the .pri file and it works nicely. Why would you hide a feature like that?
I used QT4 and forgot to enable UI for QT5 too. My apologies :( Perhaps you could make a pull request with the fix? I'm only beginning to move to QT5 for my projects.
Pull requests are way too complicated.
Here's a patch for 3 things: http://www.pasteall.org/45539/diff
As far as I can see, you've removed the conditional setting of variable (the line "fervor_gui {"). That way UI would be always enabled. I believe the user of Fervor library should have an option to disable GUI if it is used in console program, for example. In addition, the program should not depend on QtGui.dll or Qt5Gui.dll in that case.
Feel free to add this ufnctionality again.
I didn't know how to enable this, so i just removed the braces ;-)
OK, I'll use your patch as a base. I'm moving to Qt5 my projects now, so eventually I'll update Fervor with new patch. Thanks! :-)
Done, you can now test the conditional GUI enabling and disabling by adding or removing "CONFIG += fervor_gui"
to your project file and recompile. You can use my fork of Fervor while my pull request is not integrated into main repository.
Line 31 in fvupdater.cpp: I get a compile error: "unresolved external" - "extern QSettings* settings;".
This is no wonder. I couldn't find any place in the code where "settings" is actually defined.
Using Qt 5.1, VC 2012 x64.
Loosely translated compile message: fvupdater.obj : error LNK2019: Link to unresolved external Symbol ""class QSettings * settings" (?settings@@3PEAVQSettings@@EA)" in function ""private: void __cdecl FvUpdater::decideWhatToDoWithCurrentUpdateProposal(void)" (?decideWhatToDoWithCurrentUpdateProposal@FvUpdater@@AEAAXXZ)".