nurupo / ProjectTox-Qt-GUI

A cross-platform front end for ProjectTox Core library, written in C++11 with use of Qt5
GNU General Public License v3.0
342 stars 116 forks source link

Add Undo/Redo to InputTextWidget #48

Closed Schlumpf closed 11 years ago

Schlumpf commented 11 years ago

Additional small improvements:

nurupo commented 11 years ago

The placeholder was added to QTextEdit in Qt 5.2, which is planned for November (alpha at the end of September), so this placeholder code probably would be just temporary.

nurupo commented 11 years ago

Also, do icons for undo and redo look so bad that you decided on adding icons only half way through? : )

nurupo commented 11 years ago

Some comments on formatting. Use curly braces for one-liners, don't move the first curly brace on the new line, and put spaces between keyword, condition and the first curly brace. In summery:

if (bool) {
  something;
}

For method definitions, class definitions, etc. the first curly brace goes on the new line.

nurupo commented 11 years ago

and put spaces between keyword, condition and the first curly brace

if<space>(condition)<space>{. Same applies to for, while, etc.

if (condition) {
  statement;
} else {
  statement;
}
nurupo commented 11 years ago

I accidentally deleted commit in which I merged your animation pull request and couldn't restore it, so I decided to merge this pull request, since it contained the things I accidentally deleted.