\$\begingroup\$It's not a requirement that you provide everything needed to compile the code.\$\endgroup\$
– 200_successMar 31 '16 at 10:34

\$\begingroup\$It would be helpful if you also added the header file for this class. Right now there are references to data members in the code without a way to see their type etc.\$\endgroup\$
– jacwahMar 31 '16 at 11:17

1 Answer
1

I'm sorry for being blunt, but your code is hard to read. The main reason for this is that you consistently use arcane names like test, list, ext and v for data members, which leads to confusion as it's really hard to understand what they represent. Instead, use descriptive names, both for data and functions. Think of an outsider who hasn't written the code themselves, how would you explain each variable and function to them? On top of helping others understand, you will also help yourself a couple of months from now.

Sometimes it's okay to use shorter names for variables, like list in getArchiveList. Because the scope is very limited, it doesn't interfere with readability. The problem with list is that it shadows the data member with the same name, again making the code confusing.

Now let's talk about determineImage. I have no idea what this function does, but it's clear that the name doesn't describe this adequately. In fact, it's probably doing too much as it's quite long. Try splitting it up into smaller functions with names that explain their purpose. In addition, give the local variables better names than lr etc.

On another note: commented out code. I consider leaving commented out lines in your code without explanation a bad practise. Let me quote @nhgrif in this answer:

Source control should help you keep track of code that used to be there, so there's not a real good excuse to leave it there for any historical reason.

Arguably, you might want to leave it in if it's something you're frequently uncommenting for some sort of testing purposes, but if that's the case, perhaps leave a comment above the line, something to the effect of: