summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-03-31 14:57:35 (GMT)
committerTobias Markmann <tm@ayena.de>2016-03-31 14:57:35 (GMT)
commitcfbdb43d2cadd40aa87338d41548e4bf89e146e6 (patch)
tree18d94153a302445196fc0c18586abf44a1ce4a38 /Swift/QtUI/QtVCardWidget/QtResizableLineEdit.cpp
parent1d545a4a7fb877f021508094b88c1f17b30d8b4e (diff)
downloadswift-cfbdb43d2cadd40aa87338d41548e4bf89e146e6.zip
swift-cfbdb43d2cadd40aa87338d41548e4bf89e146e6.tar.bz2
Convert tabs to 4 spaces for all source files
Removed trailing spaces and whitespace on empty lines in the process. Changed CheckTabs.py tool to disallow hard tabs in source files. Test-Information: Manually checked 30 random files that the conversion worked as expected. Change-Id: I874f99d617bd3d2bb55f02d58f22f58f9b094480
Diffstat (limited to 'Swift/QtUI/QtVCardWidget/QtResizableLineEdit.cpp')
-rw-r--r--Swift/QtUI/QtVCardWidget/QtResizableLineEdit.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/Swift/QtUI/QtVCardWidget/QtResizableLineEdit.cpp b/Swift/QtUI/QtVCardWidget/QtResizableLineEdit.cpp
index 3492cb9..9eef970 100644
--- a/Swift/QtUI/QtVCardWidget/QtResizableLineEdit.cpp
+++ b/Swift/QtUI/QtVCardWidget/QtResizableLineEdit.cpp
@@ -16,43 +16,43 @@
namespace Swift {
QtResizableLineEdit::QtResizableLineEdit(QWidget* parent) :
- QLineEdit(parent), editable(false) {
- connect(this, SIGNAL(textChanged(QString)), SLOT(textChanged(QString)));
- setMinimumWidth(30);
+ QLineEdit(parent), editable(false) {
+ connect(this, SIGNAL(textChanged(QString)), SLOT(textChanged(QString)));
+ setMinimumWidth(30);
}
QtResizableLineEdit::~QtResizableLineEdit() {
}
bool QtResizableLineEdit::isEditable() const {
- return editable;
+ return editable;
}
void QtResizableLineEdit::setEditable(const bool editable) {
- this->editable = editable;
- if (editable) {
- setReadOnly(false);
- } else {
- setReadOnly(true);
- }
+ this->editable = editable;
+ if (editable) {
+ setReadOnly(false);
+ } else {
+ setReadOnly(true);
+ }
}
QSize QtResizableLineEdit::sizeHint() const {
- int horizontalMargin = 10;
- int verticalMargin = 6;
- QSize textDimensions;
+ int horizontalMargin = 10;
+ int verticalMargin = 6;
+ QSize textDimensions;
#if QT_VERSION >= 0x040700
- textDimensions = fontMetrics().boundingRect(text().isEmpty() ? placeholderText() : text()).size();
+ textDimensions = fontMetrics().boundingRect(text().isEmpty() ? placeholderText() : text()).size();
#else
- textDimensions = fontMetrics().boundingRect(text().isEmpty() ? QString(" ") : text()).size();
+ textDimensions = fontMetrics().boundingRect(text().isEmpty() ? QString(" ") : text()).size();
#endif
- textDimensions.setWidth(textDimensions.width() + horizontalMargin);
- textDimensions.setHeight(textDimensions.height() + verticalMargin);
- return textDimensions;
+ textDimensions.setWidth(textDimensions.width() + horizontalMargin);
+ textDimensions.setHeight(textDimensions.height() + verticalMargin);
+ return textDimensions;
}
void QtResizableLineEdit::textChanged(QString) {
- updateGeometry();
+ updateGeometry();
}
}