Add main menu recent files
Dirk Hohndel
dirk at hohndel.org
Fri Feb 21 07:29:02 UTC 2014
On Fri, 2014-02-21 at 08:53 +0300, Joseph W Joshua wrote:
> On 02/17/2014 06:33 PM, Lubomir I. Ivanov wrote:
> > hello and thank you for the patch,
> >
> > it has some coding style issues that should be resolved.
> > please refer to the file CodingStyle in the project root:
> Hello,
>
> see the updated patch.
Hi Joseph,
thanks for taking some of my recommendations into account.
The attached patch still shows a 4 space indentation. I don't know which
editor / IDE you use, but you will likely have to change your settings
in order for it to work well with Subsurface - we enforce tab only
indentation with a tab stop set to correspond to 8 characters. We allign
certain continuation lines with tabs + spaces for easier readability.
The algorithm still seems a bit convoluted but is much closer to what I
would like to see. You only ever add 4 files to the "files" QStringList.
So why is there this:
+ while (files.count() > 4) {
+ files.removeLast();
+ }
You also need to decide whether the keys are 0 based or one based:
+ for (int c = 1; c <= 4; c++) {
+ QString key = QString("File_%1").arg(c);
and later
+ for (int c = 0; c < 4; c++) {
+ QString key = QString("File_%1").arg(c + 1);
Thanks
/D
More information about the subsurface
mailing list