Browse Source

fix(ui): reorder the window title

reviewable/pr6361/r2
woxcab 4 years ago committed by Anthony Bilinski
parent
commit
d621d74511
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
  1. 4
      src/widget/contentdialog.cpp
  2. 2
      src/widget/gui.cpp
  3. 4
      src/widget/widget.cpp

4
src/widget/contentdialog.cpp

@ -59,7 +59,7 @@ ContentDialog::ContentDialog(const Core &core, QWidget* parent) @@ -59,7 +59,7 @@ ContentDialog::ContentDialog(const Core &core, QWidget* parent)
, videoSurfaceSize(QSize())
, videoCount(0)
{
const Settings& s = Settings::getInstance();
const Settings& s = Settings::getInstance();
friendLayout->setMargin(0);
friendLayout->setSpacing(0);
@ -383,7 +383,7 @@ void ContentDialog::updateTitleAndStatusIcon() @@ -383,7 +383,7 @@ void ContentDialog::updateTitleAndStatusIcon()
return;
}
setWindowTitle(activeChatroomWidget->getTitle() + QStringLiteral(" - ") + username);
setWindowTitle(username + QStringLiteral(" - ") + activeChatroomWidget->getTitle());
bool isGroupchat = activeChatroomWidget->getGroup() != nullptr;
if (isGroupchat) {

2
src/widget/gui.cpp

@ -224,7 +224,7 @@ void GUI::_setWindowTitle(const QString& title) @@ -224,7 +224,7 @@ void GUI::_setWindowTitle(const QString& title)
if (title.isEmpty())
w->setWindowTitle("qTox");
else
w->setWindowTitle("qTox - " + title);
w->setWindowTitle(title + " - qTox");
}
void GUI::_showInfo(const QString& title, const QString& msg)

4
src/widget/widget.cpp

@ -829,8 +829,8 @@ void Widget::setWindowTitle(const QString& title) @@ -829,8 +829,8 @@ void Widget::setWindowTitle(const QString& title)
} else {
QString tmp = title;
/// <[^>]*> Regexp to remove HTML tags, in case someone used them in title
QMainWindow::setWindowTitle(QApplication::applicationName() + QStringLiteral(" - ")
+ tmp.remove(QRegExp("<[^>]*>")));
QMainWindow::setWindowTitle(tmp.remove(QRegExp("<[^>]*>")) + QStringLiteral(" - ")
+ QApplication::applicationName());
}
}

Loading…
Cancel
Save