Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@
#include <QJsonParseError>
#include <QJsonDocument>
#include <QJsonObject>
#include <QString>

Check warning on line 28 in src/main.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QString> not found. Please note: Cppcheck does not need standard library headers to get proper results.

Check warning on line 28 in src/main.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QString> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QByteArray>

Check warning on line 29 in src/main.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QByteArray> not found. Please note: Cppcheck does not need standard library headers to get proper results.

Check warning on line 29 in src/main.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QByteArray> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include "common/dbusadpator.h"

Check warning on line 30 in src/main.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: "common/dbusadpator.h" not found.

Check warning on line 30 in src/main.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: "common/dbusadpator.h" not found.
#include "eventlogutils.h"
#ifdef DTKWIDGET_CLASS_DWaterMarkHelper
#include <DWaterMarkHelper>

Check warning on line 32 in src/main.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <DWaterMarkHelper> not found. Please note: Cppcheck does not need standard library headers to get proper results.

Check warning on line 32 in src/main.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <DWaterMarkHelper> not found. Please note: Cppcheck does not need standard library headers to get proper results.
DWIDGET_USE_NAMESPACE
#endif
DCORE_USE_NAMESPACE
Expand Down Expand Up @@ -365,26 +364,6 @@
// 无参数打开应用
w.show();
}
QObject::connect(&app, &DApplication::aboutToQuit,[=](){
QString strOpenFile;
if(!listTransFiles.isEmpty())
strOpenFile = listTransFiles[0];
if(strOpenFile.isEmpty()) {
QJsonObject obj{
{"tid", EventLogUtils::closeCompressWnd},
{"operate", "closeCompressWnd"},
{"describe", QString("Close Compress Window.")}
};
EventLogUtils::get().writeLogs(obj);
} else {
QJsonObject obj{
{"tid", EventLogUtils::closeCompressWnd},
{"operate", "closeCompressWnd"},
{"describe", QString("Close Compress Window. Close compress file : ") + strOpenFile}
};
EventLogUtils::get().writeLogs(obj);
}
});
PERF_PRINT_END("POINT-01");

return app.exec();
Expand Down
43 changes: 0 additions & 43 deletions src/source/archivemanager/archivemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@
#include "kpluginfactory.h"
#include "kpluginloader.h"
#include "mimetypes.h"
#include "pluginmanager.h"

Check warning on line 10 in src/source/archivemanager/archivemanager.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: "pluginmanager.h" not found.

Check warning on line 10 in src/source/archivemanager/archivemanager.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: "pluginmanager.h" not found.
#include "singlejob.h"
#include "batchjob.h"
#include "eventlogutils.h"

#include <QMimeDatabase>

Check warning on line 14 in src/source/archivemanager/archivemanager.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QMimeDatabase> not found. Please note: Cppcheck does not need standard library headers to get proper results.

Check warning on line 14 in src/source/archivemanager/archivemanager.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QMimeDatabase> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QFileInfo>

Check warning on line 15 in src/source/archivemanager/archivemanager.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QFileInfo> not found. Please note: Cppcheck does not need standard library headers to get proper results.

Check warning on line 15 in src/source/archivemanager/archivemanager.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QFileInfo> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QDebug>
#include "dfmstandardpaths.h"

Expand Down Expand Up @@ -103,12 +102,6 @@
bool ArchiveManager::loadArchive(const QString &strArchiveFullPath, UiTools::AssignPluginType eType)
{
qDebug() << "Starting loadArchive operation for file:" << strArchiveFullPath;
QJsonObject obj{
{"tid", EventLogUtils::LoadCompressFile},
{"operate", "LoadCompressFile"},
{"describe", QString("Load Compress File : ") + strArchiveFullPath}
};
EventLogUtils::get().writeLogs(obj);
// 重新加载首先释放之前的interface
if (m_pInterface != nullptr) {
qDebug() << "Clearing previous archive interface";
Expand Down Expand Up @@ -141,12 +134,6 @@
bool ArchiveManager::addFiles(const QString &strArchiveFullPath, const QList<FileEntry> &listAddEntry, const CompressOptions &stOptions)
{
qDebug() << "Starting addFiles operation for archive:" << strArchiveFullPath;
QJsonObject obj{
{"tid", EventLogUtils::AddCompressFile},
{"operate", "AddCompressFile"},
{"describe", QString("Add File to package: ") + strArchiveFullPath}
};
EventLogUtils::get().writeLogs(obj);
// workaround:
// pzip 仅支持新建压缩,目前先将zip 追加时显式指定使用 libzip 插件
UiTools::AssignPluginType eType = UiTools::APT_Auto;
Expand Down Expand Up @@ -182,12 +169,6 @@
bool ArchiveManager::extractFiles(const QString &strArchiveFullPath, const QList<FileEntry> &files, const ExtractionOptions &stOptions, UiTools::AssignPluginType eType)
{
qDebug() << "Starting extractFiles operation for archive:" << strArchiveFullPath;
QJsonObject obj{
{"tid", EventLogUtils::ExtractCompressFile},
{"operate", "ExtractCompressFile"},
{"describe", QString("Decompress the package : ") + strArchiveFullPath}
};
EventLogUtils::get().writeLogs(obj);
if (nullptr == m_pInterface) {
qDebug() << "Creating interface for extraction";
m_pInterface = UiTools::createInterface(strArchiveFullPath, false, eType);
Expand Down Expand Up @@ -236,12 +217,6 @@
bool ArchiveManager::extractFiles2Path(const QString &strArchiveFullPath, const QList<FileEntry> &listSelEntry, const ExtractionOptions &stOptions)
{
qDebug() << "Starting extractFiles2Path operation for archive:" << strArchiveFullPath;
QJsonObject obj{
{"tid", EventLogUtils::ExtractSingleFile},
{"operate", "ExtractSingleFile"},
{"describe", QString("Extract file from the compressed package : ") + strArchiveFullPath}
};
EventLogUtils::get().writeLogs(obj);
if (nullptr == m_pInterface) {
qDebug() << "Creating interface for extraction to path";
m_pInterface = UiTools::createInterface(strArchiveFullPath);
Expand Down Expand Up @@ -271,12 +246,6 @@
bool ArchiveManager::deleteFiles(const QString &strArchiveFullPath, const QList<FileEntry> &listSelEntry)
{
qDebug() << "Starting deleteFiles operation for archive:" << strArchiveFullPath;
QJsonObject obj{
{"tid", EventLogUtils::DelCompressFile},
{"operate", "DelCompressFile"},
{"describe", QString("Delete file from package : ") + strArchiveFullPath}
};
EventLogUtils::get().writeLogs(obj);
if (nullptr == m_pInterface) {
qDebug() << "Creating interface for deletion";
m_pInterface = UiTools::createInterface(strArchiveFullPath);
Expand Down Expand Up @@ -306,12 +275,6 @@
bool ArchiveManager::renameFiles(const QString &strArchiveFullPath, const QList<FileEntry> &listSelEntry)
{
qDebug() << "Starting renameFiles operation for archive:" << strArchiveFullPath;
QJsonObject obj{
{"tid", EventLogUtils::RenameCompressFile},
{"operate", "RenameCompressFile"},
{"describe", QString("Rename file from package : ") + strArchiveFullPath}
};
EventLogUtils::get().writeLogs(obj);
if (nullptr == m_pInterface) {
qDebug() << "Creating interface for renaming";
m_pInterface = UiTools::createInterface(strArchiveFullPath);
Expand Down Expand Up @@ -368,12 +331,6 @@
bool ArchiveManager::openFile(const QString &strArchiveFullPath, const FileEntry &stEntry, const QString &strTempExtractPath, const QString &strProgram)
{
qDebug() << "Starting openFile operation for archive:" << strArchiveFullPath;
QJsonObject obj{
{"tid", EventLogUtils::OpenCompressFile},
{"operate", "OpenCompressFile"},
{"describe", QString("Open file from package : ") + strArchiveFullPath}
};
EventLogUtils::get().writeLogs(obj);
if (nullptr == m_pInterface) {
qDebug() << "Creating interface for opening file";
m_pInterface = UiTools::createInterface(strArchiveFullPath);
Expand Down
10 changes: 0 additions & 10 deletions src/source/common/eventlogutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,6 @@ class EventLogUtils
Start = 1000000003,
Quit = 1000000004
};
enum CompressTID {
LoadCompressFile = 1000200040,
OpenCompressFile = 1000200041,
ExtractCompressFile = 1000200042,
ExtractSingleFile = 1000200043,
closeCompressWnd = 1000200044,
AddCompressFile = 1000200045,
DelCompressFile = 1000200046,
RenameCompressFile = 1000200047
};
enum REPORTMODE
{
BROADCAST = 1,
Expand Down
6 changes: 0 additions & 6 deletions src/source/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1356,12 +1356,6 @@ void MainWindow::slotJobFinished(ArchiveJob::JobType eJobType, PluginFinishType
void MainWindow::slotUncompressClicked(const QString &strUncompressPath)
{
qDebug() << "Starting extraction to path:" << strUncompressPath;
QJsonObject obj{
{"tid", EventLogUtils::ExtractCompressFile},
{"operate", "ExtractCompressFile"},
{"describe", QString("Extract Compress File: ") + strUncompressPath}
};
EventLogUtils::get().writeLogs(obj);
m_operationtype = Operation_Extract; //解压操作

QString strArchiveFullPath = m_pUnCompressPage->archiveFullPath();
Expand Down
Loading