From 97787cce10f00089b89d638116ace9d49211490f Mon Sep 17 00:00:00 2001 From: chenyong Date: Tue, 27 Sep 2016 21:48:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A6=82=E6=9E=9C=E7=94=A8=E6=88=B7=E5=90=8D?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=EF=BC=8C=E8=A6=81=E6=B1=82=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=90=8E=E6=89=8D=E8=83=BD=E8=BF=9B=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mainwindow.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 07cb666..579bbd3 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -395,7 +395,14 @@ vector MainWindow::fellowSearchDriver(const QString &text) void MainWindow::initFeiq() { //配置飞秋 - mFeiq.setMyName(mSettings->value("user/name").toString().toStdString()); + auto name = mSettings->value("user/name").toString(); + if (name.isEmpty()) + { + emit showErrorAndQuit("请先打开【"+mSettings->fileName()+"】设置用户名(user/name)"); + return; + } + + mFeiq.setMyName(name.toStdString()); mFeiq.setMyHost(mSettings->value("user/host","feiq by cy").toString().toStdString()); auto customGrroup = mSettings->value("network/custom_group", "").toString();