diff options
| author | Tobias Markmann <tm@ayena.de> | 2016-03-31 14:57:35 (GMT) | 
|---|---|---|
| committer | Tobias Markmann <tm@ayena.de> | 2016-03-31 14:57:35 (GMT) | 
| commit | cfbdb43d2cadd40aa87338d41548e4bf89e146e6 (patch) | |
| tree | 18d94153a302445196fc0c18586abf44a1ce4a38 /Swift/QtUI/QtSubscriptionRequestWindow.cpp | |
| parent | 1d545a4a7fb877f021508094b88c1f17b30d8b4e (diff) | |
| download | swift-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/QtSubscriptionRequestWindow.cpp')
| -rw-r--r-- | Swift/QtUI/QtSubscriptionRequestWindow.cpp | 98 | 
1 files changed, 49 insertions, 49 deletions
| diff --git a/Swift/QtUI/QtSubscriptionRequestWindow.cpp b/Swift/QtUI/QtSubscriptionRequestWindow.cpp index 43cdb50..9e1fc37 100644 --- a/Swift/QtUI/QtSubscriptionRequestWindow.cpp +++ b/Swift/QtUI/QtSubscriptionRequestWindow.cpp @@ -15,76 +15,76 @@  namespace Swift {  QtSubscriptionRequestWindow::QtSubscriptionRequestWindow(boost::shared_ptr<SubscriptionRequestEvent> event, QWidget* parent) : QDialog(parent), event_(event) { -	QString text = QString(tr("%1 would like to add you to their contact list.")).arg(P2QSTRING(event->getJID().toString())); -	QVBoxLayout* layout = new QVBoxLayout(); -	QLabel* label = new QLabel(text, this); -	layout->addWidget(label); -	label = new QLabel(tr("Would you like to add them to your contact list and share your status when you're online?")); -	//layout->addWidget(new QLabel); -	layout->addWidget(label); +    QString text = QString(tr("%1 would like to add you to their contact list.")).arg(P2QSTRING(event->getJID().toString())); +    QVBoxLayout* layout = new QVBoxLayout(); +    QLabel* label = new QLabel(text, this); +    layout->addWidget(label); +    label = new QLabel(tr("Would you like to add them to your contact list and share your status when you're online?")); +    //layout->addWidget(new QLabel); +    layout->addWidget(label); -	if (event_->getConcluded()) { -		QLabel* doneLabel = new QLabel(tr("You have already replied to this request")); -		QPushButton* okButton = new QPushButton(tr("OK"), this); -		connect(okButton, SIGNAL(clicked()), this, SLOT(handleDefer())); -		layout->addWidget(doneLabel); -		layout->addWidget(okButton); -	} else { -		QPushButton* yesButton = new QPushButton(tr("Accept"), this); -		yesButton->setDefault(true); -		connect(yesButton, SIGNAL(clicked()), this, SLOT(handleYes())); -		QPushButton* noButton = new QPushButton(tr("Reject"), this); -		connect(noButton, SIGNAL(clicked()), this, SLOT(handleNo())); -		QPushButton* deferButton = new QPushButton(tr("Defer"), this); -		deferButton->setShortcut(QKeySequence(Qt::Key_Escape)); -		connect(deferButton, SIGNAL(clicked()), this, SLOT(handleDefer())); +    if (event_->getConcluded()) { +        QLabel* doneLabel = new QLabel(tr("You have already replied to this request")); +        QPushButton* okButton = new QPushButton(tr("OK"), this); +        connect(okButton, SIGNAL(clicked()), this, SLOT(handleDefer())); +        layout->addWidget(doneLabel); +        layout->addWidget(okButton); +    } else { +        QPushButton* yesButton = new QPushButton(tr("Accept"), this); +        yesButton->setDefault(true); +        connect(yesButton, SIGNAL(clicked()), this, SLOT(handleYes())); +        QPushButton* noButton = new QPushButton(tr("Reject"), this); +        connect(noButton, SIGNAL(clicked()), this, SLOT(handleNo())); +        QPushButton* deferButton = new QPushButton(tr("Defer"), this); +        deferButton->setShortcut(QKeySequence(Qt::Key_Escape)); +        connect(deferButton, SIGNAL(clicked()), this, SLOT(handleDefer())); -		QHBoxLayout* buttonLayout = new QHBoxLayout(); -		buttonLayout->addWidget(yesButton); -		buttonLayout->addWidget(noButton); -		buttonLayout->addWidget(deferButton); -		layout->addWidget(new QLabel); -		layout->addLayout(buttonLayout); -		layout->addWidget(new QLabel); -		QLabel* footer = new QLabel(tr("(If you choose to defer this choice, you will be asked again when you next login.)")); -		layout->addWidget(footer); -	} +        QHBoxLayout* buttonLayout = new QHBoxLayout(); +        buttonLayout->addWidget(yesButton); +        buttonLayout->addWidget(noButton); +        buttonLayout->addWidget(deferButton); +        layout->addWidget(new QLabel); +        layout->addLayout(buttonLayout); +        layout->addWidget(new QLabel); +        QLabel* footer = new QLabel(tr("(If you choose to defer this choice, you will be asked again when you next login.)")); +        layout->addWidget(footer); +    } -	setLayout(layout); +    setLayout(layout);  }  void QtSubscriptionRequestWindow::handleYes() { -	event_->accept(); -	delete this; +    event_->accept(); +    delete this;  }  void QtSubscriptionRequestWindow::handleNo() { -	event_->decline(); -	delete this; +    event_->decline(); +    delete this;  }  void QtSubscriptionRequestWindow::handleDefer() { -	event_->defer(); -	delete this; +    event_->defer(); +    delete this;  }  QtSubscriptionRequestWindow::~QtSubscriptionRequestWindow() { -	windows_.removeOne(this); +    windows_.removeOne(this);  }  QtSubscriptionRequestWindow* QtSubscriptionRequestWindow::getWindow(boost::shared_ptr<SubscriptionRequestEvent> event, QWidget* parent) { -	foreach (QtSubscriptionRequestWindow* window, windows_) { -		if (window->getEvent() == event) { -			return window; -		} -	} -	QtSubscriptionRequestWindow* window = new QtSubscriptionRequestWindow(event, parent); -	windows_.append(window); -	return window; +    foreach (QtSubscriptionRequestWindow* window, windows_) { +        if (window->getEvent() == event) { +            return window; +        } +    } +    QtSubscriptionRequestWindow* window = new QtSubscriptionRequestWindow(event, parent); +    windows_.append(window); +    return window;  }  boost::shared_ptr<SubscriptionRequestEvent> QtSubscriptionRequestWindow::getEvent() { -	return event_; +    return event_;  }  QList<QtSubscriptionRequestWindow*> QtSubscriptionRequestWindow::windows_; | 
 Swift
 Swift