mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-07 16:45:11 -04:00
optim: changed postfixed ++ into prefix++ for non trivial operators, replaced test on std::list::size() by std::list::empty() (Patch from Phenom, modified)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7627 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
491a655889
commit
b593a918a0
99 changed files with 571 additions and 571 deletions
|
@ -61,7 +61,7 @@ QString RSStyle::getStyleSheet() const
|
|||
|
||||
if (sheet.isEmpty() == false) {
|
||||
/* Replace colors */
|
||||
for (int i = 0; i < colors.size(); i++) {
|
||||
for (int i = 0; i < colors.size(); ++i) {
|
||||
sheet.replace(QString("<color%1>").arg(i + 1), colors[i].name());
|
||||
}
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ void RSStyle::readSetting (QSettings &settings)
|
|||
colors.empty();
|
||||
|
||||
int size = settings.beginReadArray("colors");
|
||||
for (int i = 0; i < size; i++) {
|
||||
for (int i = 0; i < size; ++i) {
|
||||
settings.setArrayIndex(i);
|
||||
colors.append(QColor(settings.value("value").toString()));
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ void RSStyle::writeSetting (QSettings &settings)
|
|||
|
||||
settings.beginWriteArray("colors");
|
||||
int size = colors.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
for (int i = 0; i < size; ++i) {
|
||||
settings.setArrayIndex(i);
|
||||
settings.setValue("value", colors[i].name());
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ StyleDialog::StyleDialog(RSStyle &style, QWidget *parent)
|
|||
showButtons();
|
||||
|
||||
/* Init colors */
|
||||
for (int i = 0; i < pushButtons.size(); i++) {
|
||||
for (int i = 0; i < pushButtons.size(); ++i) {
|
||||
if (i < style.colors.size()) {
|
||||
colors[pushButtons[i]] = style.colors[i];
|
||||
} else {
|
||||
|
@ -99,7 +99,7 @@ void StyleDialog::getStyle(RSStyle &style)
|
|||
style.colors.clear();
|
||||
|
||||
int count = qMin(neededColors(), pushButtons.size());
|
||||
for (int i = 0; i < count; i++) {
|
||||
for (int i = 0; i < count; ++i) {
|
||||
style.colors.append(colors[pushButtons[i]]);
|
||||
}
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ void StyleDialog::getStyle(RSStyle &style)
|
|||
void StyleDialog::showButtons()
|
||||
{
|
||||
int count = neededColors();
|
||||
for (int i = 0; i < pushButtons.size(); i++) {
|
||||
for (int i = 0; i < pushButtons.size(); ++i) {
|
||||
pushButtons[i]->setVisible(i < count);
|
||||
labels[i]->setVisible(i < count);
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ void StyleDialog::drawButtons()
|
|||
QPixmap pxm(16,14);
|
||||
|
||||
QMap<QPushButton*, QColor>::iterator it;
|
||||
for (it = colors.begin(); it != colors.end(); it++) {
|
||||
for (it = colors.begin(); it != colors.end(); ++it) {
|
||||
pxm.fill(it.value());
|
||||
it.key()->setIcon(pxm);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue