clamav-gui-1.1.3(Qt6).
This commit is contained in:
@@ -2,22 +2,18 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Licensed under the GNU General Public License, version 3.
|
||||
# See the file http://www.gnu.org/licenses/gpl.txt
|
||||
# See the file https://www.gnu.org/licenses/gpl-3.0.txt
|
||||
|
||||
from pisi.actionsapi import shelltools
|
||||
from pisi.actionsapi import qt5
|
||||
from pisi.actionsapi import pisitools
|
||||
from pisi.actionsapi import autotools
|
||||
from pisi.actionsapi import get
|
||||
|
||||
|
||||
#WorkDir = "ClamAV-GUI/"
|
||||
from pisi.actionsapi import shelltools, autotools, pisitools, get
|
||||
|
||||
def setup():
|
||||
shelltools.system("qmake -r PREFIX=/usr clamav-gui.pro")
|
||||
|
||||
shelltools.system("sed -i '/^documents.*doc/s/ClamAV-GUI/clamav-gui/' clamav-gui.pro")
|
||||
shelltools.system("qmake-qt6 PREFIX=/usr clamav-gui.pro")
|
||||
|
||||
def build():
|
||||
autotools.make()
|
||||
|
||||
def install():
|
||||
autotools.rawInstall("INSTALL_ROOT=%s" % get.installDIR())
|
||||
|
||||
pisitools.dodoc("LICENSE")
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
diff --git a/src/highlighter.cpp b/src/highlighter.cpp
|
||||
index 7b8bf23..bdc4732 100644
|
||||
--- a/src/highlighter.cpp
|
||||
+++ b/src/highlighter.cpp
|
||||
@@ -29,7 +29,7 @@ highlighter::highlighter(QTextDocument * parent) : QSyntaxHighlighter(parent)
|
||||
|
||||
singleLineCommentFormat.setForeground(Qt::blue);
|
||||
singleLineCommentFormat.setBackground(Qt::white);
|
||||
- rule.pattern = QRegExp("^Downloading.*|^ClamInotif:|.-> .*|^/.*|^Database updated.*|^ClamAV update process started.*|^---.*|.Testing database:*|.Database Test passed.");
|
||||
+ rule.pattern = QRegularExpression("^Downloading.*|^ClamInotif:|.-> .*|^/.*|^Database updated.*|^ClamAV update process started.*|^---.*|.Testing database:*|.Database Test passed.");
|
||||
singleLineCommentFormat.setFontWeight(QFont::Normal);
|
||||
rule.format = singleLineCommentFormat;
|
||||
highlightingRules.append(rule);
|
||||
@@ -37,52 +37,55 @@ highlighter::highlighter(QTextDocument * parent) : QSyntaxHighlighter(parent)
|
||||
singleLineCommentFormat.setForeground(QColor(0x4f,0x7e,0x8a,0xff));
|
||||
singleLineCommentFormat.setBackground(Qt::white);
|
||||
singleLineCommentFormat.setFontWeight(QFont::Bold);
|
||||
- rule.pattern = QRegExp("^Known viruses:.|^Engine version:.|^Data scanned:.|^Data read:.|^Time:.|^Start Date:.|^End Date:.");
|
||||
+ rule.pattern = QRegularExpression("^Known viruses:.|^Engine version:.|^Data scanned:.|^Data read:.|^Time:.|^Start Date:.|^End Date:.");
|
||||
rule.format = singleLineCommentFormat;
|
||||
highlightingRules.append(rule);
|
||||
|
||||
singleLineCommentFormat.setForeground(Qt::darkGreen);
|
||||
singleLineCommentFormat.setBackground(Qt::white);
|
||||
singleLineCommentFormat.setFontWeight(QFont::Normal);
|
||||
- rule.pattern = QRegExp("LOCAL:|OLE2:|Phishing:|Heuristic:|Structured:|Local:|Limits:|.enabled|.disabled|.watching .*|^daily.cvd.*|^daily.cld.*|^bytecode.cvd.*|^main.cvd.*|^freshclam deamon.*|. OK|^Scanned directories:.|^Scanned files:.|^Infected files: 0");
|
||||
+ rule.pattern = QRegularExpression("LOCAL:|OLE2:|Phishing:|Heuristic:|Structured:|Local:|Limits:|.enabled|.disabled|.watching .*|^daily.cvd.*|^daily.cld.*|^bytecode.cvd.*|^main.cvd.*|^freshclam deamon.*|. OK|^Scanned directories:.|^Scanned files:.|^Infected files: 0");
|
||||
rule.format = singleLineCommentFormat;
|
||||
highlightingRules.append(rule);
|
||||
|
||||
singleLineCommentFormat.setForeground(Qt::darkYellow);
|
||||
singleLineCommentFormat.setBackground(Qt::white);
|
||||
singleLineCommentFormat.setFontWeight(QFont::Normal);
|
||||
- rule.pattern = QRegExp(".Pid file removed.|. Started at.*|. Stopped at.*|.Socket file removed.");
|
||||
+ rule.pattern = QRegularExpression(".Pid file removed.|. Started at.*|. Stopped at.*|.Socket file removed.");
|
||||
rule.format = singleLineCommentFormat;
|
||||
highlightingRules.append(rule);
|
||||
|
||||
singleLineCommentFormat.setForeground(Qt::red);
|
||||
singleLineCommentFormat.setBackground(Qt::white);
|
||||
singleLineCommentFormat.setFontWeight(QFont::Normal);
|
||||
- rule.pattern = QRegExp("^ERROR: ClamCom:|.Empty file|^WARN.*|.FOUND *|.ERROR:.*|.WARNING:.*|^Can't connect to port.*|.Access denied|^Infected files:.|^Total errors:.*");
|
||||
+ rule.pattern = QRegularExpression("^ERROR: ClamCom:|.Empty file|^WARN.*|.FOUND *|.ERROR:.*|.WARNING:.*|^Can't connect to port.*|.Access denied|^Infected files:.|^Total errors:.*");
|
||||
rule.format = singleLineCommentFormat;
|
||||
highlightingRules.append(rule);
|
||||
|
||||
multiLineCommentFormat.setForeground(Qt::red);
|
||||
singleLineCommentFormat.setBackground(Qt::white);
|
||||
singleLineCommentFormat.setFontWeight(QFont::Normal);
|
||||
- commentStartExpression = QRegExp("START");
|
||||
- commentEndExpression = QRegExp("ENDE");
|
||||
+ commentStartExpression = QRegularExpression("START");
|
||||
+ commentEndExpression = QRegularExpression("ENDE");
|
||||
|
||||
}
|
||||
|
||||
void highlighter::highlightBlock(const QString &text)
|
||||
{
|
||||
foreach (const HighlightingRule &rule, highlightingRules) {
|
||||
- QRegExp expression(rule.pattern);
|
||||
- int index = expression.indexIn(text);
|
||||
- while (index >= 0) {
|
||||
- int length = expression.matchedLength();
|
||||
+ QRegularExpression expression(rule.pattern);
|
||||
+ QRegularExpressionMatchIterator iterator = expression.globalMatch(text);
|
||||
+
|
||||
+ while (iterator.hasNext()) {
|
||||
+ QRegularExpressionMatch match = iterator.next();
|
||||
+ int length = match.capturedLength();
|
||||
+ int index = match.capturedStart();
|
||||
setFormat(index, length, rule.format);
|
||||
- index = expression.indexIn(text, index + length);
|
||||
}
|
||||
}
|
||||
-
|
||||
- setCurrentBlockState(0);
|
||||
+
|
||||
+// Es scheint, als wäre der restliche Block obsolet ....
|
||||
+/* setCurrentBlockState(0);
|
||||
|
||||
int startIndex = 0;
|
||||
if (previousBlockState() != 1) startIndex = commentStartExpression.indexIn(text);
|
||||
@@ -94,10 +97,9 @@ void highlighter::highlightBlock(const QString &text)
|
||||
setCurrentBlockState(1);
|
||||
commentLength = text.length() - startIndex;
|
||||
} else {
|
||||
- commentLength = endIndex - startIndex
|
||||
- + commentEndExpression.matchedLength();
|
||||
+ commentLength = endIndex - startIndex + commentEndExpression.matchedLength();
|
||||
}
|
||||
startIndex = commentStartExpression.indexIn(text, startIndex + commentLength);
|
||||
- }
|
||||
+ }*/
|
||||
}
|
||||
//
|
||||
diff --git a/src/highlighter.h b/src/highlighter.h
|
||||
index 93782c9..b7aa26f 100644
|
||||
--- a/src/highlighter.h
|
||||
+++ b/src/highlighter.h
|
||||
@@ -22,6 +22,7 @@
|
||||
#define HIGHLIGHTER_H
|
||||
//
|
||||
#include <QSyntaxHighlighter>
|
||||
+#include <QRegularExpression>
|
||||
//
|
||||
class highlighter : public QSyntaxHighlighter
|
||||
{
|
||||
@@ -34,14 +35,13 @@ public:
|
||||
private:
|
||||
struct HighlightingRule
|
||||
{
|
||||
- QRegExp pattern;
|
||||
+ QRegularExpression pattern;
|
||||
QTextCharFormat format;
|
||||
};
|
||||
-
|
||||
QVector<HighlightingRule> highlightingRules;
|
||||
|
||||
- QRegExp commentStartExpression;
|
||||
- QRegExp commentEndExpression;
|
||||
+ QRegularExpression commentStartExpression;
|
||||
+ QRegularExpression commentEndExpression;
|
||||
|
||||
QTextCharFormat keywordFormat;
|
||||
QTextCharFormat classFormat;
|
||||
@@ -1,22 +0,0 @@
|
||||
diff -Nuar a/src/qroundprogressbar.cpp b/src/qroundprogressbar.cpp
|
||||
--- a/src/qroundprogressbar.cpp 2018-03-10 14:17:40.000000000 +0300
|
||||
+++ b/src/qroundprogressbar.cpp 2021-02-01 11:19:45.693950956 +0300
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "qroundprogressbar.h"
|
||||
|
||||
#include <QtGui/QPainter>
|
||||
+#include <QPainterPath>
|
||||
|
||||
|
||||
QRoundProgressBar::QRoundProgressBar(QWidget *parent) :
|
||||
diff -Nuar a/src/qroundprogressbar.h b/src/qroundprogressbar.h
|
||||
--- a/src/qroundprogressbar.h 2018-03-10 14:17:40.000000000 +0300
|
||||
+++ b/src/qroundprogressbar.h 2021-02-01 11:18:48.379955092 +0300
|
||||
@@ -20,6 +20,7 @@
|
||||
#define QROUNDPROGRESSBAR_H
|
||||
|
||||
#include <QWidget>
|
||||
+#include <QPainterPath>
|
||||
|
||||
/**
|
||||
* @brief The QRoundProgressBar class represents a circular progress bar and maintains its API
|
||||
@@ -1,24 +1,26 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
|
||||
<!DOCTYPE PISI SYSTEM "https://pisilinux.org/projeler/pisi/pisi-spec.dtd">
|
||||
<PISI>
|
||||
<Source>
|
||||
<Name>clamav-gui</Name>
|
||||
<Homepage>https://github.com/wusel1007/clamav-gui</Homepage>
|
||||
<Packager>
|
||||
<Name>Ali Cengiz Kurt</Name>
|
||||
<Email>alicengizkurt@gmail.com</Email>
|
||||
<Name>Kamil Atlı</Name>
|
||||
<Email>suvari@pisilinux.org</Email>
|
||||
</Packager>
|
||||
<License>GPLv3+</License>
|
||||
<IsA>app:gui</IsA>
|
||||
<Summary>ClamAV-Gui.</Summary>
|
||||
<Description>ClamAV-Gui is a graphical interface for ClamAV antivirus software</Description>
|
||||
<License>GPL3</License>
|
||||
<Archive sha1sum="fcb6371f35160237805a4808968c52c30fd4e51e" type="targz">https://sourceforge.net/projects/pisilinux/files/source/ClamAV-GUI-0.4.2.tgz/download</Archive>
|
||||
<License>GPLv3</License>
|
||||
<PartOf>util.anivirus</PartOf>
|
||||
<Summary>Front-End for ClamAV.</Summary>
|
||||
<Description>ClamAV-Gui is a graphical interface for ClamAV antivirus software.</Description>
|
||||
<Archive sha1sum="faa16c489b0e73133c83500a1802827ee0fe1d4a" type="targz">https://github.com/wusel1007/clamav-gui/archive/v1.1.3/clamav-gui-1.1.3.tar.gz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>clamav-devel</Dependency>
|
||||
<Dependency>qt5-base-devel</Dependency>
|
||||
<Dependency>qt6-base-devel</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<Patch level="1">qt5.patch</Patch>
|
||||
<!-- <Patch level="1"></Patch> -->
|
||||
<Patch level="1">qregexp.patch</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
@@ -27,20 +29,23 @@
|
||||
<Icon>clamav-gui</Icon>
|
||||
<RuntimeDependencies>
|
||||
<Dependency>clamav</Dependency>
|
||||
<Dependency>qt5-base</Dependency>
|
||||
<Dependency>libgcc</Dependency>
|
||||
<Dependency>qt6-base</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="executable">/usr/bin</Path>
|
||||
<Path fileType="data">/usr/share/icons</Path>
|
||||
<Path fileType="data">/usr/share/applications</Path>
|
||||
<Path fileType="doc">/usr/share/doc</Path>
|
||||
<Path fileType="manfile">/usr/share/man</Path>
|
||||
<Path fileType="pofile">/usr/share/clamav-gui</Path>
|
||||
<Path fileType="data">/usr/share</Path>
|
||||
</Files>
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="3">
|
||||
<Date>2025-04-19</Date>
|
||||
<Version>1.1.3</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Kamil Atlı</Name>
|
||||
<Email>suvari@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="2">
|
||||
<Date>2021-01-31</Date>
|
||||
<Version>0.4.2</Version>
|
||||
|
||||
Reference in New Issue
Block a user