Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package dtkgui for openSUSE:Factory checked in at 2022-09-01 22:10:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/dtkgui (Old) and /work/SRC/openSUSE:Factory/.dtkgui.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dtkgui" Thu Sep 1 22:10:25 2022 rev:7 rq:1000258 version:5.5.25 Changes: -------- --- /work/SRC/openSUSE:Factory/dtkgui/dtkgui.changes 2022-04-22 21:54:53.858849984 +0200 +++ /work/SRC/openSUSE:Factory/.dtkgui.new.2083/dtkgui.changes 2022-09-01 22:11:24.400282811 +0200 @@ -1,0 +2,12 @@ +Fri Aug 26 12:36:47 UTC 2022 - Hillwood Yang <[email protected]> + +- Update version to 5.5.25 + * Fix dock radius changed when set global windowradius + +------------------------------------------------------------------- +Sat Jun 25 09:06:57 UTC 2022 - Hillwood Yang <[email protected]> + +- Update version to 5.5.24 + * Fix bugs + +------------------------------------------------------------------- Old: ---- dtkgui-5.5.22.tar.gz New: ---- dtkgui-5.5.25.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dtkgui.spec ++++++ --- /var/tmp/diff_new_pack.FWuMKn/_old 2022-09-01 22:11:24.940284287 +0200 +++ /var/tmp/diff_new_pack.FWuMKn/_new 2022-09-01 22:11:24.944284298 +0200 @@ -22,7 +22,7 @@ # %define pkg_ver 5.5 Name: dtkgui -Version: 5.5.22 +Version: 5.5.25 Release: 0 Summary: Deepin Toolkit GUI License: LGPL-3.0 @@ -41,6 +41,7 @@ BuildRequires: pkgconfig(Qt5Network) BuildRequires: pkgconfig(Qt5X11Extras) BuildRequires: pkgconfig(Qt5Widgets) +# BuildRequires: pkgconfig(Qt5XdgIconLoader) BuildRequires: pkgconfig(librsvg-2.0) BuildRequires: libQt5PlatformSupport-private-headers-devel BuildRequires: libQt5Gui-private-headers-devel @@ -91,7 +92,6 @@ %{_libdir}/libdtk-%{apiver}/DGui/bin/deepin-gui-settings %{_libdir}/libdtk-%{apiver}/DGui/bin/dde-kwin-debug %{_libdir}/libdtk-%{apiver}/DGui/bin/dnd-test-* -# %{_libdir}/libdtk-%{apiver}/DGui/bin/taskbar %files -n lib%{name}%{libver} %{_libdir}/lib%{name}.so.* ++++++ dtkgui-5.5.22.tar.gz -> dtkgui-5.5.25.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dtkgui-5.5.22/.github/workflows/backup-to-gitlab.yml new/dtkgui-5.5.25/.github/workflows/backup-to-gitlab.yml --- old/dtkgui-5.5.22/.github/workflows/backup-to-gitlab.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/dtkgui-5.5.25/.github/workflows/backup-to-gitlab.yml 2022-07-19 12:28:42.000000000 +0200 @@ -0,0 +1,52 @@ +name: backup to gitlab +on: [push] + +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: true + +jobs: + backup-to-gitlab: + if: github.repository_owner == 'linuxdeepin' + name: backup-to-gitlab + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + repository: "linuxdeepin/jenkins-bridge-client" + path: jenkins-bridge-client + + - name: Install Client + run: | + cd $GITHUB_WORKSPACE/jenkins-bridge-client + go build . + sudo install -Dvm755 jenkins-bridge-client -t /usr/bin/ + - name: Trigger sync + id: generate-runid + run: | + echo "::set-output name=RUN_ID::$(jenkins-bridge-client -triggerSync -token '${{ secrets.BRIDGETOKEN }}')" + - name: Print log + run: | + jenkins-bridge-client -printlog -token "${{ secrets.BRIDGETOKEN }}" -runid "${{ steps.generate-runid.outputs.RUN_ID }}" + + backup-to-gitee: + if: github.repository_owner == 'linuxdeepin' + runs-on: ubuntu-latest + steps: + - name: create-repo + run: | + repo=${{ github.event.repository.name }} + homepage="https://github.com/linuxdeepin/${repo}" + description="mirror of ${homepage}" + # remove '.' prefix + repo=${repo#"."} + curl -X POST --header 'Content-Type: application/json;charset=UTF-8' 'https://gitee.com/api/v5/enterprises/linuxdeepin/repos' -d '{"private": 1,"access_token":"${{ secrets.GITEE_SYNC_TOKEN }}","name":"'"$repo"'","description":"'"$description"'","homepage":"'"$homepage"'","has_issues":"false","has_wiki":"false","can_comment":"false"}' || true + - name: push + run: | + git clone --bare https://github.com/linuxdeepin/${{ github.event.repository.name }}.git .git + repo=${{ github.event.repository.name }} + # remove '.' prefix + repo=${repo#"."} + git remote set-url origin https://myml:${{ secrets.GITEE_SYNC_TOKEN }}@gitee.com/linuxdeepin/${repo}.git + git push -f --all --prune origin + git push --tags origin diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dtkgui-5.5.22/.github/workflows/build.yaml new/dtkgui-5.5.25/.github/workflows/build.yaml --- old/dtkgui-5.5.22/.github/workflows/build.yaml 2021-12-09 09:03:52.000000000 +0100 +++ new/dtkgui-5.5.25/.github/workflows/build.yaml 1970-01-01 01:00:00.000000000 +0100 @@ -1,22 +0,0 @@ -name: CI Build - -on: - push: - branches: - - master - - pull_request: - branches: - - master - -jobs: - archlinux: - name: Archlinux Build Check - runs-on: ubuntu-latest - steps: - - name: Checkout branch - uses: actions/checkout@v2 - - name: build - uses: justforlxz/deepin-git-action@v1 - with: - repo: dtkgui diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dtkgui-5.5.22/.github/workflows/call-build-deb.yml new/dtkgui-5.5.25/.github/workflows/call-build-deb.yml --- old/dtkgui-5.5.22/.github/workflows/call-build-deb.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/dtkgui-5.5.25/.github/workflows/call-build-deb.yml 2022-07-19 12:28:42.000000000 +0200 @@ -0,0 +1,15 @@ +name: Call build-deb +on: + pull_request_target: + paths-ignore: + - ".github/workflows/**" + +concurrency: + group: ${{ github.workflow }}-pull/${{ github.event.number }} + cancel-in-progress: true + +jobs: + check_job: + uses: linuxdeepin/.github/.github/workflows/build-deb.yml@master + secrets: + BridgeToken: ${{ secrets.BridgeToken }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dtkgui-5.5.22/.github/workflows/call-build-distribution.yml new/dtkgui-5.5.25/.github/workflows/call-build-distribution.yml --- old/dtkgui-5.5.22/.github/workflows/call-build-distribution.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/dtkgui-5.5.25/.github/workflows/call-build-distribution.yml 2022-07-19 12:28:42.000000000 +0200 @@ -0,0 +1,17 @@ +name: Call build-distribution +on: + push: + paths-ignore: + - ".github/workflows/**" + pull_request_target: + paths-ignore: + - ".github/workflows/**" + +jobs: + check_job: + uses: linuxdeepin/.github/.github/workflows/build-distribution.yml@master + secrets: + BUILD_GPG_PRIVATE_KEY: ${{ secrets.BUILD_GPG_PRIVATE_KEY }} + BUILD_SSH_PRIVATE_KEY: ${{ secrets.BUILD_SSH_PRIVATE_KEY }} + WEBDAV_PASSWD: ${{ secrets.WEBDAV_PASSWD }} + WEBDAV_USER: ${{ secrets.WEBDAV_USER }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dtkgui-5.5.22/.github/workflows/call-chatOps.yml new/dtkgui-5.5.25/.github/workflows/call-chatOps.yml --- old/dtkgui-5.5.22/.github/workflows/call-chatOps.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/dtkgui-5.5.25/.github/workflows/call-chatOps.yml 2022-07-19 12:28:42.000000000 +0200 @@ -0,0 +1,10 @@ +name: chatOps +on: + issue_comment: + types: [created] + +jobs: + chatopt: + uses: linuxdeepin/.github/.github/workflows/chatOps.yml@master + secrets: + APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dtkgui-5.5.22/.github/workflows/call-clacheck.yml new/dtkgui-5.5.25/.github/workflows/call-clacheck.yml --- old/dtkgui-5.5.22/.github/workflows/call-clacheck.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/dtkgui-5.5.25/.github/workflows/call-clacheck.yml 2022-07-19 12:28:42.000000000 +0200 @@ -0,0 +1,16 @@ +name: Call CLA check +on: + issue_comment: + types: [created] + pull_request_target: + types: [opened, closed, synchronize] + +concurrency: + group: ${{ github.workflow }}-pull/${{ github.event.number }} + cancel-in-progress: true + +jobs: + clacheck: + uses: linuxdeepin/.github/.github/workflows/cla-check.yml@master + secrets: + APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dtkgui-5.5.22/.github/workflows/call-commitlint.yml new/dtkgui-5.5.25/.github/workflows/call-commitlint.yml --- old/dtkgui-5.5.22/.github/workflows/call-commitlint.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/dtkgui-5.5.25/.github/workflows/call-commitlint.yml 2022-07-19 12:28:42.000000000 +0200 @@ -0,0 +1,11 @@ +name: Call commitlint +on: + pull_request_target: + +concurrency: + group: ${{ github.workflow }}-pull/${{ github.event.number }} + cancel-in-progress: true + +jobs: + check_job: + uses: linuxdeepin/.github/.github/workflows/commitlint.yml@master diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dtkgui-5.5.22/.github/workflows/cppcheck.yml new/dtkgui-5.5.25/.github/workflows/cppcheck.yml --- old/dtkgui-5.5.22/.github/workflows/cppcheck.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/dtkgui-5.5.25/.github/workflows/cppcheck.yml 2022-07-19 12:28:42.000000000 +0200 @@ -0,0 +1,26 @@ +name: cppcheck +on: + pull_request_target: + paths-ignore: + - ".github/workflows/**" + +concurrency: + group: ${{ github.workflow }}-pull/${{ github.event.number }} + cancel-in-progress: true + +jobs: + cppchceck: + name: cppcheck + runs-on: ubuntu-latest + steps: + - run: export + - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} + persist-credentials: false + - uses: linuxdeepin/action-cppcheck@main + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + repository: ${{ github.repository }} + pull_request_id: ${{ github.event.pull_request.number }} + allow_approve: false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dtkgui-5.5.22/archlinux/PKGBUILD new/dtkgui-5.5.25/archlinux/PKGBUILD --- old/dtkgui-5.5.22/archlinux/PKGBUILD 1970-01-01 01:00:00.000000000 +0100 +++ new/dtkgui-5.5.25/archlinux/PKGBUILD 2022-07-19 12:28:42.000000000 +0200 @@ -0,0 +1,30 @@ +# Maintainer: justforlxz <[email protected]> +pkgname=dtkgui-git +pkgver=5.5.22.r8.g6ef1509 +pkgrel=1 +pkgdesc='Deepin Toolkit, gui module for DDE look and feel' +arch=('x86_64' 'aarch64') +url="https://github.com/linuxdeepin/dtkgui" +license=('LGPL3') +depends=('dtkcore-git' 'librsvg' 'qt5-x11extras') +makedepends=('git' 'qt5-tools' 'dtkcommon-git' 'dtkcore-git' 'librsvg' 'qt5-x11extras' 'gtest' 'gmock') +conflicts=('dtkgui') +provides=('dtkgui') +groups=('deepin-git') +source=('source.tar.gz') +sha512sums=('SKIP') + +prepare() { + cd $deepin_source_name +} + +build() { + cd $deepin_source_name + qmake-qt5 PREFIX=/usr DTK_VERSION=$pkgver LIB_INSTALL_DIR=/usr/lib + make +} + +package() { + cd $deepin_source_name + make INSTALL_ROOT="$pkgdir" install +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dtkgui-5.5.22/src/kernel/dguiapplicationhelper.cpp new/dtkgui-5.5.25/src/kernel/dguiapplicationhelper.cpp --- old/dtkgui-5.5.22/src/kernel/dguiapplicationhelper.cpp 2021-12-09 09:03:52.000000000 +0100 +++ new/dtkgui-5.5.25/src/kernel/dguiapplicationhelper.cpp 2022-07-19 12:28:42.000000000 +0200 @@ -34,6 +34,8 @@ #include <QLocalServer> #include <QLocalSocket> #include <QLoggingCategory> +#include <QDir> +#include <QLockFile> #include <private/qguiapplication_p.h> #include <qpa/qplatformservices.h> @@ -52,240 +54,8 @@ Q_LOGGING_CATEGORY(dgAppHelper, "dtk.dguihelper", QtInfoMsg) #endif -#ifdef Q_OS_LINUX -class DInstanceGuard { -public: - static bool guard(const QString &name); - static void enterCriticalSection(); - static void leaveCriticalSection(); - - class DCriticalHolder { - public: - DCriticalHolder() { - DInstanceGuard::enterCriticalSection(); - } - ~DCriticalHolder() { - DInstanceGuard::leaveCriticalSection(); - } - }; - -private: - static bool setInstanceName(const QString &name); - static void shmInit(); - static void destroy(); - static void errorExitIf(bool cond, QStringView reason); - - struct SharedVarables { - pid_t pid[2]; - pthread_mutex_t mutex[2]; - - struct { - pid_t criticalProcessPid; - pthread_mutex_t criticalSectionMtx; - } CriticalSection; - }; - - static DInstanceGuard * s_pSelf; - static QString s_name; - - static int s_shmId; - static key_t s_shmKey; - - static QVector<QString> s_procIdPath; - static SharedVarables * s_pShm; - static int s_nLock; - -private: - DInstanceGuard(); - ~DInstanceGuard() = default; - DInstanceGuard(const DInstanceGuard &) = delete; - DInstanceGuard &operator=(const DInstanceGuard &) = delete; - DInstanceGuard(DInstanceGuard &&) = delete; - DInstanceGuard &operator=(DInstanceGuard &&) = delete; -}; - -DInstanceGuard * DInstanceGuard::s_pSelf = nullptr; -QString DInstanceGuard::s_name; - -int DInstanceGuard::s_shmId = 0; -key_t DInstanceGuard::s_shmKey = 0; - -QVector<QString> DInstanceGuard::s_procIdPath; -DInstanceGuard::SharedVarables * DInstanceGuard::s_pShm = nullptr; -int DInstanceGuard::s_nLock = -1; - -/*! - \internal DInstanceGuard::DInstanceGuard ?????? DInstanceGuard ?????????????????? - - ?????????????????? name ???????????????????????????????????????????????????????????????????????????????????????????????? - pid ???????????????????????????????????? pid?????????????????? pid ??????????????????????????????????????????????????? - ?????????????????? name ???????????? Session ??? Scope ????????????????????????????????????????????? - VNC??????????????????????????????????????? - */ -DInstanceGuard::DInstanceGuard() -{ - for (int i = 0; i < 2 && s_nLock == -1; ++i) { - if (pthread_mutex_trylock(&s_pShm->mutex[i]) != 0) { - continue; - } - s_nLock = i; - s_pShm->pid[i] = getpid(); - std::atexit(destroy); - } - QString criticalProc = QString("/proc/%1").arg(s_pShm->CriticalSection.criticalProcessPid); - if (s_pShm->CriticalSection.criticalProcessPid && !QFile(criticalProc).exists()) { - pthread_mutex_unlock(&s_pShm->CriticalSection.criticalSectionMtx); - } - - errorExitIf(s_nLock == -1, u"Has two instance running."); -} - -/*! - \internal DInstanceGuard::shmInit() ????????????????????? - - ????????????????????????????????????????????????????????????????????????????????? pid??? -*/ -void DInstanceGuard::shmInit() -{ - s_shmKey = qHash(s_name); - s_procIdPath.resize(2); - - pthread_mutexattr_t mutexSharedAttr[2] = {}; - for (int i = 0; i < 2; ++i) { - pthread_mutexattr_setpshared(&mutexSharedAttr[i], PTHREAD_PROCESS_SHARED); - pthread_mutexattr_settype(&mutexSharedAttr[i], PTHREAD_MUTEX_RECURSIVE_NP); - } - - // ????????????????????????????????????????????????????????? - bool clearFlag = false; - s_shmId = shmget(s_shmKey, 0, 0666 | IPC_CREAT); - if (s_shmId == -1) { - s_shmId = shmget(s_shmKey, sizeof(SharedVarables), 0666 | IPC_CREAT); - errorExitIf(s_shmId < 0, u"Create share memory failed."); - clearFlag = true; - } - s_pShm = static_cast<SharedVarables*>(shmat(s_shmId, nullptr, 0)); - errorExitIf(!s_pShm, u"Attach share memory failed."); - if (clearFlag) memset(s_pShm, 0, sizeof(SharedVarables)); - - // ????????????/?????????????????????????????????????????????????????????mutex ???????????? - for (int i = 0; i < 2; ++i) { - s_procIdPath[i] = QString("/proc/%1").arg(s_pShm->pid[i]); - if (s_pShm->pid[i] && !QFile(s_procIdPath[i]).exists()) { - pthread_mutex_destroy(&s_pShm->mutex[i]); - pthread_mutex_init(&s_pShm->mutex[i], &mutexSharedAttr[i]); - s_pShm->pid[i] = 0; - } - pthread_mutexattr_destroy(&mutexSharedAttr[i]); - } - - // ????????????????????????????????????????????????????????? - QString criticalProcPath = QString("/proc/%1").arg(s_pShm->CriticalSection.criticalProcessPid); - if (!s_pShm->CriticalSection.criticalProcessPid || !QFile(criticalProcPath).exists()) { - // Critical section init - pthread_mutexattr_t criticalMtxSharedAttr = {}; - pthread_mutexattr_setpshared(&criticalMtxSharedAttr, PTHREAD_PROCESS_SHARED); - pthread_mutexattr_settype(&criticalMtxSharedAttr, PTHREAD_MUTEX_RECURSIVE_NP); - pthread_mutex_init(&s_pShm->CriticalSection.criticalSectionMtx, &criticalMtxSharedAttr); - pthread_mutexattr_destroy(&criticalMtxSharedAttr); - } -} - -/*! - \internal - \brief ??????????????? - - ????????????????????????????????????????????? -*/ -bool DInstanceGuard::setInstanceName(const QString &name) -{ - errorExitIf(name.isEmpty(), u"Set instance name error..."); - if (!s_name.isEmpty()) { - qCWarning(dgAppHelper, "Set instance name failed. already has a name..."); - return false; - } - s_name = name; - - return true; -} - -/*! - \internal - \brief ?????? DInstanceGuard ?????? - - ?????? name ??????????????????????????? name ???????????????????????????????????????????????????????????????????????????????????????????????? - ?????????????????????????????????????????????????????????????????? DGuiApplicationHelper::setSingleInstance ?????? - ??????????????? - */ -bool DInstanceGuard::guard(const QString &name) -{ - static std::once_flag initFlag; - bool retValue = false; - std::call_once(initFlag, [name, &retValue] { - retValue = setInstanceName(name); - shmInit(); - s_pSelf = s_pSelf ? s_pSelf : new DInstanceGuard(); - }); - - return retValue; -} - -/*! - \internal DInstanceGuard::destroy() ?????????????????? - - ??????????????????????????????????????? atexit ?????????????????????????????????????????????????????????????????????????????? - */ -void DInstanceGuard::destroy() -{ - if (!s_pSelf) { - return; - } - - bool shmRelease = false; - int anotherProc = !s_nLock; - if (!QFile(s_procIdPath[anotherProc]).exists()) { - shmRelease = true; - pthread_mutex_unlock(&s_pShm->mutex[anotherProc]); - } - pthread_mutex_unlock(&s_pShm->mutex[s_nLock]); - if (s_pShm->CriticalSection.criticalProcessPid == getpid()) { - s_pShm->CriticalSection.criticalProcessPid = 0; - pthread_mutex_unlock(&s_pShm->CriticalSection.criticalSectionMtx); - } - if (shmRelease) { - shmctl(s_shmId, IPC_RMID, nullptr); - } - - delete s_pSelf; - s_pSelf = nullptr; -} - -/*! - \internal - ?????????????????? ??? Guard ????????? name ??????????????????????????????????????????????????????????????? Guard??? - ???????????????????????????????????????????????????????????? scope??????????????????????????????????????? - ?????? DGuiApplicationHelper::setSingleInstance ????????????????????????????????? -*/ -void DInstanceGuard::enterCriticalSection() { - errorExitIf(s_name.isEmpty() || !s_pSelf, u"Enter critical section failed. must set instance name first."); - if (pthread_mutex_lock(&s_pShm->CriticalSection.criticalSectionMtx) == 0) { - s_pShm->CriticalSection.criticalProcessPid = getpid(); - } -} - -void DInstanceGuard::leaveCriticalSection() { - pthread_mutex_unlock(&s_pShm->CriticalSection.criticalSectionMtx); -} - -void DInstanceGuard::errorExitIf(bool cond, QStringView reason) { - if (cond) { - qCWarning(dgAppHelper) << reason << " should exit program."; - qFatal("Error: DInstanceGuard::errorExitIf."); - } -} -#endif - Q_GLOBAL_STATIC(QLocalServer, _d_singleServer) + static quint8 _d_singleServerVersion = 1; Q_GLOBAL_STATIC(DFontManager, _globalFM) @@ -708,7 +478,7 @@ QColor(255, 255, 255, 255 * 0.05), //ItemBackground QColor("#C0C6D4"), //TextTitle QColor("#6D7C88"), //TextTips - QColor("#9a2f2f"), //TextWarning + QColor("#E43F2E"), //TextWarning Qt::white, //TextLively QColor("#0059d2"), //LightLively QColor("#0059d2"), //DarkLively @@ -1371,42 +1141,54 @@ } socket_key += key; - -#ifdef Q_OS_LINUX - // for bug: ??????????????????????????????????????????. ???????????????????????????. - static bool multiCallFlag = false; - if (!multiCallFlag && !DInstanceGuard::guard(socket_key)) { - return false; - } - - multiCallFlag = true; - DInstanceGuard::DCriticalHolder holder; -#endif - - // ?????????????????? - QLocalSocket socket; - socket.connectToServer(socket_key); - - // ??????????????????????????????server???????????? - if (socket.waitForConnected(DGuiApplicationHelperPrivate::waitTime) && socket.waitForReadyRead(DGuiApplicationHelperPrivate::waitTime)) { - // ???????????? - qint8 version; - qint64 pid; - QStringList arguments; - - QDataStream ds(&socket); - ds >> version >> pid >> arguments; - qInfo() << "Process is started: pid=" << pid << "arguments=" << arguments; - - // ??????????????????????????????????????? - ds << _d_singleServerVersion << qApp->applicationPid() << qApp->arguments(); - socket.flush(); + QString lockfile = socket_key; + if (!lockfile.startsWith(QLatin1Char('/'))) { + lockfile = QDir::cleanPath(QDir::tempPath()); + lockfile += QLatin1Char('/') + socket_key; + } + lockfile += QStringLiteral(".lock"); + static QScopedPointer <QLockFile> lock(new QLockFile(lockfile)); + // ??????????????????????????????????????????????????????????????? key + // FIX dcc ??????????????? key ???????????? setSingleInstance ???????????????????????? + qint64 pid = -1; + QString hostname, appname; + if (lock->isLocked() && lock->getLockInfo(&pid, &hostname, &appname) && pid == getpid()) { + qCWarning(dgAppHelper) << "call setSingleInstance again within the same process"; + lock->unlock(); + lock.reset(new QLockFile(lockfile)); + } + + if (!lock->tryLock()) { + qCDebug(dgAppHelper) << "===> new client <===" << getpid(); + // ?????????????????? + QLocalSocket socket; + socket.connectToServer(socket_key); + + // ??????????????????????????????server???????????? + if (socket.waitForConnected(DGuiApplicationHelperPrivate::waitTime) && + socket.waitForReadyRead(DGuiApplicationHelperPrivate::waitTime)) { + // ???????????? + qint8 version; + qint64 pid; + QStringList arguments; + + QDataStream ds(&socket); + ds >> version >> pid >> arguments; + qCInfo(dgAppHelper) << "Process is started: pid=" << pid << "arguments=" << arguments; + + // ??????????????????????????????????????? + ds << _d_singleServerVersion << qApp->applicationPid() << qApp->arguments(); + socket.flush(); + } return false; } if (!_d_singleServer->listen(socket_key)) { + qCWarning(dgAppHelper) << "listen failed:" << _d_singleServer->errorString(); return false; + } else { + qCDebug(dgAppHelper) << "===> listen <===" << _d_singleServer->serverName() << getpid(); } if (new_server) { @@ -1429,7 +1211,7 @@ ds >> version >> pid >> arguments; instance->close(); - qInfo() << "New instance: pid=" << pid << "arguments=" << arguments; + qCInfo(dgAppHelper) << "New instance: pid=" << pid << "arguments=" << arguments; // ???????????????????????? if (_globalHelper.exists() && _globalHelper->m_helper.load()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dtkgui-5.5.22/src/kernel/dplatformhandle.cpp new/dtkgui-5.5.25/src/kernel/dplatformhandle.cpp --- old/dtkgui-5.5.22/src/kernel/dplatformhandle.cpp 2021-12-09 09:03:52.000000000 +0100 +++ new/dtkgui-5.5.25/src/kernel/dplatformhandle.cpp 2022-07-19 12:28:42.000000000 +0200 @@ -57,6 +57,13 @@ DEFINE_CONST_CHAR(windowWallpaperParas); DEFINE_CONST_CHAR(autoInputMaskByClipPath); +DEFINE_CONST_CHAR(resolve_mask); +enum PropRole { + WindowRadius, + + // TO BE CONTINUE +}; + // functions DEFINE_CONST_CHAR(setWmBlurWindowBackgroundArea); DEFINE_CONST_CHAR(setWmBlurWindowBackgroundPathList); @@ -71,6 +78,18 @@ DEFINE_CONST_CHAR(isEnableNoTitlebar); DEFINE_CONST_CHAR(clientLeader); +static void resolve(QObject *obj, PropRole role) +{ + int mask = obj->property(_resolve_mask).toInt(); + obj->setProperty(_resolve_mask, (mask |= 1 << role)); +} + +static bool resolved(QObject *obj, PropRole role) +{ + int mask = obj->property(_resolve_mask).toInt(); + return mask & (1 << role); +} + static void setWindowProperty(QWindow *window, const char *name, const QVariant &value) { if (!window) @@ -590,7 +609,8 @@ setWindowProperty(window, _windowRadius, radius); window->connect(theme, &DPlatformTheme::windowRadiusChanged, window, [=] (int radius) { - setWindowProperty(window, _windowRadius, radius); + if (!resolved(window, PropRole::WindowRadius)) + setWindowProperty(window, _windowRadius, radius); }, Qt::UniqueConnection); } @@ -1136,6 +1156,7 @@ void DPlatformHandle::setWindowRadius(int windowRadius) { setWindowProperty(m_window, _windowRadius, windowRadius); + resolve(m_window, PropRole::WindowRadius); } void DPlatformHandle::setBorderWidth(int borderWidth) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dtkgui-5.5.22/src/src.pro new/dtkgui-5.5.25/src/src.pro --- old/dtkgui-5.5.22/src/src.pro 2021-12-09 09:03:52.000000000 +0100 +++ new/dtkgui-5.5.25/src/src.pro 2022-07-19 12:28:42.000000000 +0200 @@ -7,7 +7,7 @@ contains(QMAKE_HOST.arch, mips.*): QMAKE_LFLAGS_SHLIB += "-Wl,-z,noexecstack" # don't link library -QMAKE_CXXFLAGS += $$system(pkg-config --cflags-only-I librsvg-2.0) +QMAKE_CXXFLAGS += $$system($$pkgConfigExecutable() --cflags-only-I librsvg-2.0) INCLUDEPATH += \ $$PWD/filedrag \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dtkgui-5.5.22/tests/test-recoverage.sh new/dtkgui-5.5.25/tests/test-recoverage.sh --- old/dtkgui-5.5.22/tests/test-recoverage.sh 2021-12-09 09:03:52.000000000 +0100 +++ new/dtkgui-5.5.25/tests/test-recoverage.sh 2022-07-19 12:28:42.000000000 +0200 @@ -1,7 +1,8 @@ #!/bin/bash -BUILD_DIR=build -REPORT_DIR=report +BUILD_DIR=`pwd`/../build-ut +HTML_DIR=${BUILD_DIR}/html +XML_DIR=${BUILD_DIR}/report cd ../ rm -rf $BUILD_DIR @@ -16,15 +17,15 @@ cd $BUILD_DIR qmake .. CONFIG+=debug export ASAN_OPTIONS=halt_on_error=0 -TESTARGS="--gtest_output=xml:dde_test_report_dtkgui.xml" make check -j$(nproc) +TESTARGS="--gtest_output=xml:${XML_DIR}/report_dtkgui.xml" make check -j$(nproc) lcov -d ./ -c -o coverage_all.info #lcov --extract coverage_all.info $EXTRACT_ARGS --output-file coverage.info -lcov --remove coverage_all.info "*/tests/*" "*/usr/include*" "*build/src*" --output-file coverage.info +lcov --remove coverage_all.info "*/tests/*" "*/usr/include*" "*build-ut/src*" --output-file coverage.info cd .. -genhtml -o $REPORT_DIR $BUILD_DIR/coverage.info +genhtml -o $HTML_DIR $BUILD_DIR/coverage.info && mv ${BUILD_DIR}/html/index.html ${BUILD_DIR}/html/cov_dtkgui.html -mv ./build/asan.log* ./build/asan_dtkgui.log +test -e ${BUILD_DIR}/asan.log* && mv ${BUILD_DIR}/asan.log* ${BUILD_DIR}/asan_dtkgui.log || touch ${BUILD_DIR}/asan_dtkgui.log #rm -rf $BUILD_DIR #rm -rf ../$BUILD_DIR ++++++ fix-library-link.patch ++++++ --- /var/tmp/diff_new_pack.FWuMKn/_old 2022-09-01 22:11:25.048284582 +0200 +++ /var/tmp/diff_new_pack.FWuMKn/_new 2022-09-01 22:11:25.052284593 +0200 @@ -1,9 +1,9 @@ -diff -Nur dtkgui-5.4.13/src/src.pro dtkgui-5.4.13-new/src/src.pro ---- dtkgui-5.4.13/src/src.pro 2021-03-24 14:29:42.000000000 +0800 -+++ dtkgui-5.4.13-new/src/src.pro 2021-05-05 17:31:38.943722934 +0800 +diff -Nur dtkgui-5.5.24/src/src.pro dtkgui-5.5.24-new/src/src.pro +--- dtkgui-5.5.24/src/src.pro 2022-06-06 14:53:24.000000000 +0800 ++++ dtkgui-5.5.24-new/src/src.pro 2022-06-25 17:10:54.071182664 +0800 @@ -9,6 +9,8 @@ # don't link library - QMAKE_CXXFLAGS += $$system(pkg-config --cflags-only-I librsvg-2.0) + QMAKE_CXXFLAGS += $$system($$pkgConfigExecutable() --cflags-only-I librsvg-2.0) +LIBS += -lglib-2.0 +
