Merge pull request #225 from iaom/0506-dev

Remove ukui-log4qt model.
This commit is contained in:
fensite 2021-05-10 15:15:20 +08:00 committed by GitHub
commit 550681b38f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 61 additions and 42 deletions

18
debian/changelog vendored
View File

@ -1,3 +1,21 @@
ukui-search (0.4.0+0508) v101; urgency=medium
* Bug 49153.
* 任务
* 其他改动:
* Android app can be search now.
- 新增搜索安卓兼容目录下应用功能。
* Start ukui-control-center on settings button clicked.
- 点击设置按钮,跳转到控制面板。
* Fix(frontend): Ssearch list & dialog will not refresh when fontsize changed.
- 修复了当弹出创建索引提示框时修改系统字体大小会出现显示错乱的bug。
* Fix: blacklist will not effective when search method is direct search.
-修复了当选择搜索方式为不创建索引搜索时黑名单无效的问题。
* Discard ukui-log4qt for log printing.
-由于日志模块偶现卡死bug移除了ukui-log4qt日志打印功能。
-- zhangpengfei <zhangpengfei@kylinos.cn> Fri, 08 May 2021 15:35:06 +0800
ukui-search (0.4.0+0422-1) v101; urgency=medium ukui-search (0.4.0+0422-1) v101; urgency=medium
* Bug 45037,45035,47971,26454. * Bug 45037,45035,47971,26454.

View File

@ -62,50 +62,50 @@ using namespace Zeeker;
//} //}
//void messageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg) void messageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg)
//{ {
// QByteArray localMsg = msg.toLocal8Bit(); QByteArray localMsg = msg.toLocal8Bit();
// QByteArray currentTime = QTime::currentTime().toString().toLocal8Bit(); QByteArray currentTime = QTime::currentTime().toString().toLocal8Bit();
// bool showDebug = true; bool showDebug = true;
//// QString logFilePath = QStandardPaths::writableLocation(QStandardPaths::TempLocation) + "/ukui-search.log"; // QString logFilePath = QStandardPaths::writableLocation(QStandardPaths::TempLocation) + "/ukui-search.log";
//// QString logFilePath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/.config/org.ukui/ukui-search/ukui-search.log"; // QString logFilePath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/.config/org.ukui/ukui-search/ukui-search.log";
// QString logFilePath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/.config/org.ukui/ukui-search.log"; QString logFilePath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/.config/org.ukui/ukui-search.log";
// if (!QFile::exists(logFilePath)) { if (!QFile::exists(logFilePath)) {
// showDebug = false; showDebug = false;
// } }
// FILE *log_file = nullptr; FILE *log_file = nullptr;
// if (showDebug) { if (showDebug) {
// log_file = fopen(logFilePath.toLocal8Bit().constData(), "a+"); log_file = fopen(logFilePath.toLocal8Bit().constData(), "a+");
// } }
// const char *file = context.file ? context.file : ""; const char *file = context.file ? context.file : "";
// const char *function = context.function ? context.function : ""; const char *function = context.function ? context.function : "";
// switch (type) { switch (type) {
// case QtDebugMsg: case QtDebugMsg:
// if (!log_file) { if (!log_file) {
// break; break;
// } }
// fprintf(log_file, "Debug: %s: %s (%s:%u, %s)\n", currentTime.constData(), localMsg.constData(), file, context.line, function); fprintf(log_file, "Debug: %s: %s (%s:%u, %s)\n", currentTime.constData(), localMsg.constData(), file, context.line, function);
// break; break;
// case QtInfoMsg: case QtInfoMsg:
// fprintf(log_file? log_file: stdout, "Info: %s: %s (%s:%u, %s)\n", currentTime.constData(), localMsg.constData(), file, context.line, function); fprintf(log_file? log_file: stdout, "Info: %s: %s (%s:%u, %s)\n", currentTime.constData(), localMsg.constData(), file, context.line, function);
// break; break;
// case QtWarningMsg: case QtWarningMsg:
// fprintf(log_file? log_file: stderr, "Warning: %s: %s (%s:%u, %s)\n", currentTime.constData(), localMsg.constData(), file, context.line, function); fprintf(log_file? log_file: stderr, "Warning: %s: %s (%s:%u, %s)\n", currentTime.constData(), localMsg.constData(), file, context.line, function);
// break; break;
// case QtCriticalMsg: case QtCriticalMsg:
// fprintf(log_file? log_file: stderr, "Critical: %s: %s (%s:%u, %s)\n", currentTime.constData(), localMsg.constData(), file, context.line, function); fprintf(log_file? log_file: stderr, "Critical: %s: %s (%s:%u, %s)\n", currentTime.constData(), localMsg.constData(), file, context.line, function);
// break; break;
// case QtFatalMsg: case QtFatalMsg:
// fprintf(log_file? log_file: stderr, "Fatal: %s: %s (%s:%u, %s)\n", currentTime.constData(), localMsg.constData(), file, context.line, function); fprintf(log_file? log_file: stderr, "Fatal: %s: %s (%s:%u, %s)\n", currentTime.constData(), localMsg.constData(), file, context.line, function);
// break; break;
// } }
// if (log_file) if (log_file)
// fclose(log_file); fclose(log_file);
//} }
void centerToScreen(QWidget* widget) { void centerToScreen(QWidget* widget) {
if(!widget) if(!widget)
@ -145,7 +145,7 @@ void searchMethod(FileUtils::SearchMethod sm){
*/ */
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
//Init log module //Init log module
initUkuiLog4qt("ukui-search"); // initUkuiLog4qt("ukui-search");
// Determine whether the home directory has been created, and if not, keep waiting. // Determine whether the home directory has been created, and if not, keep waiting.
char *p_home = NULL; char *p_home = NULL;
@ -170,7 +170,7 @@ int main(int argc, char *argv[]) {
} }
// Output log to file // Output log to file
// qInstallMessageHandler(messageOutput); qInstallMessageHandler(messageOutput);
// Register meta type // Register meta type
qDebug() << "ukui-search main start"; qDebug() << "ukui-search main start";

View File

@ -27,6 +27,7 @@
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QPropertyAnimation> #include <QPropertyAnimation>
#include <QPaintEvent> #include <QPaintEvent>
#include <QPainterPath>
#include <QPainter> #include <QPainter>
#include <QtMath> #include <QtMath>
#include <QEvent> #include <QEvent>