Hello all,

I decided to take up the task of going through all the .startGroup / .endGroup 
matching stuff for QSettings.

Observation:
============
I've noticed a lot of member variables being used fro QSettings.  We are 
actually just creating these on the stack when needed.  Unfortunately, 
QSettings are still being passed as arguments in the function call--which I 
know we've talked about.

Questions:
==========
First are we leaving this as is for now?  If so, I guess cleaning this up will 
need to be a task for later.

Example snippet from a file I'm currently editing:
--------------------------------------------------
/qt4/configuration/MIDIConfigurationPage.cpp:
***** Begin ****************
MIDIConfigurationPage::MIDIConfigurationPage(
    RosegardenGUIDoc *doc,
    QSettings cfg,
    QWidget *parent,
    const char *name):
        TabbedConfigurationPage(cfg, parent, name),
        m_midiPitchOctave(0)
{
    // set the document in the super class
    m_doc = doc;

    // ---------------- General tab ------------------
    //
    QFrame *frame = new QFrame(m_tabWidget);
    QGridLayout *layout = new QGridLayout(frame, 9, 4, 10, 5);

    int row = 0;

    layout->setRowSpacing(row, 15);
    ++row;

    QLabel *label = 0;

    QSettings m_cfg;
****** End *****************

Note, at the top of snippet, we are passing QSettings--which I mentioned--and 
are storing it as cfg.

At bottom of snippet, we are creating m_cfg, on the stack.  m_cfg is not a 
member function--not listed in .h file.  So, it should not be m_cfg, since the 
'm_' indicates a member function.

The logical thing it should be is 'cfg'--but that conflicts with the argument 
cfg.

I've noticed a liberal use of of config used such as "confq4."

I'd like to be consistent, and since I've decided to take up the .endGroup 
matching task, it is a great time to unify this stuff.

I'm happy to use 'cfg', 'config', 'confq4', etc., I just want to know what we 
want before I get too far into this.

Misc. Notes:
============
I also see multiple redeclarations of QSettings within a function and lots of 
.startGroup with the same group as the previous group--so I am just leaving a 
/### note indicating the .startGroup that was called for reference in case I 
mess up the process.

Sincerely,
Julie S.

PS--Wow! We are making great progress.



      

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to