1个文件已修改
15 ■■■■■ 已修改文件
mainwindow.cpp 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
mainwindow.cpp
@@ -5,6 +5,7 @@
#include <QClipboard>
#include <QDateTime>
#include <QDebug>
#include <QDesktopServices>
#include <QFileDialog>
#include <QMessageBox>
#include <QProcess>
@@ -63,6 +64,7 @@
    m_numToInfo.insert("12","IsEnabled_pipe");
    m_numToInfo.insert("13","IsEnabled_network");
    m_numToInfo.insert("14","Baseboard_Serialnumber");
    changeUIstate();
}
QString MainWindow::toUpperAndLower(QString src)
@@ -518,6 +520,7 @@
    QDateTime licensedate = QDateTime::currentDateTime();
    QDateTime newlicensedate = licensedate.addMonths(time);
    QString licensedatestr = newlicensedate.toString("yyyy-MM-dd hh:mm:ss");
    licensekey_Obj[m_numToInfo.key("LicensedDuration_start")] = licensedate.toString("yyyy-MM-dd hh:mm:ss");
    licensekey_Obj[m_numToInfo.key("LicensedDuration_end")] = licensedatestr;
    workingjsondoc.setObject(licensekey_Obj);
    //数据压缩,去空格换行等多余无用信息
@@ -774,10 +777,10 @@
void MainWindow::on_pushButton_viewUsers_clicked()
{
    QString excelPath = QApplication::applicationDirPath();
    QString filename = QFileDialog::getOpenFileName(nullptr,tr("打开文件"),excelPath,tr("excel文件(*.xlsx)"));
    if(filename=="")
    {
        return;
    }
    QString excelPath = QApplication::applicationDirPath()+QStringLiteral("/安全评价软件授权人数统计表.xlsx");
    QUrl fileUrl = QUrl::fromLocalFile(excelPath);
    // 2. 调用系统服务打开文件管理器并选中文件
    QDesktopServices::openUrl(fileUrl);
}