diff --git a/.travis.yml b/.travis.yml index 2c195093..115b1889 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,24 +1,36 @@ language: cpp -dist: trusty +dist: bionic sudo: required os: - linux - osx - + +addons: + apt: + sources: + - ppa:chris-lea/redis-server + packages: + - redis-tools + - redis-server + +services: + - redis-server + install: - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update > /dev/null && brew install qt5 > /dev/null + && brew install openssl > /dev/null && export PATH=/usr/local/opt/qt5/bin/:$PATH ; fi -- pushd src && ./configure && popd -- if [ "$TRAVIS_OS_NAME" == "linux" ]; then - source /opt/qt59/bin/qt59-env.sh +- if [ "$TRAVIS_OS_NAME" == "linux" ]; then + sudo apt-get install qt5-default qtdeclarative5-dev libqt5charts5-dev libssl1.0-dev -y ; fi - qmake -v + script: - git submodule update --init --recursive - pushd tests @@ -29,12 +41,11 @@ script: pushd src && qmake && make -s -j 2 && popd ; fi + after_success: - if [ "$TRAVIS_OS_NAME" == "linux" ]; then pushd tests && sudo pip install --upgrade cpp-coveralls && coveralls -b `pwd`/unit_tests/ -r `readlink -m ./../` -e 3rdparty/ -e tests/ -E .+/moc_.* -E .+/qrc_.* -E .+/qxt.* -E .+/ui_.* ; - fi -services: - - redis-server + fi diff --git a/3rdparty/3rdparty.pri b/3rdparty/3rdparty.pri index bc7c8b44..723dcd82 100644 --- a/3rdparty/3rdparty.pri +++ b/3rdparty/3rdparty.pri @@ -25,64 +25,20 @@ if(win32*):exists( $$PWD/qredisclient/qredisclient.lib ) { #PyOtherSide include($$PWD/pyotherside.pri) -# Google breakpad -BREAKPADDIR = $$PWD/gbreakpad/src -DEPENDPATH += $$BREAKPADDIR - -INCLUDEPATH += $$BREAKPADDIR/ -INCLUDEPATH += $$BREAKPADDIR/src - -#breakpad app need debug info inside binaries -win32-msvc* { - QMAKE_CXXFLAGS += /MP - QMAKE_LFLAGS_RELEASE += /MAP - QMAKE_CFLAGS_RELEASE += /Zi - QMAKE_LFLAGS_RELEASE += /debug /opt:ref -} else { - QMAKE_CXXFLAGS+=-g - QMAKE_CFLAGS_RELEASE+=-g -} - -win32* { - win32-g++ { - # Workaround for mingw - QMAKE_LFLAGS_RELEASE= - } - - HEADERS += $$BREAKPADDIR/common/windows/string_utils-inl.h - HEADERS += $$BREAKPADDIR/common/windows/guid_string.h - HEADERS += $$BREAKPADDIR/client/windows/handler/exception_handler.h - HEADERS += $$BREAKPADDIR/client/windows/common/ipc_protocol.h - HEADERS += $$BREAKPADDIR/google_breakpad/common/minidump_format.h - HEADERS += $$BREAKPADDIR/google_breakpad/common/breakpad_types.h - HEADERS += $$BREAKPADDIR/client/windows/crash_generation/crash_generation_client.h - HEADERS += $$BREAKPADDIR/common/scoped_ptr.h - SOURCES += $$BREAKPADDIR/client/windows/handler/exception_handler.cc - SOURCES += $$BREAKPADDIR/common/windows/string_utils.cc - SOURCES += $$BREAKPADDIR/common/windows/guid_string.cc - SOURCES += $$BREAKPADDIR/client/windows/crash_generation/crash_generation_client.cc +win32* { ZLIBDIR = $$PWD/zlib-msvc14-x64.1.2.11.7795/build/native INCLUDEPATH += $$ZLIBDIR/include LIBS += $$ZLIBDIR/lib_release/zlibstatic.lib } unix:macx { # OSX - PRE_TARGETDEPS += $$PWD/../build/gbreakpad/Products/Release/Breakpad.framework - LIBS += $$PWD/../build/gbreakpad/Products/Release/Breakpad.framework/Versions/A/Breakpad LIBS += /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation LIBS += /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices LIBS += -lz - - #deployment - APP_DATA_FILES.files = $$PWD/../build/gbreakpad/Products/Release/Breakpad.framework - APP_DATA_FILES.path = Contents/Frameworks - QMAKE_BUNDLE_DATA += APP_DATA_FILES } -unix:!macx { # ubuntu & debian - QMAKE_CXXFLAGS += -std=gnu++0x #workaround for google breakpad - +unix:!macx { # ubuntu & debian defined(CLEAN_RPATH, var) { # clean default flags message("DEB package build") QMAKE_LFLAGS_RPATH= @@ -93,15 +49,5 @@ unix:!macx { # ubuntu & debian #QMAKE_LFLAGS = -Wl,-rpath=/home/user/Qt5.9.3/5.9.3/gcc_64/lib } - LIBS += $$BREAKPADDIR/client/linux/libbreakpad_client.a -lz - - # Unix signal watcher - defined(LINUX_SIGNALS, var) { - DEFINES += LINUX_SIGNALS - - HEADERS += $$PWD/qt-unix-signals/sigwatch.h - HEADERS += $$PWD/qt-unix-signals/sigwatch_p.h - SOURCES += $$PWD/qt-unix-signals/sigwatch.cpp - INCLUDEPATH += $$PWD/qt-unix-signals/ - } + LIBS += -lz } diff --git a/3rdparty/crashreporter b/3rdparty/crashreporter deleted file mode 160000 index 0202f9b5..00000000 --- a/3rdparty/crashreporter +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0202f9b5bc40b071e4bbcb8724cd30a2c2d219cf diff --git a/3rdparty/gbreakpad b/3rdparty/gbreakpad deleted file mode 160000 index 4a6d7c70..00000000 --- a/3rdparty/gbreakpad +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4a6d7c70cc5a007bbd8de2f5a2e226b212e3256f diff --git a/3rdparty/pyotherside.pri b/3rdparty/pyotherside.pri index e7a5638a..a98930fa 100644 --- a/3rdparty/pyotherside.pri +++ b/3rdparty/pyotherside.pri @@ -38,10 +38,6 @@ INCLUDEPATH += $$PWD/pyotherside/src PYOTHERSIDE_DIR = $$PWD/pyotherside/src/ -# QML Image Provider -SOURCES += $$PYOTHERSIDE_DIR/qpython_imageprovider.cpp -HEADERS += $$PYOTHERSIDE_DIR/qpython_imageprovider.h - # Importer from Qt Resources RESOURCES += $$PYOTHERSIDE_DIR/qrc_importer.qrc diff --git a/3rdparty/qt-unix-signals b/3rdparty/qt-unix-signals deleted file mode 160000 index d6a1d120..00000000 --- a/3rdparty/qt-unix-signals +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d6a1d12053c4176d1f693fa083752004c3023bce diff --git a/build/common_functions b/build/common_functions deleted file mode 100644 index dd1c5a8a..00000000 --- a/build/common_functions +++ /dev/null @@ -1,198 +0,0 @@ -#!/usr/bin/env bash -# $RDM_DIR should be defined - -# RDM Functions -# ================ - -DEPS_DIR=$RDM_DIR/3rdparty/ - -function build_breakpad { - cd $DEPS_DIR/gbreakpad/ - git clone --depth 1 -v git@github.com:RedisDesktop/linux-syscall-support.git src/third_party/lss \ - || git clone --depth 1 https://github.com/RedisDesktop/linux-syscall-support.git src/third_party/lss \ - || true - if [ ! -d "src/third_party/lss" ]; then - echo "Cannot clone linux-syscall-support repo" - exit 2 - fi - touch README - ./configure - make -s -j 2 -} - -function build_libssh2 { - if [ -d "$DEPS_DIR/qredisclient/3rdparty/qsshclient" ]; then - pushd $DEPS_DIR/qredisclient/3rdparty/qsshclient && ./configure && popd - fi -} - -function print_line { - echo "====================================================================" -} - - -function print_title { - print_line - echo ${1} - print_line -} - -function is_ppa_installed { - for APT in `find /etc/apt/ -name \*.list`; do - grep -o "^deb http://ppa.launchpad.net/[a-z0-9\-]\+/[a-z0-9\-]\+" $APT | while read ENTRY ; do - USER=`echo $ENTRY | cut -d/ -f4` - PPA=`echo $ENTRY | cut -d/ -f5` - if [ "${1}" == "$USER/$PPA" ]; then - return 1 - fi - done - done - - return 0 -} - -# Distro Functions -# ================ - -# Determine OS Vendor, Release and Update -# Tested with OS/X, Ubuntu, RedHat, CentOS, Fedora -# Returns results in global variables: -# ``os_VENDOR`` - vendor name: ``Ubuntu``, ``Fedora``, etc -# ``os_RELEASE`` - major release: ``14.04`` (Ubuntu), ``20`` (Fedora) -# ``os_UPDATE`` - update: ex. the ``5`` in ``RHEL6.5`` -# ``os_PACKAGE`` - package type: ``deb`` or ``rpm`` -# ``os_CODENAME`` - vendor's codename for release: ``snow leopard``, ``trusty`` -os_VENDOR="" -os_RELEASE="" -os_UPDATE="" -os_PACKAGE="" -os_CODENAME="" - -# GetOSVersion -function GetOSVersion { - - # Figure out which vendor we are - if [[ -x "`which sw_vers 2>/dev/null`" ]]; then - # OS/X - os_VENDOR=`sw_vers -productName` - os_RELEASE=`sw_vers -productVersion` - os_UPDATE=${os_RELEASE##*.} - os_RELEASE=${os_RELEASE%.*} - os_PACKAGE="" - if [[ "$os_RELEASE" =~ "10.7" ]]; then - os_CODENAME="lion" - elif [[ "$os_RELEASE" =~ "10.6" ]]; then - os_CODENAME="snow leopard" - elif [[ "$os_RELEASE" =~ "10.5" ]]; then - os_CODENAME="leopard" - elif [[ "$os_RELEASE" =~ "10.4" ]]; then - os_CODENAME="tiger" - elif [[ "$os_RELEASE" =~ "10.3" ]]; then - os_CODENAME="panther" - else - os_CODENAME="" - fi - elif [[ -x $(which lsb_release 2>/dev/null) ]]; then - os_VENDOR=$(lsb_release -i -s) - os_RELEASE=$(lsb_release -r -s) - os_UPDATE="" - os_PACKAGE="rpm" - if [[ "Debian,Ubuntu,LinuxMint,elementary" =~ $os_VENDOR ]]; then - os_PACKAGE="deb" - elif [[ "SUSE LINUX" =~ $os_VENDOR ]]; then - lsb_release -d -s | grep -q openSUSE - if [[ $? -eq 0 ]]; then - os_VENDOR="openSUSE" - fi - elif [[ $os_VENDOR == "openSUSE project" ]]; then - os_VENDOR="openSUSE" - elif [[ $os_VENDOR =~ Red.*Hat ]]; then - os_VENDOR="Red Hat" - fi - os_CODENAME=$(lsb_release -c -s) - elif [[ -r /etc/redhat-release ]]; then - # Red Hat Enterprise Linux Server release 5.5 (Tikanga) - # Red Hat Enterprise Linux Server release 7.0 Beta (Maipo) - # CentOS release 5.5 (Final) - # CentOS Linux release 6.0 (Final) - # Fedora release 16 (Verne) - # XenServer release 6.2.0-70446c (xenenterprise) - # Oracle Linux release 7 - os_CODENAME="" - for r in "Red Hat" CentOS Fedora XenServer; do - os_VENDOR=$r - if [[ -n "`grep \"$r\" /etc/redhat-release`" ]]; then - ver=`sed -e 's/^.* \([0-9].*\) (\(.*\)).*$/\1\|\2/' /etc/redhat-release` - os_CODENAME=${ver#*|} - os_RELEASE=${ver%|*} - os_UPDATE=${os_RELEASE##*.} - os_RELEASE=${os_RELEASE%.*} - break - fi - os_VENDOR="" - done - if [ "$os_VENDOR" = "Red Hat" ] && [[ -r /etc/oracle-release ]]; then - os_VENDOR=OracleLinux - fi - os_PACKAGE="rpm" - elif [[ -r /etc/SuSE-release ]]; then - for r in openSUSE "SUSE Linux"; do - if [[ "$r" = "SUSE Linux" ]]; then - os_VENDOR="SUSE LINUX" - else - os_VENDOR=$r - fi - - if [[ -n "`grep \"$r\" /etc/SuSE-release`" ]]; then - os_CODENAME=`grep "CODENAME = " /etc/SuSE-release | sed 's:.* = ::g'` - os_RELEASE=`grep "VERSION = " /etc/SuSE-release | sed 's:.* = ::g'` - os_UPDATE=`grep "PATCHLEVEL = " /etc/SuSE-release | sed 's:.* = ::g'` - break - fi - os_VENDOR="" - done - os_PACKAGE="rpm" - # If lsb_release is not installed, we should be able to detect Debian OS - elif [[ -f /etc/debian_version ]] && [[ $(cat /proc/version) =~ "Debian" ]]; then - os_VENDOR="Debian" - os_PACKAGE="deb" - os_CODENAME=$(awk '/VERSION=/' /etc/os-release | sed 's/VERSION=//' | sed -r 's/\"|\(|\)//g' | awk '{print $2}') - os_RELEASE=$(awk '/VERSION_ID=/' /etc/os-release | sed 's/VERSION_ID=//' | sed 's/\"//g') - fi - export os_VENDOR os_RELEASE os_UPDATE os_PACKAGE os_CODENAME -} - -# Translate the OS version values into common nomenclature -# Sets global ``DISTRO`` from the ``os_*`` values -declare DISTRO - -function GetDistro { - GetOSVersion - if [[ "$os_VENDOR" =~ (Ubuntu) || "$os_VENDOR" =~ (Debian) ]]; then - # 'Everyone' refers to Ubuntu / Debian releases by the code name adjective - DISTRO=$os_CODENAME - elif [[ "$os_VENDOR" =~ (Fedora) ]]; then - # For Fedora, just use 'f' and the release - DISTRO="f$os_RELEASE" - elif [[ "$os_VENDOR" =~ (openSUSE) ]]; then - DISTRO="opensuse-$os_RELEASE" - elif [[ "$os_VENDOR" =~ (SUSE LINUX) ]]; then - # For SLE, also use the service pack - if [[ -z "$os_UPDATE" ]]; then - DISTRO="sle${os_RELEASE}" - else - DISTRO="sle${os_RELEASE}sp${os_UPDATE}" - fi - elif [[ "$os_VENDOR" =~ (Red Hat) || \ - "$os_VENDOR" =~ (CentOS) || \ - "$os_VENDOR" =~ (OracleLinux) ]]; then - # Drop the . release as we assume it's compatible - DISTRO="rhel${os_RELEASE::1}" - elif [[ "$os_VENDOR" =~ (XenServer) ]]; then - DISTRO="xs$os_RELEASE" - else - # Catch-all for now is Vendor + Release + Update - DISTRO="$os_VENDOR-$os_RELEASE.$os_UPDATE" - fi - export DISTRO -} diff --git a/build/debian/changelog b/build/debian/changelog deleted file mode 100644 index 60a976a7..00000000 --- a/build/debian/changelog +++ /dev/null @@ -1,5 +0,0 @@ -redis-desktop-manager (0.0.0) unstable; urgency=low - - * Release 0.0.0 - - -- glide Fri, 20 Sep 2013 13:00:54 -0400 diff --git a/build/debian/compat b/build/debian/compat deleted file mode 100644 index ec635144..00000000 --- a/build/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/build/debian/control b/build/debian/control deleted file mode 100644 index 0e27b741..00000000 --- a/build/debian/control +++ /dev/null @@ -1,15 +0,0 @@ -Source: redis-desktop-manager -Section: devel -Priority: extra -Maintainer: glide -Build-Depends: debhelper (>= 8.0.0) -Standards-Version: 3.9.2 -Homepage: http://redisdesktop.com -Vcs-Git: git://github.com/uglide/RedisDesktopManager.git -Vcs-Browser: http://github.com/uglide/RedisDesktopManager - -Package: redis-desktop-manager -Architecture: any -Depends: ${misc:Depends}, libssl1.0.0, zlibc, libc6, libstdc++6, libx11-6, libx11-xcb1, libpng12-0, libgl1-mesa-glx, libgcc1, libicu-dev, libffi6, libpcre3, libxcb1, libglapi-mesa, libxext6, libxdamage1, libxfixes3, libxcb-glx0, libxcb-dri2-0, libxcb-dri3-0, libxcb-present0, libxcb-sync1, libxshmfence1, libxxf86vm1, libdrm2, libxau6, libxdmcp6, libssh2-1 -Description: Redis GUI Management Tool - Redis Crossplatform GUI Management Tool diff --git a/build/debian/copyright b/build/debian/copyright deleted file mode 100644 index 087565e6..00000000 --- a/build/debian/copyright +++ /dev/null @@ -1,26 +0,0 @@ -Format: http://dep.debian.net/deps/dep5 -Upstream-Name: redis-desktop-manager -Upstream-Contact: Igor Malinovskiy -Source: http://github.com/uglide/RedisDesktopManager - -Files: * -Copyright: 2015 Igor Malinovskiy -License: LGPLv2.1 - -License: LGPLv2.1 - -Copyright (c) 2013-2015 Igor Malinovskiy - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2.1 of the License, or (at your option) any later version. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with this library; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA diff --git a/build/debian/links b/build/debian/links deleted file mode 100644 index 4232259d..00000000 --- a/build/debian/links +++ /dev/null @@ -1 +0,0 @@ -usr/share/redis-desktop-manager/bin/rdm.sh usr/bin/redis-desktop-manager diff --git a/build/debian/menu b/build/debian/menu deleted file mode 100644 index c19c11ec..00000000 --- a/build/debian/menu +++ /dev/null @@ -1,4 +0,0 @@ -?package(redis-desktop-manager): needs=X11 \ - section=Applications/Development \ - title=RedisDesktopManager command=/usr/share/redis-desktop-manager/bin/rdm.sh \ - icon=/usr/share/redis-desktop-manager/bin/rdm.png diff --git a/build/debian/rules b/build/debian/rules deleted file mode 100644 index 1ba512fd..00000000 --- a/build/debian/rules +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/make -f - -%: - dh $@ - -override_dh_auto_build: - qmake "CLEAN_RPATH=true" - $(MAKE) - -override_dh_auto_install: - $(MAKE) INSTALL_ROOT=$(CURDIR)/debian/redis-desktop-manager install diff --git a/build/debian/source/format b/build/debian/source/format deleted file mode 100644 index 163aaf8d..00000000 --- a/build/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/build/utils/get_backers.py b/build/utils/get_backers.py deleted file mode 100644 index 6b3d1175..00000000 --- a/build/utils/get_backers.py +++ /dev/null @@ -1,28 +0,0 @@ -import requests - - -def get_backers_list(team_id): - - url = 'https://www.bountysource.com/backers' - - params = {'order': '+amount', - 'per_page': '1000', - 'team_id': team_id} - - headers = { - 'Accept': 'application/vnd.bountysource+json; version=2', - 'Referer': 'https://www.bountysource.com/teams' - } - - r = requests.get(url, headers=headers, params=params) - return r.json() - - -data = get_backers_list(243) - -print('## Redis Desktop Manager Backers ##', '\n') - -counter = 1 -for backer in data: - print('%s. ' % counter, backer['display_name']) - counter += 1 diff --git a/docs/faq.md b/docs/faq.md index ee83ba30..f31007d4 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -4,6 +4,3 @@ **OS X** `$HOME/Library/Preferences/rdm/connections.json` **Linux** `$HOME/.rdm/connections.json` - -## What info is sent to developers when the app crashes? -You can find answer here [https://oops.redisdesktop.com/help/](https://oops.redisdesktop.com/help/) diff --git a/docs/install.md b/docs/install.md index 7dde92c8..bb29ca4a 100644 --- a/docs/install.md +++ b/docs/install.md @@ -35,30 +35,6 @@ Since 0.9.9 RDM by default does not include SSH Tunneling support. You can create a SSH tunnel to your Redis server manually and connect to `localhost`: `ssh -L 6379:REDIS_HOST:6379 SSH_USER@SSH_HOST -P SSH_PORT -i SSH_KEY -T -N` or [use pre-built binary for your OS](#quick-install) -### Build on Linux - -#### Ubuntu (outdated) - -``` -cd src/ -./configure -qmake && make && sudo make install -cd /opt/redis-desktop-manager/ -sudo mv qt.conf qt.backup -``` - -#### Fedora & CentOS & OpenSUSE (outdated) - -``` -cd src/ -./configure -qmake-qt5 && make && sudo make install -cd /usr/share/redis-desktop-manager/bin -sudo mv qt.conf qt.backup -``` - -> !!! tip "Tip: checkinstall" - Instead of `sudo make install` consider to use `sudo checkinstall -D --install` on **deb**-based OS and `sudo checkinstall -R --install` on **rpm**-based OS to generate package and install it into the system. ### Build on OS X @@ -66,11 +42,10 @@ sudo mv qt.conf qt.backup 2. Install [Homebrew](http://brew.sh/) 3. Copy `cd ./src && cp ./resources/Info.plist.sample ./resources/Info.plist` 4. Building RDM dependencies require i.a. `openssl`, `cmake` and `python3`. Install them: `brew install openssl cmake python3` -5. Install python requirements `pip3 install -t ../bin/osx/release -r py/requirements.txt` -6. Build RDM dependencies `./configure` -7. Install [Qt 5.9](http://www.qt.io/download-open-source/#section-2). Add Qt Creator and under Qt 5.9.x add Qt Charts module. -8. Open ./src/rdm.pro in Qt Creator -9. Run build +5. Install python requirements `pip3 install -t ../bin/osx/release -r py/requirements.tx` +6. Install [Qt 5.9](http://www.qt.io/download-open-source/#section-2). Add Qt Creator and under Qt 5.9.x add Qt Charts module. +7. Open ./src/rdm.pro in Qt Creator +8. Run build ### Build on Windows diff --git a/docs/known-issues_cn.md b/docs/known-issues_cn.md deleted file mode 100644 index 06017502..00000000 --- a/docs/known-issues_cn.md +++ /dev/null @@ -1,30 +0,0 @@ -### 在VirtualBox 下出现黑屏 -删除RDM安装目录下面的 opengl32sw.dll 然后下载修复版的[opengl32sw.dll](https://github.com/uglide/RedisDesktopManager/blob/5f99aa22aa84dc55b5c9858de28d68facd1c58b7/build/windows/installer/resources/rdp_fix/opengl32.dll) 到相同目录下面。 - -### 使用Windows远程桌面出现黑屏 -你需要在 “远程桌面连接” 里面的 “显示选项/显示/颜色” 调整颜色深度为32位。 其他远程桌面软件出现黑屏, 在相应设置里面调整颜色深度至32位。 - -### 在Linux 下出现黑屏 - -RDM 从0.8.0+ 开始, 要求显卡驱动支持 OpenGL。 在命令行终端 运行`redis-desktop-manager`, 搜索以下错误: `libGL error: failed to load driver: XXX` - -也可以通过运行其他 OpenGL程序来测试 OpenGL支持, 例如: 运行 `glxgears`测试程序。 - - -**解决方案** - -重新安装或更新显卡驱动 - -### 程序启动出现 0xc000007b错误。 - -下载运行 [`vcredist_x86.exe`](https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x86.exe), 点击`修复`选项。 - -### Ubuntu (RDM 0.8.0+) 下显示不正常 - -这个问题是因为 QT Quick 组件导致。 - -### 无法在 Windows下正常启动 (RDM 0.8.6+) - -RDM 需要显卡支持驱动 OpenGL 2.1及以上。请更新显卡驱动至最新版本。 - -如果是在虚拟机运行的Windows,请启用"3D加速" 或者 "GPU 加速"。 diff --git a/snapcraft.yaml b/snapcraft.yaml deleted file mode 100644 index f6dd3f9c..00000000 --- a/snapcraft.yaml +++ /dev/null @@ -1,48 +0,0 @@ -name: redis-desktop-manager -version: 1 -summary: Redis Desktop Manager -description: Cross-platform GUI management tool for Redis - -grade: stable -confinement: devmode -base: core18 - -apps: - rdm: - command: desktop-launch $SNAP/opt/redis-desktop-manager/rdm - desktop: usr/share/applications/rdm.desktop - plugs: - - home - - unity7 - - opengl - - gsettings - - network - - network-bind - - x11 - - desktop - - desktop-legacy -parts: - application: - plugin: qmake - source: . - source-subdir: src - qt-version: qt5 - after: [desktop-qt5] - project-files: - - rdm.pro - build-packages: - - qt5-default - - qtdeclarative5-dev - - libqt5charts5-dev - stage-packages: - - qt5-default - - libqt5qml5 - - libqt5quick5 - - qml-module-qtquick-controls - - qml-module-qtquick-controls2 - - qml-module-qt-labs-settings - - qml-module-qtquick-dialogs - - qml-module-qtquick-layouts - - qml-module-qt-labs-folderlistmodel - - qml-module-qtqml-models2 - - qml-module-qtcharts diff --git a/src/__init__.py b/src/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/src/configure b/src/configure deleted file mode 100755 index 929fa70d..00000000 --- a/src/configure +++ /dev/null @@ -1,153 +0,0 @@ -#!/bin/bash -set -e -# On OSX use coreutils package to fix absense of readlink command -if [[ $OSTYPE == darwin* ]]; then - brew install coreutils || true - PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH" -fi - -# Import common functions -DIR=$(dirname "$(readlink -f "$0")") && RDM_DIR=$DIR/../ -. $RDM_DIR/build/common_functions - -GetOSVersion - -RDM_QT_VERSION=${RDM_QT_VERSION:-594} -RDM_QT_BRANCH=${RDM_QT_VERSION:0:2} - -if [ "$1" == "breakpad" ]; then - print_title "Build only Breakpad" - build_breakpad - exit 0 -fi - -if [ "$1" == "libssh2" ]; then - print_title "Build only libssh2" - build_libssh2 - exit 0 -fi - -if [ "$os_VENDOR" == "Ubuntu" ] && [ "$#" -gt 2 ]; then - print_title "Run configure in DEB Script packaging" - build_breakpad - build_libssh2 - exit 0 -fi - - -if [ "$os_VENDOR" == "Ubuntu" ] || [ "$os_VENDOR" == "LinuxMint" ] || [ "$os_VENDOR" == "elementary" ]; then - - if [ "$os_VENDOR" == "elementary" ]; then - ubuntu_ver=${os_RELEASE:0:3} - else - ubuntu_ver=${os_RELEASE:0:2} - fi - - print_title "Build RDM on $os_VENDOR: $ubuntu_ver" - - if [ "$os_VENDOR" == "Ubuntu" ] && [ "$ubuntu_ver" == "12" ]; then - echo "RedisDesktopManager doesn't support Ubuntu 12 since 0.8.8 release." - exit 1 - fi - - if [ "$os_VENDOR" == "LinuxMint" ]; then - if [ "$ubuntu_ver" == "17" ]; then - ubuntu_ver="14" - elif [ "$ubuntu_ver" == "18" ]; then - ubuntu_ver="16" - elif [ "$ubuntu_ver" == "19" ]; then - ubuntu_ver="18" - else - echo "RedisDesktopManager only supports linux mint >=17." - exit 1 - fi - fi - - if [ "$os_VENDOR" == "elementary" ]; then - if [ "$ubuntu_ver" == "0.4" ]; then - ubuntu_ver="16" - elif [ "$ubuntu_ver" == "0.5" ]; then - ubuntu_ver="18" - else - echo "RedisDesktopManager only supports elementary >=0.4." - exit 1 - fi - fi - - if [ "$ubuntu_ver" -gt 16 ]; then - print_title "Install Qt ${RDM_QT_BRANCH}" - sudo apt-get install qt5-default qtdeclarative5-dev libqt5charts5-dev \ - qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qt-labs-settings \ - qml-module-qtquick-dialogs qml-module-qtquick-layouts qml-module-qt-labs-folderlistmodel \ - qml-module-qtqml-models2 qml-module-qtcharts libssl1.0-dev -y - elif [ ! -f /opt/qt${RDM_QT_BRANCH}/bin/qt${RDM_QT_BRANCH}-env.sh ]; then - print_title "Install Qt ${RDM_QT_VERSION} from ppa" - - if [ "$ubuntu_ver" == "14" ]; then - sudo add-apt-repository --yes ppa:beineri/opt-qt${RDM_QT_VERSION}-trusty - elif [ "$ubuntu_ver" == "16" ]; then - sudo add-apt-repository --yes ppa:beineri/opt-qt${RDM_QT_VERSION}-xenial - fi - - sudo apt-get update -y - sudo apt-get install qt${RDM_QT_BRANCH}base qt${RDM_QT_BRANCH}imageformats qt${RDM_QT_BRANCH}tools \ - qt${RDM_QT_BRANCH}declarative qt${RDM_QT_BRANCH}quickcontrols qt${RDM_QT_BRANCH}quickcontrols2 qt${RDM_QT_BRANCH}charts-no-lgpl qt${RDM_QT_BRANCH}svg -y - - sudo apt-get install libssl-dev libgl1-mesa-dev -y - fi - - print_title "Install packages required by 3rdparty deps" - sudo apt-get install automake libtool cmake -y - - build_breakpad - build_libssh2 - - if [ "$ubuntu_ver" -lt 17 ]; then - print_title "Run: source /opt/qt${RDM_QT_BRANCH}/bin/qt${RDM_QT_BRANCH}-env.sh && qmake && make " - fi - -elif [ "$os_VENDOR" == "Fedora" ] || [[ "$os_VENDOR" == "CentOS" ]]; then - print_title "Build RDM on $os_VENDOR: $os_RELEASE" - - print_title "Check deps" - sudo yum install libssh2 libssh2-devel qt5-qtbase qt5-qtsvg-devel \ - qt5-qtdeclarative-devel qt5-qtgraphicaleffects qt5-qtquickcontrols qt5-qtquickcontrols2 \ - qt5-qttools qt5-qtcharts-devel gcc gcc-c++ libstdc++-static git cmake rsync \ - redhat-rpm-config -y - - if [[ $? == 1 && "$os_VENDOR" == "CentOS" ]]; then - # Some of the deps might need to come from Epel, so output a nice message - print_title "Not all dependencies were found. Ensure you have the epel repo installed and enabled." - exit - fi - - build_breakpad - build_libssh2 - - print_title "Run: qmake-qt5 && make " - -elif [ "$os_VENDOR" == "openSUSE" ]; then - print_title "Check deps" - sudo zypper install -y libopenssl-devel libssh2-devel \ - libX11-devel gcc gcc-c++ libstdc++-devel libqt5-qtbase-common-devel libqt5-qtquick1-devel \ - libqt5-qtdeclarative-devel libqt5-qtimageformats libqt5-qtquickcontrols \ - libQt5Concurrent-devel automake cmake \ - - build_breakpad - build_libssh2 - - print_title "Run: qmake-qt5 && make " - -elif [[ $OSTYPE == darwin* ]]; then - cd $DEPS_DIR - find gbreakpad -type d -exec chmod 755 {} + && cd gbreakpad - xcodebuild -quiet -sdk macosx -project src/client/mac/Breakpad.xcodeproj -configuration Release -target Breakpad -xcconfig ../../src/gbreakpad.xcconfig ARCHS=x86_64 -UseModernBuildSystem=NO - xcodebuild -quiet -sdk macosx -project src/client/mac/Breakpad.xcodeproj -configuration Release -target Breakpad -xcconfig ../../src/gbreakpad.xcconfig install DSTROOT=$DEPS_DIR/../bin/osx INSTALL_PATH=/Frameworks ARCHS=x86_64 -UseModernBuildSystem=NO - xcodebuild -quiet -sdk macosx -project src/client/mac/Breakpad.xcodeproj -configuration Release -target Breakpad -xcconfig ../../src/gbreakpad.xcconfig install DSTROOT=$DEPS_DIR/../bin INSTALL_PATH=/Frameworks ARCHS=x86_64 -UseModernBuildSystem=NO - cd .. - brew upgrade openssl || brew install openssl || true - export OPENSSL_ROOT_DIR=/usr/local/opt/openssl/ - build_libssh2 -else - echo "Your operating system is not supported!" -fi diff --git a/src/gbreakpad.xcconfig b/src/gbreakpad.xcconfig deleted file mode 100644 index cd0a3233..00000000 --- a/src/gbreakpad.xcconfig +++ /dev/null @@ -1,7 +0,0 @@ -HERE_BUILD=$(SRCROOT)/../../../../../build/gbreakpad -HERE_INTERMEDIATES=$(HERE_BUILD)/Intermediates - -MODULE_CACHE_DIR=$(HERE_BUILD)/DerivedData/ModuleCache -OBJROOT = $(HERE_INTERMEDIATES) -SHARED_PRECOMPS_DIR = $(HERE_INTERMEDIATES)/PrecompiledHeaders -SYMROOT = $(HERE_BUILD)/Products diff --git a/src/main.cpp b/src/main.cpp index dc47ed0a..0259838c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3,36 +3,24 @@ #include #include "app/app.h" -#include "modules/crashhandler/crashhandler.h" -#ifdef LINUX_SIGNALS -#include -#endif +#define RESTART_CODE 1000 int main(int argc, char *argv[]) { #if defined(Q_OS_WIN) || defined(Q_OS_LINUX) QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); -#endif +#endif + int returnCode = 0; - #ifndef QT_DEBUG - QFileInfo appPath(QString::fromLocal8Bit(argv[0])); - QString appDir(appPath.absoluteDir().path()); - QString crashReporterPath = QString("%1/crashreporter").arg(appDir.isEmpty() ? "." : appDir); - CrashHandler::instance()->Init(QDir::homePath(), appPath.absoluteFilePath(), crashReporterPath); - #endif + do + { + Application a(argc, argv); + a.initModels(); + a.initQml(); + returnCode = a.exec(); + } while(returnCode == RESTART_CODE); - Application a(argc, argv); - a.initModels(); - a.initQml(); - - #ifdef LINUX_SIGNALS - UnixSignalWatcher sigwatch; - sigwatch.watchForSignal(SIGINT); - sigwatch.watchForSignal(SIGTERM); - QObject::connect(&sigwatch, SIGNAL(unixSignal(int)), &a, SLOT(quit())); - #endif - - return a.exec(); + return returnCode; } diff --git a/src/modules/crashhandler/crashhandler.cpp b/src/modules/crashhandler/crashhandler.cpp deleted file mode 100644 index 818dac2d..00000000 --- a/src/modules/crashhandler/crashhandler.cpp +++ /dev/null @@ -1,218 +0,0 @@ -#include "crashhandler.h" - -#include -#include -#include -#include -#include - -#if defined(Q_OS_LINUX) -#include "client/linux/handler/exception_handler.h" -#elif defined(Q_OS_WIN32) -#include "client/windows/handler/exception_handler.h" -#elif defined(Q_OS_MAC) -#include "client/mac/handler/exception_handler.h" -#endif - -#ifndef WIN32 -#include -#endif -#include - -#define CRASHANDLER_MAX_PATH 2000 - -class CrashHandlerPrivate -{ -public: - CrashHandlerPrivate() - { - pHandler = NULL; - } - - ~CrashHandlerPrivate() - { - delete pHandler; - } - - void InitCrashHandler(const QString& dumpPath, const QString &appPath, const QString &appDir); - static google_breakpad::ExceptionHandler* pHandler; - static bool bReportCrashesToSystem; - -}; - -google_breakpad::ExceptionHandler* CrashHandlerPrivate::pHandler = NULL; -bool CrashHandlerPrivate::bReportCrashesToSystem = false; -wchar_t crashReporterPath[CRASHANDLER_MAX_PATH]; -wchar_t applicationPath[CRASHANDLER_MAX_PATH]; - -/************************************************************************/ -/* DumpCallback */ -/************************************************************************/ -#if defined(Q_OS_WIN32) -bool DumpCallback(const wchar_t* _dump_dir,const wchar_t* _minidump_id,void* context,EXCEPTION_POINTERS* exinfo,MDRawAssertionInfo* assertion,bool success) -#elif defined(Q_OS_LINUX) -bool DumpCallback(const google_breakpad::MinidumpDescriptor &md,void *context, bool success) -#elif defined(Q_OS_MAC) -bool DumpCallback(const char* _dump_dir,const char* _minidump_id,void *context, bool success) -#endif -{ - Q_UNUSED(context); -#if defined(Q_OS_WIN32) - Q_UNUSED(_dump_dir); - Q_UNUSED(_minidump_id); - Q_UNUSED(assertion); - Q_UNUSED(exinfo); -#elif defined(Q_OS_LINUX) - Q_UNUSED(md); -#endif - /* - NO STACK USE, NO HEAP USE THERE !!! - Creating QString's, using qDebug, etc. - everything is crash-unfriendly. - */ - -#if defined(WIN32) - wcscat_s( crashReporterPath, L" \""); - wcscat_s( crashReporterPath, _dump_dir ); - wcscat_s( crashReporterPath, L"/" ); - wcscat_s( crashReporterPath, _minidump_id ); - wcscat_s( crashReporterPath, L".dmp\"" ); - wcscat_s( crashReporterPath, L" \""); - wcscat_s( crashReporterPath, applicationPath ); - wcscat_s( crashReporterPath, L"\""); - - STARTUPINFO si; - PROCESS_INFORMATION pi; - - ZeroMemory( &si, sizeof( si ) ); - si.cb = sizeof(si); - si.dwFlags = STARTF_USESHOWWINDOW; - si.wShowWindow = SW_SHOWNORMAL; - ZeroMemory( &pi, sizeof(pi) ); - - if ( CreateProcess( NULL, crashReporterPath, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi ) ) - { - CloseHandle( pi.hProcess ); - CloseHandle( pi.hThread ); - TerminateProcess( GetCurrentProcess(), 1 ); - } -#else // OSX & LINUX - - char reporterPath[CRASHANDLER_MAX_PATH]; - wcstombs(reporterPath, crashReporterPath, CRASHANDLER_MAX_PATH); - - char aPath[CRASHANDLER_MAX_PATH]; - wcstombs(aPath, applicationPath, CRASHANDLER_MAX_PATH); - - char command[CRASHANDLER_MAX_PATH]; - -#if defined(Q_OS_LINUX) - strcpy(command, md.path()); -#elif defined(Q_OS_MAC) - strcpy(command, _dump_dir); - strcat(command, "/"); - strcat(command, _minidump_id); - strcat(command, ".dmp"); -#endif - - pid_t pid = fork(); - if ( pid == -1 ) // fork failed - return false; - if ( pid == 0 ) - { - // we are the fork - execl( reporterPath, - reporterPath, - command, - aPath, - (char*) 0 ); - - printf( "Error: Can't launch CrashReporter!\n" ); - return false; - } -#endif - - return CrashHandlerPrivate::bReportCrashesToSystem ? success : true; -} - -void CrashHandlerPrivate::InitCrashHandler(const QString& dumpPath, const QString& appPath, const QString& crashReporterFullPath) -{ - if ( pHandler != NULL ) - return; - - wcscpy(applicationPath, appPath.toStdWString().c_str()); - wcscpy(crashReporterPath, crashReporterFullPath.toStdWString().c_str()); - -#if defined(Q_OS_WIN32) - std::wstring pathAsStr = (const wchar_t*)dumpPath.utf16(); - pHandler = new google_breakpad::ExceptionHandler( - pathAsStr, - /*FilterCallback*/ 0, - DumpCallback, - /*context*/ - 0, - true - ); -#elif defined(Q_OS_LINUX) - std::string pathAsStr = dumpPath.toStdString(); - google_breakpad::MinidumpDescriptor md(pathAsStr); - pHandler = new google_breakpad::ExceptionHandler( - md, - /*FilterCallback*/ 0, - DumpCallback, - /*context*/ 0, - true, - -1 - ); -#elif defined(Q_OS_MAC) - std::string pathAsStr = dumpPath.toStdString(); - pHandler = new google_breakpad::ExceptionHandler( - pathAsStr, - /*FilterCallback*/ 0, - DumpCallback, - /*context*/ - 0, - true, - NULL - ); -#endif -} - -/************************************************************************/ -/* CrashHandler */ -/************************************************************************/ -CrashHandler* CrashHandler::instance() -{ - static CrashHandler globalHandler; - return &globalHandler; -} - -CrashHandler::CrashHandler() -{ - d = new CrashHandlerPrivate(); -} - -CrashHandler::~CrashHandler() -{ - delete d; -} - -void CrashHandler::setReportCrashesToSystem(bool report) -{ - d->bReportCrashesToSystem = report; -} - -bool CrashHandler::writeMinidump() -{ - bool res = d->pHandler->WriteMinidump(); - if (res) { - qDebug("BreakpadQt: writeMinidump() successed."); - } else { - qWarning("BreakpadQt: writeMinidump() failed."); - } - return res; -} - -void CrashHandler::Init( const QString& reportPath, const QString& appPath, const QString& crashReporterFullPath ) -{ - d->InitCrashHandler(reportPath, appPath, crashReporterFullPath); -} diff --git a/src/modules/crashhandler/crashhandler.h b/src/modules/crashhandler/crashhandler.h deleted file mode 100644 index 19032258..00000000 --- a/src/modules/crashhandler/crashhandler.h +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once - -#include - -class CrashHandlerPrivate; -class CrashHandler -{ -public: - static CrashHandler* instance(); - void Init(const QString& reportPath, const QString &appPath, const QString &crashReporterFullPath); - - void setReportCrashesToSystem(bool report); - bool writeMinidump(); - -private: - CrashHandler(); - ~CrashHandler(); - Q_DISABLE_COPY(CrashHandler) - CrashHandlerPrivate* d; -}; - diff --git a/src/qml/GlobalSettings.qml b/src/qml/GlobalSettings.qml index f5ac7dbd..843d03f6 100644 --- a/src/qml/GlobalSettings.qml +++ b/src/qml/GlobalSettings.qml @@ -12,6 +12,8 @@ Dialog { id: root title: qsTranslate("RDM","Settings") + property bool restartRequired: false + contentItem: Rectangle { id: dialogRoot implicitWidth: 800 @@ -47,7 +49,9 @@ Dialog { model: ["system", "en_US", "zh_CN", "zh_TW", "ru_RU", "es_ES", "ja_JP"] value: "system" label: qsTranslate("RDM","Language") - description: qsTranslate("RDM","Application restart is needed to apply this setting.") + description: qsTranslate("RDM","Application will be restarted to apply this setting.") + + onValueChanged: root.restartRequired = true } ComboboxOption { @@ -59,7 +63,9 @@ Dialog { value: Qt.platform.os == "osx"? "Helvetica Neue" : "Open Sans" model: Qt.fontFamilies() label: qsTranslate("RDM","Font") - description: qsTranslate("RDM","Application restart is needed to apply this setting.") + description: qsTranslate("RDM","Application will be restarted to apply this setting.") + + onValueChanged: root.restartRequired = true } ComboboxOption { @@ -71,7 +77,9 @@ Dialog { model: ["8", "9", "10", "11", "12"] value: Qt.platform.os == "osx"? "12" : "11" label: qsTranslate("RDM","Font Size") - description: qsTranslate("RDM","Application restart is needed to apply this setting.") + description: qsTranslate("RDM","Application will be restarted to apply this setting.") + + onValueChanged: root.restartRequired = true } BoolOption { @@ -82,7 +90,9 @@ Dialog { value: false label: qsTranslate("RDM","Use system proxy settings") - description: qsTranslate("RDM","Application restart is needed to apply this setting.") + description: qsTranslate("RDM","Application will be restarted to apply this setting.") + + onValueChanged: root.restartRequired = true } SettingsGroupTitle { @@ -186,7 +196,15 @@ Dialog { Item { Layout.fillWidth: true; } Button { text: qsTranslate("RDM","OK") - onClicked: root.close() + onClicked: { + if (root.restartRequired) { + // restart app + Qt.exit(1000) + } + + restartRequired = false + root.close() + } } } } diff --git a/src/rdm.pro b/src/rdm.pro index de0794bd..7dd445c3 100644 --- a/src/rdm.pro +++ b/src/rdm.pro @@ -26,8 +26,7 @@ SOURCES += \ $$PWD/modules/connections-tree/*.cpp \ $$PWD/modules/connections-tree/items/*.cpp \ $$PWD/modules/console/*.cpp \ - $$PWD/modules/value-editor/*.cpp \ - $$PWD/modules/crashhandler/*.cpp \ + $$PWD/modules/value-editor/*.cpp \ $$PWD/modules/updater/*.cpp \ $$PWD/modules/bulk-operations/*.cpp \ $$PWD/modules/bulk-operations/operations/*.cpp \ @@ -45,8 +44,7 @@ HEADERS += \ $$PWD/modules/connections-tree/*.h \ $$PWD/modules/connections-tree/items/*.h \ $$PWD/modules/console/*.h \ - $$PWD/modules/value-editor/*.h \ - $$PWD/modules/crashhandler/*.h \ + $$PWD/modules/value-editor/*.h \ $$PWD/modules/updater/*.h \ $$PWD/modules/*.h \ $$PWD/modules/bulk-operations/*.h \ @@ -87,12 +85,6 @@ unix:macx { # OSX #deployment QMAKE_INFO_PLIST = $$PWD/resources/Info.plist ICON = $$PWD/resources/rdm.icns - - release { - CRASHREPORTER_APP.files = $$DESTDIR/crashreporter - CRASHREPORTER_APP.path = Contents/MacOS - QMAKE_BUNDLE_DATA += CRASHREPORTER_APP - } } unix:!macx { # ubuntu & debian diff --git a/src/resources/Info.plist.sample b/src/resources/Info.plist.sample index 2166b30c..941d8c60 100644 --- a/src/resources/Info.plist.sample +++ b/src/resources/Info.plist.sample @@ -2,29 +2,39 @@ + CFBundleDevelopmentRegion + en-US CFBundleDisplayName Redis Desktop Manager + CFBundleExecutable + rdm CFBundleIconFile rdm.icns + CFBundleIdentifier + com.redisdesktop.rdm + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + RDM + CFBundlePackageType + APPL + CFBundleShortVersionString + 0.0.0 CFBundleVersion 0.0.0 + NSHumanReadableCopyright + © 2013-2019, Igor Malinovskiy. NSPrincipalClass NSApplication NSHighResolutionCapable - CFBundlePackageType - APPL - CFBundleGetInfoString - Created by Qt/QMake CFBundleSignature ???? - CFBundleExecutable - rdm - CFBundleIdentifier - com.redisdesktop.rdm NSSupportsAutomaticGraphicsSwitching - NOTE - This file was generated by Qt/QMake. + LSApplicationCategoryType + public.app-category.developer-tools + CFBundleSupportedPlatforms + MacOSX diff --git a/src/resources/images/logo.png b/src/resources/images/logo.png index aafb7332..333ff26b 100644 Binary files a/src/resources/images/logo.png and b/src/resources/images/logo.png differ diff --git a/src/resources/images/rdm.png b/src/resources/images/rdm.png index aafb7332..333ff26b 100644 Binary files a/src/resources/images/rdm.png and b/src/resources/images/rdm.png differ diff --git a/src/resources/rdm.icns b/src/resources/rdm.icns index 70a04fc5..08e82c74 100644 Binary files a/src/resources/rdm.icns and b/src/resources/rdm.icns differ diff --git a/tests/unit_tests/testcases/app/app-tests.pri b/tests/unit_tests/testcases/app/app-tests.pri index c8cc964f..c43d2481 100644 --- a/tests/unit_tests/testcases/app/app-tests.pri +++ b/tests/unit_tests/testcases/app/app-tests.pri @@ -17,6 +17,7 @@ HEADERS += \ $$APP_SRC_DIR/models/key-models/listkey.h \ $$APP_SRC_DIR/models/key-models/listlikekey.h \ $$APP_SRC_DIR/models/key-models/setkey.h \ + $$APP_SRC_DIR/models/key-models/stream.h \ $$APP_SRC_DIR/models/key-models/sortedsetkey.h \ $$APP_SRC_DIR/models/key-models/hashkey.h \ $$APP_SRC_DIR/models/key-models/rejsonkey.h \ @@ -35,6 +36,7 @@ SOURCES += \ $$APP_SRC_DIR/models/key-models/listkey.cpp \ $$APP_SRC_DIR/models/key-models/listlikekey.cpp \ $$APP_SRC_DIR/models/key-models/setkey.cpp \ + $$APP_SRC_DIR/models/key-models/stream.cpp \ $$APP_SRC_DIR/models/key-models/sortedsetkey.cpp \ $$APP_SRC_DIR/models/key-models/hashkey.cpp \ $$APP_SRC_DIR/models/key-models/rejsonkey.cpp \ diff --git a/tests/unit_tests/testcases/app/test_keymodels.cpp b/tests/unit_tests/testcases/app/test_keymodels.cpp index 22fa5bab..e0674e0b 100644 --- a/tests/unit_tests/testcases/app/test_keymodels.cpp +++ b/tests/unit_tests/testcases/app/test_keymodels.cpp @@ -71,7 +71,7 @@ void TestKeyModels::testKeyFactoryAddKey() { r.setKeyName("testKey"); r.setKeyType(keyType); r.setValue(row); - factory.submitNewKeyRequest(r, QJSValue()); + factory.submitNewKeyRequest(r); wait(100); // then diff --git a/tests/unit_tests/testcases/connections-tree/mocks/itemoperationsmock.h b/tests/unit_tests/testcases/connections-tree/mocks/itemoperationsmock.h index 9cf3a0e4..d2459cf4 100644 --- a/tests/unit_tests/testcases/connections-tree/mocks/itemoperationsmock.h +++ b/tests/unit_tests/testcases/connections-tree/mocks/itemoperationsmock.h @@ -86,6 +86,11 @@ class ItemOperationsMock : public ConnectionsTree::Operations { void resetConnection() override {} + void deleteDbKeys(ConnectionsTree::DatabaseItem &db) override {}; + void setTTL(ConnectionsTree::AbstractNamespaceItem &ns) override {}; + void copyKeys(ConnectionsTree::AbstractNamespaceItem &ns) override {}; + void importKeysFromRdb(ConnectionsTree::DatabaseItem &ns) override {}; + protected: bool m_positive_mode; };