Fixed bug #5942 Characters left field in update location dialog doesn't update when...
authorKatri Kaikkonen <katri.kaikkonen@ixonos.com>
Fri, 18 Jun 2010 12:29:58 +0000 (15:29 +0300)
committerKatri Kaikkonen <katri.kaikkonen@ixonos.com>
Fri, 18 Jun 2010 12:29:58 +0000 (15:29 +0300)
src/ui/updatelocation/updatelocationdialog.cpp

index 935c738..d7a73c4 100644 (file)
@@ -35,7 +35,8 @@ UpdateLocationDialog::UpdateLocationDialog(const QString &userMessage, bool publ
 \r
     QGridLayout *gridLayout = new QGridLayout();\r
 \r
-    m_textEdit = new QTextEdit;\r
+    m_textEdit = new QTextEdit();\r
+    m_charCountLabel = new QLabel();\r
 \r
     if (userMessage.isEmpty())\r
     {\r
@@ -49,6 +50,7 @@ UpdateLocationDialog::UpdateLocationDialog(const QString &userMessage, bool publ
     {\r
         m_textEdit->setText(userMessage);\r
         m_textEdit->document()->setModified(true);\r
+        textChanged();\r
     }\r
 \r
     QScrollArea *scrollArea = new QScrollArea();\r
@@ -66,7 +68,7 @@ UpdateLocationDialog::UpdateLocationDialog(const QString &userMessage, bool publ
     scrollArea->setWidgetResizable(true);\r
     scrollArea->setFrameShape(QScrollArea::NoFrame);\r
 \r
-    m_locationLabel = new QLabel;\r
+    m_locationLabel = new QLabel();\r
     m_locationLabel->setWordWrap(true);\r
     m_checkBox = new QCheckBox(tr("Publish on Facebook"));\r
     m_checkBox->setChecked(publishOnFacebook);\r
@@ -76,7 +78,6 @@ UpdateLocationDialog::UpdateLocationDialog(const QString &userMessage, bool publ
     QPushButton *cancelButton = buttonBox->addButton(QDialogButtonBox::Cancel);\r
     sendButton->setText(tr("Send"));\r
 \r
-    m_charCountLabel = new QLabel;\r
     m_charCountLabel->setNum(MESSAGE_MAX_LENGTH);\r
 \r
     gridLayout->addWidget(new QLabel(tr("Location:")), 0, 0, 1, 1, Qt::AlignTop | Qt::AlignLeft);\r