void ReadFile(QString filename)
{
QStringList m_sqllist_config;
QString sqlall;
QString FileName;
FileName = "scripts/config/" + filename;
QFile file(FileName);
if(!file.open(QIODevice::ReadOnly|QIODevice::Text))
{
// QMessageBox::warning(this, "OPERATEDB", "SQL文件打开失败!", QMessageBox::Yes);
qDebug()<<"SQL文件打开失败!";
return;
}
QTextStream stream(&file);
sqlall = stream.readAll();
QString sqltemp = sqlall.simplified();//去掉空白字符
m_sqllist_config = sqltemp.split(";", QString::SkipEmptyParts);
/* while(!stream.atEnd())
{
sqlline = stream.readLine();
m_sqllist_config.append(sqlline);
}*/
file.close();
}