Browse Source

增加提示语限制长度

tags/v1.1
chenyong 8 years ago
parent
commit
443d9adaa6
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      mainwindow.cpp

+ 2
- 2
mainwindow.cpp View File

@@ -348,8 +348,8 @@ void MainWindow::notifyUnshown(UnshownMessage& umsg)
long MainWindow::showNotification(const Fellow *fellow, const QString &text) long MainWindow::showNotification(const Fellow *fellow, const QString &text)
{ {
QString content(text); QString content(text);
if (content.length()>20)
content = content.left(20)+"...";
if (content.length()>100)
content = content.left(100)+"...";
return PlatformDepend::instance().showNotify(QString(fellow->getName().c_str())+":", content, fellow->getIp().c_str()); return PlatformDepend::instance().showNotify(QString(fellow->getName().c_str())+":", content, fellow->getIp().c_str());
} }




Loading…
Cancel
Save