Comparar commits

..

3 Commits

Autor SHA1 Mensagem Data
Daniel Molkentin 57b65242e3 Make version check test conditional for now 2015-08-07 12:46:55 +02:00
Olivier Goffart a1a66f8eda Fixup ce5be89a18 2015-08-07 11:13:31 +02:00
Daniel Molkentin 866c21664b ownSql: Do not use sqlite3 method not present in older version
Was only used for debug output anyway and broke RHEL/CentOS6
2015-08-07 10:53:18 +02:00
114 arquivos alterados com 9204 adições e 10515 exclusões
+4 -11
Ver Arquivo
@@ -1,9 +1,6 @@
ChangeLog
=========
version 2.0.1 (release 2015-09-01)
* AccountWizard: fix when the theme specify a override URL (#3699)
version 2.0.0 (release 2015-08-25)
version 2.0.0 (release 2015-08-??)
* Add support for multiple accounts (#3084)
* Do not sync down new big folders from server without users consent (#3148)
* Integrate Selective Sync into the default UI
@@ -12,12 +9,11 @@ version 2.0.0 (release 2015-08-25)
* Use SI units for the file sizes
* Improve progress reporting during sync (better estimations, show all files, show all bandwidth)
* Windows: Support paths >255 characters (#57) by using Windows API instead of POSIX API
* Windows, OS X: Allow to not sync hidden files (#2086)
* OS X: Show file name in UI if file has invalid UTF-8 in file name
* Sharing: Make use of Capability API (#3439)
* Sharing: Do not allow sharing the root folder (#3495)
* Sharing: Show thumbnail
* Client Updater: Check for updates periodically, not only once per run (#3044)
* Updater: Check for updates periodically, not only once per run (#3044)
* Windows: Remove misleading option to remove sync data (#3461)
* Windows: Do not provoke AD account locking if password changes (#2186)
* Windows: Fix installer when installing unprivileged (#2616, #2568)
@@ -25,13 +21,10 @@ version 2.0.0 (release 2015-08-25)
* SSL Button: Show more information
* owncloudcmd: Fix --httpproxy (#3465)
* System proxy: Ask user for credentials if needed
* Windows, OS X: Allow to not sync hidden files (#2086)
* Several fixes and performance improvements in the sync engine
* Network: Try to use SSL session tickets/identifiers. Check the SSL button to see if they are used.
* Network: Try to SSL session tickets/identifiers
* Bandwidth Throttling: Provide automatic limit setting for downloads (#3084)
* Systray: Workaround for issue with Qt 5.5.0 #3656
version 1.8.4 (release 2015-07-13)
* Release to ship a security release of openSSL. No source changes of the ownCloud Client code.
version 1.8.3 (release 2015-06-23)
* Fix a bug in the Windows Installer that could crash explorer (#3320)
+2 -2
Ver Arquivo
@@ -1,10 +1,10 @@
set( MIRALL_VERSION_MAJOR 2 )
set( MIRALL_VERSION_MINOR 0 )
set( MIRALL_VERSION_PATCH 1 )
set( MIRALL_VERSION_PATCH 0 )
set( MIRALL_SOVERSION 0 )
if ( NOT DEFINED MIRALL_VERSION_SUFFIX )
set( MIRALL_VERSION_SUFFIX "") #e.g. beta1, beta2, rc1
set( MIRALL_VERSION_SUFFIX "beta1") #e.g. beta1, beta2, rc1
endif( NOT DEFINED MIRALL_VERSION_SUFFIX )
if( NOT DEFINED MIRALL_VERSION_BUILD )
+1 -1
Ver Arquivo
@@ -38,6 +38,6 @@ StrCpy $UAC_ERROR_ELEVATE "Kan niet verhogen, fout:"
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Dit installatieprogramma vereist beheerdersrechten. Probeer het opnieuw"
StrCpy $INIT_INSTALLER_RUNNING "De Installer is al gestart."
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Deze uninstaller vereist Beheerderstoegang, probeer opnieuw"
StrCpy $UAC_ERROR_LOGON_SERVICE "De aanmeldprocedure is niet actief; er wordt afgebroken!"
StrCpy $INIT_UNINSTALLER_RUNNING "De uninstaller is al gestart."
StrCpy $SectionGroup_Shortcuts "Snelkoppelingen"
StrCpy $UAC_ERROR_LOGON_SERVICE "Logon service is not running, aborting!"
+1 -1
Ver Arquivo
@@ -38,6 +38,6 @@ StrCpy $UAC_ERROR_ELEVATE "Échec d'élévation, erreur :"
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Cet installateur requiert les droits administrateur, essayez à nouveau"
StrCpy $INIT_INSTALLER_RUNNING "Une installation est déjà en cours."
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Ce désinstallateur requiert les droits administrateur, essayez à nouveau"
StrCpy $UAC_ERROR_LOGON_SERVICE "Service de logon non lancé ! Abandon."
StrCpy $INIT_UNINSTALLER_RUNNING "Une désinstallation est déjà en cours."
StrCpy $SectionGroup_Shortcuts "Raccourcis"
StrCpy $UAC_ERROR_LOGON_SERVICE "Logon service is not running, aborting!"
+1 -1
Ver Arquivo
@@ -38,6 +38,6 @@ StrCpy $UAC_ERROR_ELEVATE "
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "このインストーラーは、管理者権限が必要です。インストールを再試行してください。"
StrCpy $INIT_INSTALLER_RUNNING "インストーラーは、すでに起動しています。"
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "このアンインストーラーは、管理者権限が必要です。アンインストールを再試行してください。"
StrCpy $UAC_ERROR_LOGON_SERVICE "ログオンサービスが動いていません。中止します。"
StrCpy $INIT_UNINSTALLER_RUNNING "アンインストーラーは、すでに起動しています。"
StrCpy $SectionGroup_Shortcuts "ショートカット"
StrCpy $UAC_ERROR_LOGON_SERVICE "Logon service is not running, aborting!"
+1 -1
Ver Arquivo
@@ -38,6 +38,6 @@ StrCpy $UAC_ERROR_ELEVATE "Incapaz de elevar, erro:"
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Este instalador precisa de permissões de administrador, tente novamente"
StrCpy $INIT_INSTALLER_RUNNING "O instalador já está em execução."
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Este desinstalador requer permissões de administrador, tente novamente"
StrCpy $UAC_ERROR_LOGON_SERVICE "O serviço do início de sessão não está em execução, a abortar!"
StrCpy $INIT_UNINSTALLER_RUNNING "O desinstalador já está em execução."
StrCpy $SectionGroup_Shortcuts "Atalhos"
StrCpy $UAC_ERROR_LOGON_SERVICE "Logon service is not running, aborting!"
+1 -1
Ver Arquivo
@@ -38,6 +38,6 @@ StrCpy $UAC_ERROR_ELEVATE "Невозможно повысить привиле
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Этому установщику требуются права администратора, попробуйте ещё раз"
StrCpy $INIT_INSTALLER_RUNNING "Установщик уже запущен."
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Этому деинсталлятору требуются права администратора, попробуйте ещё раз"
StrCpy $UAC_ERROR_LOGON_SERVICE "Служба входа в систему не запущена, прерывание!"
StrCpy $INIT_UNINSTALLER_RUNNING "Программа удаления уже выполняется."
StrCpy $SectionGroup_Shortcuts "Ярлыки"
StrCpy $UAC_ERROR_LOGON_SERVICE "Logon service is not running, aborting!"
+1 -1
Ver Arquivo
@@ -38,6 +38,6 @@ StrCpy $UAC_ERROR_ELEVATE "ไม่สามารถที่จะยกร
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "การติดตั้งนี้จะต้องมีการเข้าถึงผู้ดูแลระบบ กรุณาลองอีกครั้ง"
StrCpy $INIT_INSTALLER_RUNNING "กำลังทำการติดตั้ง"
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "การถอนการติดตั้งนี้จะต้องมีการเข้าถึงส่วนผู้ดูแลระบบ กรุณาลองอีกครั้ง"
StrCpy $UAC_ERROR_LOGON_SERVICE "บริการเข้าสู่ระบบไม่ทำงาน กำลังยกเลิก!"
StrCpy $INIT_UNINSTALLER_RUNNING "กำลังทำการถอนการติดตั้ง"
StrCpy $SectionGroup_Shortcuts "ทางลัด"
StrCpy $UAC_ERROR_LOGON_SERVICE "Logon service is not running, aborting!"
-3
Ver Arquivo
@@ -10,11 +10,8 @@
<file>resources/warning.png</file>
<file>resources/warning@2x.png</file>
<file>resources/settings.png</file>
<file>resources/settings@2x.png</file>
<file>resources/activity.png</file>
<file>resources/activity@2x.png</file>
<file>resources/network.png</file>
<file>resources/network@2x.png</file>
<file>resources/lock-http.png</file>
<file>resources/lock-http@2x.png</file>
<file>resources/lock-https.png</file>
+2 -9
Ver Arquivo
@@ -4,27 +4,20 @@
# This module defines
# INOTIFY_INCLUDE_DIR, where to find inotify.h, etc.
# INOTIFY_LIBRARY_DIR, the directory holding the inotify library.
# INOTIFY_FOUND, If false, do not try to use inotify.
# also defined, but not for general use are
# INOTIFY_LIBRARY, where to find the inotify library.
find_path(INOTIFY_INCLUDE_DIR sys/inotify.h
PATH_SUFFIXES inotify)
HINTS /usr/include/${CMAKE_LIBRARY_ARCHITECTURE})
mark_as_advanced(INOTIFY_INCLUDE_DIR)
find_library(INOTIFY_LIBRARY inotify PATH_SUFFIXES lib/inotify)
get_filename_component(INOTIFY_LIBRARY_DIR ${INOTIFY_LIBRARY} PATH)
mark_as_advanced(INOTIFY_LIBRARY_DIR)
# all listed variables are TRUE
# handle the QUIETLY and REQUIRED arguments and set INOTIFY_FOUND to TRUE if
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(INOTIFY DEFAULT_MSG INOTIFY_INCLUDE_DIR INOTIFY_LIBRARY_DIR)
find_package_handle_standard_args(INOTIFY DEFAULT_MSG INOTIFY_INCLUDE_DIR)
IF(INOTIFY_FOUND)
SET(INotify_INCLUDE_DIRS ${INOTIFY_INCLUDE_DIR})
SET(INotify_LIBRARY_DIRS ${INOTIFY_LIBRARY_DIR})
ENDIF(INOTIFY_FOUND)
+1 -2
Ver Arquivo
@@ -101,8 +101,7 @@ enum csync_status_codes_e {
CSYNC_STATUS_INDIVIDUAL_EXCLUDE_LONG_FILENAME,
CYSNC_STATUS_FILE_LOCKED_OR_OPEN,
CSYNC_STATUS_INDIVIDUAL_EXCLUDE_HIDDEN,
CSYNC_STATUS_INVALID_CHARACTERS,
CSYNC_STATUS_INDIVIDUAL_STAT_FAILED
CSYNC_STATUS_INVALID_CHARACTERS
};
typedef enum csync_status_codes_e CSYNC_STATUS;
+1 -2
Ver Arquivo
@@ -28,8 +28,7 @@ enum csync_exclude_type_e {
CSYNC_FILE_EXCLUDE_LIST,
CSYNC_FILE_EXCLUDE_INVALID_CHAR,
CSYNC_FILE_EXCLUDE_LONG_FILENAME,
CSYNC_FILE_EXCLUDE_HIDDEN,
CSYNC_FILE_EXCLUDE_STAT_FAILED
CSYNC_FILE_EXCLUDE_HIDDEN
};
typedef enum csync_exclude_type_e CSYNC_EXCLUDE_TYPE;
+8 -8
Ver Arquivo
@@ -163,12 +163,8 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
len = strlen(path);
if (type == CSYNC_FTW_TYPE_SKIP) {
excluded =CSYNC_FILE_EXCLUDE_STAT_FAILED;
} else {
/* Check if file is excluded */
excluded = csync_excluded(ctx, path,type);
}
/* Check if file is excluded */
excluded = csync_excluded(ctx, path,type);
if( excluded == CSYNC_NOT_EXCLUDED ) {
/* Even if it is not excluded by a pattern, maybe it is to be ignored
@@ -239,6 +235,12 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
}
}
/* Ignore non statable files and other strange cases. */
if (type == CSYNC_FTW_TYPE_SKIP) {
st->instruction = CSYNC_INSTRUCTION_NONE;
goto out;
}
if (excluded > CSYNC_NOT_EXCLUDED || type == CSYNC_FTW_TYPE_SLINK) {
st->instruction = CSYNC_INSTRUCTION_IGNORE;
if (ctx->current_fs) {
@@ -431,8 +433,6 @@ out:
st->error_status = CSYNC_STATUS_INDIVIDUAL_EXCLUDE_LONG_FILENAME; /* File name is too long. */
} else if (excluded == CSYNC_FILE_EXCLUDE_HIDDEN ) {
st->error_status = CSYNC_STATUS_INDIVIDUAL_EXCLUDE_HIDDEN;
} else if (excluded == CSYNC_FILE_EXCLUDE_STAT_FAILED) {
st->error_status = CSYNC_STATUS_INDIVIDUAL_STAT_FAILED;
}
}
}
+10 -10
Ver Arquivo
@@ -47,7 +47,7 @@ Synchronization by Time versus ETag
.. index:: time stamps, file times, etag, unique id
Until the release of ownCloud 4.5 and ownCloud Client 1.1, the ownCloud
synchronization process employed a single file property -- the file modification
synchronization process employed a single file property -- the file modificatin
time -- to decide which file was newer and needed to be synchronized to the
other repository.
@@ -76,7 +76,7 @@ a synchronization process.
not support using the file ID functionality.
Before the 1.3.0 release of the Desktop Client, the synchronization process
might create false conflict files if time deviates. Original and changed files
might create faux conflict files if time deviates. Original and changed files
conflict only in their timestamp, but not in their content. This behaviour was
changed to employ a binary check if files differ.
@@ -104,7 +104,7 @@ depending on server/client combination:
+--------------------+-------------------+----------------------------+
We strongly recommend using ownCloud Server release 4.5 or later when using
ownCloud Client 1.1 or later. Using an incompatible time stamp-based
ownCloud Client 1.1 or later. Using incompatible time stamp-based
synchronization mechanism can lead to data loss in rare cases, especially when
multiple clients are involved and one utilizes a non-synchronized NTP time.
@@ -120,7 +120,7 @@ traverses the file tree and compares the modification time of each file with an
expected value stored in its database. If the value is not the same, the client
determines that the file has been modified in the local repository.
.. note:: On the local side, the modification time is a good attribute to use for
.. note:: On the local side, the modification time a good attribute to use for
detecting changes, because
the value does not depend on time shifts and such.
@@ -131,8 +131,8 @@ changed and no synchronization occurs.
In the event a file has changed on both the local and the remote repository
since the last sync run, it can not easily be decided which version of the file
is the one that should be used. However, changes to any side will not be lost. Instead,
a *conflict case* is created. The client resolves this conflict by creating a
is the one that should be used. However, changes to any side be lost. Instead,
a *conflict case* is created. The client resolves this conflic by creating a
conflict file of the older of the two files and saving the newer file under the
original file name. Conflict files are always created on the client and never
on the server. The conflict file uses the same name as the original file, but
@@ -156,18 +156,18 @@ By default, the ownCloud Client ignores the following files:
* Files starting with ``.csync_journal.db``, as these files are reserved for journalling.
If a pattern selected using a checkbox in the `ignoredFilesEditor-label` (or if
a line in the exclude file starts with the character ``]`` directly followed by
a line in the exclude file starts with the character `]` directly followed by
the file pattern), files matching the pattern are considered *fleeting meta
data*. These files are ignored and *removed* by the client if found in the
data*. These files are ingored and *removed* by the client if found in the
synchronized folder. This is suitable for meta files created by some
applications that have no sustainable meaning.
If a pattern ends with the forwardslash (``/``) character, only directories are
If a pattern ends with the backslash (`/`) character, only directories are
matched. The pattern is only applied for directory components of filenames
selected using the checkbox.
To match filenames against the exclude patterns, the unix standard C library
function fnmatch is used. This process checks the filename against the
function fnmatch is used. This procesx checks the filename against the
specified pattern using standard shell wildcard pattern matching. For more
information, please refer to `The opengroup website
<http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_13_01>`_.
+1 -1
Ver Arquivo
@@ -106,7 +106,7 @@ using the system-wide ``.plist`` file. To access this file:
/Library/Preferences/
2. Locate and open the following file::
2. Locate and open the following file::
com.owncloud.desktopclient.plist
+33 -13
Ver Arquivo
@@ -7,7 +7,7 @@ This section explains how to build the ownCloud Client from source for all
major platforms. You should read this section if you want to develop for the
desktop client.
.. note:: Build instructions are subject to change as development proceeds.
.. note:: Building instruction are subject to change as development proceeds.
Please check the version for which you want to build.
The instructions contained in this topic were updated to work with version 1.7 of the ownCloud Client.
@@ -134,38 +134,58 @@ have it installed already.
To cross-compile:
1. Add the following repository using YaST or ``zypper ar`` (adjust when using another openSUSE version)::
1. Add the following repositories using YaST or ``zypper ar`` (adjust when using another openSUSE version)::
zypper ar https://build.opensuse.org/project/show/isv:ownCloud:toolchains:mingw:win32:stable
zypper ar http://download.opensuse.org/repositories/windows:/mingw/openSUSE_13.2/windows:mingw.repo
zypper ar http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_13.2/windows:mingw:win32.repo
2. Install the cross-compiler packages and the cross-compiled dependencies::
zypper install cmake make mingw32-cross-binutils mingw32-cross-cpp mingw32-cross-gcc \
mingw32-cross-gcc-c++ mingw32-cross-pkg-config mingw32-filesystem \
mingw32-headers mingw32-runtime site-config mingw32-libwebp \
mingw32-cross-libqt5-qmake mingw32-cross-libqt5-qttools mingw32-libqt5*
zypper install cmake make mingw32-cross-binutils mingw32-cross-cpp mingw32-cross-gcc \
mingw32-cross-gcc-c++ mingw32-cross-pkg-config mingw32-filesystem \
mingw32-headers mingw32-runtime site-config \
mingw32-cross-libqt5-qmake mingw32-cross-libqt5-qttools mingw32-libqt5* \
mingw32-cross-nsis
3. For the installer, install the NSIS installer package::
zypper install mingw32-cross-nsis mingw32-cross-nsis-plugin-uac mingw32-cross-nsis-plugin-nsprocess
zypper install mingw32-cross-nsis
4. Follow the `generic build instructions`_
4. Install the following plugin::
mingw32-cross-nsis-plugin-processes mingw32-cross-nsis-plugin-uac
.. note:: This plugin is typically required. However, due to a current bug
in ``mingw``, the plugins do not currently build properly from source.
5. Manually download and install the following files using ``rpm -ivh <package>``:
.. note:: These files also work for more recent openSUSE versions!
::
# RPM depends on curl for installs from HTTP
zypper install curl
rpm -ivh http://download.tomahawk-player.org/packman/mingw:32/openSUSE_12.1/x86_64/mingw32-cross-nsis-plugin-processes-0-1.1.x86_64.rpm
rpm -ivh http://download.tomahawk-player.org/packman/mingw:32/openSUSE_12.1/x86_64/mingw32-cross-nsis-plugin-uac-0-3.1.x86_64.rpm
6. Follow the `generic build instructions`_
.. note:: When building for Windows platforms, you must specify a special
toolchain file that enables cmake to locate the platform-specific tools. To add
this parameter to the call to cmake, enter
``-DCMAKE_TOOLCHAIN_FILE=../client/admin/win/Toolchain-mingw32-openSUSE.cmake``.
5. Build by running ``make``.
7. Build by running ``make``.
.. note:: Using ``make package`` produces an NSIS-based installer, provided
the NSIS mingw32 packages are installed.
6. If you want to sign the installer, acquire a `Microsoft Authenticode`_ Certificate and install ``osslsigncode`` to sign the installer::
8. If you want to sign the installer, acquire a `Microsoft Authenticode`_ Certificate and install ``osslsigncode`` to sign the installer::
zypper install osslsigncode
7. Sign the package::
9. Sign the package::
osslsigncode -pkcs12 $HOME/.codesign/packages.pfx -h sha1 \
-pass yourpass \
@@ -175,7 +195,7 @@ To cross-compile:
-in ${unsigned_file} \
-out ${installer_file}
for ``-in``, use the URL to the time stamping server provided by your CA along with the Authenticode certificate. Alternatively,
for ``-in``, use URL to the time stamping server provided by your CA along with the Authenticode certificate. Alternatively,
you may use the official Microsoft ``signtool`` utility on Microsoft Windows.
+1 -1
Ver Arquivo
@@ -1,4 +1,4 @@
The ownCloud Client reads a configuration file. You can locate this configuration file as follows:
The ownCloud Client reads a configuration file. You can locate this configuration files as follows:
On Linux distributions:
``$HOME/.local/share/data/ownCloud/owncloud.cfg``
+1 -1
Ver Arquivo
@@ -9,7 +9,7 @@ Some files are continuously uploaded to the server, even when they are not modif
It is possible that another program is changing the modification date of the file.
If the file is uses the ``.eml`` extension, Windows automatically and
If the file is uses the ``.eml`` extention, Windows automatically and
continually changes all files, unless you remove
``\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PropertySystem\PropertyHandlers`
from the windows registry.
+1 -1
Ver Arquivo
@@ -68,7 +68,7 @@ On the next screen enter your ownCloud login and password.
.. image:: images/client5.png
Now you can select which folders and files to sync, and the location of your
Now you can select while folders and files to sync, and the location of your
local ownCloud folder.
.. image:: images/client6.png
+9 -7
Ver Arquivo
@@ -71,7 +71,7 @@ Using the Account Settings Window
.. index:: account settings, user, password, Server URL
The ``Account`` window provides a summary of your ownCloud account settings.
The ``Account`` window provides a summary for your ownCloud account settings.
You can manage which folders and files you want to synchronize, change your
account settings, and pause and resume synchronization.
@@ -96,10 +96,12 @@ The fields and options in this window include:
root folder.
* ``Storage Usage`` field: Displays how much space your files are using on the
ownCloud server.
ownCloud server.
* ``Edit Ignored Files`` button: Launches the Ignored Files Editor.
* ``Modify Account`` button: Use this to change your ownCloud server settings
by launching the account setup wizard (see :doc:`accountsetup`).
* ``Modify Account`` button: Use this to change your ownCloud server settings
by launching the account setup wizard (see :doc:`accountsetup`).
@@ -111,7 +113,7 @@ synchronization process.
To add a new folder:
1. Click the ``Add Folder ...`` button in the Account window.
1. Click the ``Add a Folder ...`` button in the Account window.
The ``Add Folder...`` window opens
@@ -193,11 +195,11 @@ startup, notifications, and using monochrome icons.
startup. By default, this option is enabled (checked) after you have configured
your account.
* ``Show Desktop Notifications`` checkbox: Provides the option to check (enable)
* ``Show Desktop Nofications`` checkbox: Provides the option to check (enable)
or uncheck (disable) notifications about sync activity.
* ``Use Monochrome Icons`` checkbox: Provides the option to check (enable) or
uncheck (disable) the use of monochrome (visually less obtrusive) icons.
uncheck (disable) the use of monochrome (visually less obtrusive) icons.
.. note:: This option can be useful on Mac OS X platforms.
@@ -255,7 +257,7 @@ Synchronization of files between a client and server can use a lot of
bandwidth, so you can limit how much your ownCloud sync client uses.
- ``No limit`` option: The default setting for the client; specifies that there
are no limit settings on the bandwidth used by data downloaded from the server.
are no limit settings on the amount of data downloaded from the server.
- ``Limit to <value> KBytes/s`` option: Limits (throttles) the bandwidth to
a customized value (in KBytes/second).
@@ -264,7 +266,7 @@ The Upload Bandwidth field (for data flowing from the ownCloud client to the
server) provides the following options:
- ``No limit`` option: The default setting for the client; specifies that there
are no limit settings on the bandwidth used by data uploaded to the server.
are no limit settings on the amount of data downloaded from the server.
- ``Limit automatically``: When enabled, the ownCloud client surrenders
available bandwidth to other applications. Use this option if there are
+2 -2
Ver Arquivo
@@ -90,7 +90,7 @@ Other issues can affect synchronization of your ownCloud files:
Log Files
---------
Effectively debugging software requires as much relevant information as can be
Effectively debugging software requires as much relative information as can be
obtained. To assist the ownCloud support personnel, please try to provide as
many relevant logs as possible. Log output can help with tracking down
problems and, if you report a bug, log output can help to resolve an issue more
@@ -119,7 +119,7 @@ To obtain the client log file:
5. Name the log file and click the 'Save' button.
The log file is saved in the location specifed.
The log files is saved in the location specifed.
Alternatively, you can launch the ownCloud Log Output window using the
``--logwindow`` command. After issuing this command, the Log Output window
Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 1.4 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 2.7 KiB

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 2.7 KiB

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 1.1 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 1.9 KiB

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 1.9 KiB

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 879 B

Depois

Largura:  |  Altura:  |  Tamanho: 1.4 KiB

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 2.5 KiB

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 1.9 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 3.6 KiB

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 3.6 KiB

-3
Ver Arquivo
@@ -158,9 +158,6 @@ class MenuExtension(GObject.GObject, Nautilus.MenuProvider):
syncedFile = False
for reg_path in socketConnect.registered_paths:
filename = get_local_path(file.get_uri())
#check if its a folder (ends with an /), if yes add a "/" otherwise it will not find the entry in the table
if os.path.isdir(filename+"/"):
filename=filename+"/"
# only show the menu extension if the file is synced and the sync
# status is ok. Not for ignored files etc.
if filename.startswith(reg_path) and socketConnect.nautilusVFSFile_table[filename]['state'] == 'OK':
-12
Ver Arquivo
@@ -129,15 +129,6 @@ void AccountManager::save(bool saveCredentials)
}
}
void AccountManager::wantsAccountSavedSlot(AccountPtr a)
{
qDebug() << "Saving account" << a->url().toString();
auto settings = Account::settingsWithGroup(QLatin1String(accountsC));
settings->beginGroup(a->id());
save(a, *settings, false); // don't save credentials they might not have been loaded yet
settings->endGroup();
}
void AccountManager::save(const AccountPtr& acc, QSettings& settings, bool saveCredentials)
{
settings.setValue(QLatin1String(urlC), acc->_url.toString());
@@ -215,9 +206,6 @@ AccountState *AccountManager::addAccount(const AccountPtr& newAccount)
}
newAccount->_id = id;
QObject::connect(newAccount.data(), SIGNAL(wantsAccountSaved(AccountPtr)),
this, SLOT(wantsAccountSavedSlot(AccountPtr)));
AccountStatePtr newAccountState(new AccountState(newAccount));
_accounts << newAccountState;
emit accountAdded(newAccountState.data());
-3
Ver Arquivo
@@ -78,9 +78,6 @@ private:
bool isAccountIdAvailable(const QString& id) const;
QString generateFreeAccountId() const;
public slots:
void wantsAccountSavedSlot(AccountPtr a);
Q_SIGNALS:
void accountAdded(AccountState *account);
+19 -31
Ver Arquivo
@@ -27,7 +27,6 @@
#include "accountstate.h"
#include "quotainfo.h"
#include "accountmanager.h"
#include "owncloudsetupwizard.h"
#include "creds/abstractcredentials.h"
#include <math.h>
@@ -102,6 +101,7 @@ AccountSettings::AccountSettings(AccountState *accountState, QWidget *parent) :
addAction(syncNowAction);
connect(ui->_folderList, SIGNAL(clicked(QModelIndex)), SLOT(slotFolderActivated(QModelIndex)));
connect(ui->_folderList, SIGNAL(doubleClicked(QModelIndex)),SLOT(slotDoubleClicked(QModelIndex)));
connect(ui->selectiveSyncApply, SIGNAL(clicked()), _model, SLOT(slotApplySelectiveSync()));
connect(ui->selectiveSyncCancel, SIGNAL(clicked()), _model, SLOT(resetFolders()));
@@ -111,7 +111,8 @@ AccountSettings::AccountSettings(AccountState *accountState, QWidget *parent) :
QColor color = palette().highlight().color();
ui->quotaProgressBar->setStyleSheet(QString::fromLatin1(progressBarStyleC).arg(color.name()));
ui->connectLabel->setWordWrap(true);
ui->connectLabel->setOpenExternalLinks(true);
QFont smallFont = ui->quotaInfoLabel->font();
smallFont.setPointSize(smallFont.pointSize() * 0.8);
ui->quotaInfoLabel->setFont(smallFont);
@@ -155,12 +156,10 @@ void AccountSettings::slotCustomContextMenuRequested(const QPoint &pos)
QMenu *menu = new QMenu(tv);
menu->setAttribute(Qt::WA_DeleteOnClose);
connect(menu->addAction(tr("Open folder")), SIGNAL(triggered(bool)),
this, SLOT(slotOpenCurrentFolder()));
connect(menu->addAction(folderPaused ? tr("Resume sync") : tr("Pause sync")), SIGNAL(triggered(bool)),
this, SLOT(slotEnableCurrentFolder()));
connect(menu->addAction(tr("Remove folder")), SIGNAL(triggered(bool)),
this, SLOT(slotRemoveCurrentFolder()));
connect(menu->addAction(folderPaused ? tr("Resume") : tr("Pause")), SIGNAL(triggered(bool)),
this, SLOT(slotEnableCurrentFolder()));
menu->exec(tv->mapToGlobal(pos));
}
@@ -171,14 +170,6 @@ void AccountSettings::slotFolderActivated( const QModelIndex& indx )
slotAddFolder();
return;
}
if (_model->classify(indx) == FolderStatusModel::RootFolder) {
// tries to find if we clicked on the '...' button.
QTreeView *tv = ui->_folderList;
auto pos = tv->mapFromGlobal(QCursor::pos());
if (FolderStatusDelegate::optionsButtonRect(tv->visualRect(indx)).contains(pos)) {
slotCustomContextMenuRequested(pos);
}
}
}
void AccountSettings::slotAddFolder()
@@ -220,11 +211,15 @@ void AccountSettings::slotFolderWizardAccepted()
}
}
bool ignoreHidden = true;
/* take the value from the definition of already existing folders. All folders have
* the same setting so far.
* the same setting so far, that's why it's ok to check the first one.
* The default is to not sync hidden files
*/
definition.ignoreHiddenFiles = folderMan->ignoreHiddenFiles();
if( folderMan->map().count() > 0) {
ignoreHidden = folderMan->map().begin().value()->ignoreHiddenFiles();
}
definition.ignoreHiddenFiles = ignoreHidden;
auto selectiveSyncBlackList = folderWizard->property("selectiveSyncBlackList").toStringList();
@@ -262,7 +257,7 @@ void AccountSettings::slotRemoveCurrentFolder()
// _model->removeRow( selected.row() );
int ret = QMessageBox::question( this, tr("Confirm Folder Remove"),
tr("<p>Do you really want to stop syncing the folder <i>%1</i>?</p>"
"<p><b>Note:</b> This will <b>not</b> delete any files.</p>").arg(alias),
"<p><b>Note:</b> This will not remove the files from your client.</p>").arg(alias),
QMessageBox::Yes|QMessageBox::No );
if( ret == QMessageBox::No ) {
@@ -304,14 +299,13 @@ void AccountSettings::slotResetCurrentFolder()
}
}
void AccountSettings::slotOpenCurrentFolder()
void AccountSettings::slotDoubleClicked( const QModelIndex& indx )
{
QModelIndex selected = ui->_folderList->selectionModel()->currentIndex();
if( ! indx.isValid() ) return;
QString alias = _model->data( indx, FolderStatusDelegate::FolderAliasRole ).toString();
if (alias.isEmpty()) return;
if( selected.isValid() ) {
QString alias = _model->data( selected, FolderStatusDelegate::FolderAliasRole ).toString();
emit openFolderAlias(alias);
}
emit openFolderAlias( alias );
}
void AccountSettings::showConnectionLabel( const QString& message, QStringList errors )
@@ -523,8 +517,8 @@ void AccountSettings::refreshSelectiveSyncStatus()
void AccountSettings::slotDeleteAccount()
{
int ret = QMessageBox::question( this, tr("Confirm Account Delete"),
tr("<p>Do you really want to remove the connection to the account <i>%1</i>?</p>"
"<p><b>Note:</b> This will <b>not</b> delete any files.</p>")
tr("<p>Do you really want to delete the account <i>%1</i>?</p>"
"<p><b>Note:</b> This will not remove the files from your client.</p>")
.arg(_accountState->account()->displayName()),
QMessageBox::Yes|QMessageBox::No );
@@ -535,12 +529,6 @@ void AccountSettings::slotDeleteAccount()
auto manager = AccountManager::instance();
manager->deleteAccount(_accountState);
manager->save();
// if there is no more account, show the wizard.
if( manager->accounts().isEmpty() ) {
OwncloudSetupWizard::runWizard(qApp, SLOT(slotownCloudWizardDone(int)));
}
}
bool AccountSettings::event(QEvent* e)
+3 -1
Ver Arquivo
@@ -58,11 +58,14 @@ public:
signals:
void folderChanged();
void openProtocol();
void openFolderAlias( const QString& );
void infoFolderAlias( const QString& );
public slots:
void slotFolderActivated( const QModelIndex& );
void slotOpenOC();
void slotDoubleClicked( const QModelIndex& );
void slotUpdateQuota( qint64,qint64 );
void slotAccountStateChanged(int state);
@@ -74,7 +77,6 @@ protected slots:
void slotSyncCurrentFolderNow();
void slotRemoveCurrentFolder();
void slotResetCurrentFolder();
void slotOpenCurrentFolder();
void slotFolderWizardAccepted();
void slotFolderWizardRejected();
void slotDeleteAccount();
+1 -4
Ver Arquivo
@@ -41,9 +41,6 @@
<property name="text">
<string>Connected with &lt;server&gt; as &lt;user&gt;</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
@@ -77,7 +74,7 @@
</sizepolicy>
</property>
<property name="title">
<string/>
<string>Storage Usage</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
+1 -6
Ver Arquivo
@@ -259,14 +259,9 @@ QString AccountState::shortDisplayNameForSettings() const
userWithoutMailHost = userWithoutMailHost.left(userWithoutMailHost.lastIndexOf('@'));
}
QString hostWithoutTld = account()->url().host();
if (hostWithoutTld.contains('.') && !hostWithoutTld.at(0).isDigit()) {
if (hostWithoutTld.contains('.')) {
hostWithoutTld = hostWithoutTld.left(hostWithoutTld.lastIndexOf('.'));
hostWithoutTld = hostWithoutTld.replace(QLatin1String("www."), QLatin1String(""));
hostWithoutTld = hostWithoutTld.replace(QLatin1String("cloud."), QLatin1String(""));
hostWithoutTld = hostWithoutTld.replace(QLatin1String("sync."), QLatin1String(""));
hostWithoutTld = hostWithoutTld.replace(QLatin1String("drive."), QLatin1String(""));
hostWithoutTld = hostWithoutTld.replace(QLatin1String("share."), QLatin1String(""));
hostWithoutTld = hostWithoutTld.replace(QLatin1String("web."), QLatin1String(""));
}
return userWithoutMailHost + QLatin1String("\n") + hostWithoutTld;
@@ -52,9 +52,6 @@ ShibbolethWebView::ShibbolethWebView(AccountPtr account, QWidget* parent)
connect(page, SIGNAL(loadFinished(bool)),
this, SLOT(slotLoadFinished(bool)));
// Make sure to accept the same SSL certificate issues as the regular QNAM we use for syncing
QObject::connect(page->networkAccessManager(), SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)),
_account.data(), SLOT(slotHandleSslErrors(QNetworkReply*,QList<QSslError>)));
// The Account keeps ownership of the cookie jar, it must outlive this webview.
account->lendCookieJarTo(page->networkAccessManager());
+9 -35
Ver Arquivo
@@ -177,19 +177,6 @@ void Folder::checkLocalPath()
}
}
QString Folder::aliasGui() const
{
if (remotePath().length() > 0 && remotePath() != QLatin1String("/")) {
QString a = QFile(remotePath()).fileName();
if (a.startsWith('/')) {
a = a.remove(0, 1);
}
return a;
} else {
return Theme::instance()->appNameGUI();
}
}
QString Folder::alias() const
{
return _definition.alias;
@@ -204,23 +191,6 @@ QString Folder::path() const
return p;
}
QString Folder::shortGuiPath() const
{
QString p = _definition.localPath;
QString home = QDir::homePath();
if( ! home.endsWith('/') ) {
home.append('/');
}
if (p.startsWith(home)) {
p = p.mid(home.length());
}
if (p.length() > 1 && p.endsWith('/')) {
p.chop(1);
}
return QDir::toNativeSeparators(p);
}
bool Folder::ignoreHiddenFiles()
{
bool re(_definition.ignoreHiddenFiles);
@@ -258,6 +228,11 @@ QUrl Folder::remoteUrl() const
return Account::concatUrlPath(_accountState->account()->davUrl(), remotePath());
}
QString Folder::nativePath() const
{
return QDir::toNativeSeparators(path());
}
bool Folder::syncPaused() const
{
return _definition.paused;
@@ -873,8 +848,7 @@ void Folder::startSync(const QStringList &pathList)
SLOT(slotAboutToRemoveAllFiles(SyncFileItem::Direction,bool*)));
connect(_engine.data(), SIGNAL(folderDiscovered(bool,QString)), this, SLOT(slotFolderDiscovered(bool,QString)));
connect(_engine.data(), SIGNAL(transmissionProgress(ProgressInfo)), this, SLOT(slotTransmissionProgress(ProgressInfo)));
connect(_engine.data(), SIGNAL(itemCompleted(const SyncFileItem &, const PropagatorJob &)),
this, SLOT(slotItemCompleted(const SyncFileItem &, const PropagatorJob &)));
connect(_engine.data(), SIGNAL(jobCompleted(const SyncFileItem &)), this, SLOT(slotJobCompleted(const SyncFileItem &)));
connect(_engine.data(), SIGNAL(syncItemDiscovered(const SyncFileItem &)), this, SLOT(slotSyncItemDiscovered(const SyncFileItem &)));
connect(_engine.data(), SIGNAL(newBigFolder(QString)), this, SLOT(slotNewBigFolderDiscovered(QString)));
@@ -1059,8 +1033,8 @@ void Folder::slotTransmissionProgress(const ProgressInfo &pi)
ProgressDispatcher::instance()->setProgressInfo(alias(), pi);
}
// a item is completed: count the errors and forward to the ProgressDispatcher
void Folder::slotItemCompleted(const SyncFileItem &item, const PropagatorJob& job)
// a job is completed: count the errors and forward to the ProgressDispatcher
void Folder::slotJobCompleted(const SyncFileItem &item)
{
if (item.hasErrorStatus()) {
_stateLastSyncItemsWithError.insert(item._file);
@@ -1070,7 +1044,7 @@ void Folder::slotItemCompleted(const SyncFileItem &item, const PropagatorJob& jo
// Count all error conditions.
_syncResult.setWarnCount(_syncResult.warnCount()+1);
}
emit ProgressDispatcher::instance()->itemCompleted(alias(), item, job);
emit ProgressDispatcher::instance()->jobCompleted(alias(), item);
}
void Folder::slotSyncItemDiscovered(const SyncFileItem & item)
+7 -9
Ver Arquivo
@@ -52,8 +52,7 @@ class FolderDefinition
{
public:
FolderDefinition()
: paused(false)
, ignoreHiddenFiles(true)
: paused(false), ignoreHiddenFiles(false)
{}
/// The name of the folder in the ui and internally
@@ -101,12 +100,6 @@ public:
* alias or nickname
*/
QString alias() const;
QString aliasGui() const; // since 2.0 we don't want to show aliases anymore, show the path instead
/**
* short path to display on the GUI (native separators)
*/
QString shortGuiPath() const;
/**
* local folder path
@@ -128,6 +121,11 @@ public:
*/
QUrl remoteUrl() const;
/**
* local folder path with native separators
*/
QString nativePath() const;
/**
* switch sync on or off
* If the sync is switched off, the startSync method is not going to
@@ -242,7 +240,7 @@ private slots:
void slotFolderDiscovered(bool local, QString folderName);
void slotTransmissionProgress(const ProgressInfo& pi);
void slotItemCompleted(const SyncFileItem&, const PropagatorJob&);
void slotJobCompleted(const SyncFileItem&);
void slotSyncItemDiscovered(const SyncFileItem & item);
void slotRunEtagJob();
-19
Ver Arquivo
@@ -405,7 +405,6 @@ Folder* FolderMan::setupFolderFromOldConfigFile(const QString &file, AccountStat
folderDefinition.localPath = path;
folderDefinition.targetPath = targetPath;
folderDefinition.paused = paused;
folderDefinition.ignoreHiddenFiles = ignoreHiddenFiles();
folder = addFolderInternal(folderDefinition);
if (folder) {
@@ -1177,24 +1176,6 @@ QString FolderMan::checkPathValidityForNewFolder(const QString& path, bool forNe
}
bool FolderMan::ignoreHiddenFiles() const
{
if (_folderMap.empty()) {
return true;
}
return _folderMap.begin().value()->ignoreHiddenFiles();
}
void FolderMan::setIgnoreHiddenFiles(bool ignore)
{
// Note that the setting will revert to 'true' if all folders
// are deleted...
foreach (Folder* folder, _folderMap) {
folder->setIgnoreHiddenFiles(ignore);
folder->saveToSettings();
}
}
void FolderMan::restartApplication()
{
if( Utility::isLinux() ) {
-9
Ver Arquivo
@@ -99,15 +99,6 @@ public:
*/
QString checkPathValidityForNewFolder(const QString &path, bool forNewDirectory = false);
/**
* While ignoring hidden files can theoretically be switched per folder,
* it's currently a global setting that users can only change for all folders
* at once.
* These helper functions can be removed once it's properly per-folder.
*/
bool ignoreHiddenFiles() const;
void setIgnoreHiddenFiles(bool ignore);
signals:
/**
* signal to indicate a folder has changed its sync state.
+44 -73
Ver Arquivo
@@ -37,6 +37,22 @@ QString FolderStatusDelegate::addFolderText()
QSize FolderStatusDelegate::sizeHint(const QStyleOptionViewItem & option ,
const QModelIndex & index) const
{
auto classif = static_cast<const FolderStatusModel *>(index.model())->classify(index);
if (classif == FolderStatusModel::AddButton) {
QFontMetrics fm(option.font);
QStyleOptionButton opt;
static_cast<QStyleOption&>(opt) = option;
opt.text = addFolderText();
return QApplication::style()->sizeFromContents(
QStyle::CT_PushButton, &opt, fm.size(Qt::TextSingleLine, opt.text)).
expandedTo(QApplication::globalStrut());
}
if (classif != FolderStatusModel::RootFolder) {
return QStyledItemDelegate::sizeHint(option, index);
}
Q_UNUSED(option)
QFont aliasFont = option.font;
QFont font = option.font;
aliasFont.setPointSize( font.pointSize() +2 );
@@ -47,22 +63,6 @@ QSize FolderStatusDelegate::sizeHint(const QStyleOptionViewItem & option ,
int aliasMargin = aliasFm.height()/2;
int margin = fm.height()/4;
auto classif = static_cast<const FolderStatusModel *>(index.model())->classify(index);
if (classif == FolderStatusModel::AddButton) {
QFontMetrics fm(option.font);
QStyleOptionButton opt;
static_cast<QStyleOption&>(opt) = option;
opt.text = addFolderText();
return QApplication::style()->sizeFromContents(
QStyle::CT_PushButton, &opt, fm.size(Qt::TextSingleLine, opt.text)).
expandedTo(QApplication::globalStrut())
+ QSize(0, 2*aliasMargin);
}
if (classif != FolderStatusModel::RootFolder) {
return QStyledItemDelegate::sizeHint(option, index);
}
// calc height
int h = aliasMargin; // margin to top
@@ -93,6 +93,27 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
{
QStyledItemDelegate::paint(painter,option,index);
if (index.data(AddButton).toBool()) {
QSize hint = sizeHint(option, index);
QStyleOptionButton opt;
static_cast<QStyleOption&>(opt) = option;
opt.state &= ~QStyle::State_Selected;
opt.state |= QStyle::State_Raised;
opt.text = addFolderText();
opt.rect.setWidth(qMin(opt.rect.width(), hint.width()));
QApplication::style()->drawControl(QStyle::CE_PushButton, &opt, painter
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
, option.widget
#endif
);
return;
}
if (static_cast<const FolderStatusModel *>(index.model())->classify(index) != FolderStatusModel::RootFolder) {
return;
}
painter->save();
QFont aliasFont = option.font;
QFont subFont = option.font;
QFont errorFont = subFont;
@@ -110,30 +131,8 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
int aliasMargin = aliasFm.height()/2;
int margin = subFm.height()/4;
if (index.data(AddButton).toBool()) {
QSize hint = sizeHint(option, index);
QStyleOptionButton opt;
static_cast<QStyleOption&>(opt) = option;
opt.state &= ~QStyle::State_Selected;
opt.state |= QStyle::State_Raised;
opt.text = addFolderText();
opt.rect.setWidth(qMin(opt.rect.width(), hint.width()));
opt.rect.adjust(0, aliasMargin, 0, -aliasMargin);
QApplication::style()->drawControl(QStyle::CE_PushButton, &opt, painter
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
, option.widget
#endif
);
return;
}
if (static_cast<const FolderStatusModel *>(index.model())->classify(index) != FolderStatusModel::RootFolder) {
return;
}
painter->save();
QIcon statusIcon = qvariant_cast<QIcon>(index.data(FolderStatusIconRole));
QString aliasText = qvariant_cast<QString>(index.data(HeaderRole));
QString aliasText = qvariant_cast<QString>(index.data(FolderAliasRole));
QString pathText = qvariant_cast<QString>(index.data(FolderPathRole));
QString remotePath = qvariant_cast<QString>(index.data(FolderSecondPathRole));
QStringList errorTexts= qvariant_cast<QStringList>(index.data(FolderErrorMsg));
@@ -225,7 +224,7 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
QString elidedRemotePathText;
if (remotePath.isEmpty() || remotePath == QLatin1String("/")) {
elidedRemotePathText = subFm.elidedText(tr("Syncing selected files in your account with"),
elidedRemotePathText = subFm.elidedText(tr("Syncing all files in your account with"),
Qt::ElideRight, remotePathRect.width());
} else {
elidedRemotePathText = subFm.elidedText(tr("Remote path: %1").arg(remotePath),
@@ -273,7 +272,7 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
if( !overallString.isEmpty() || !itemString.isEmpty()) {
int fileNameTextHeight = subFm.boundingRect(tr("File")).height();
int barHeight = qMax(fileNameTextHeight, aliasFm.height()+4); ;
int overallWidth = option.rect.width()-aliasMargin-nextToIcon;
int overallWidth = option.rect.width()-2*aliasMargin;
painter->save();
@@ -284,9 +283,9 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
// Overall Progress Bar.
QRect pBRect;
pBRect.setTop( h );
pBRect.setLeft( nextToIcon );
pBRect.setLeft( iconRect.left());
pBRect.setHeight(barHeight);
pBRect.setWidth( overallWidth - progressTextWidth - 2 * margin );
pBRect.setWidth( overallWidth - progressTextWidth - margin );
QStyleOptionProgressBarV2 pBarOpt;
@@ -295,6 +294,7 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
pBarOpt.maximum = 100;
pBarOpt.progress = overallPercent;
pBarOpt.orientation = Qt::Horizontal;
pBarOpt.palette = palette;
pBarOpt.rect = pBRect;
QApplication::style()->drawControl( QStyle::CE_ProgressBar, &pBarOpt, painter );
@@ -313,7 +313,7 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
// Individual File Progress
QRect fileRect;
fileRect.setTop( pBRect.bottom() + margin);
fileRect.setLeft(pBRect.left());
fileRect.setLeft( iconRect.left());
fileRect.setWidth(overallWidth);
fileRect.setHeight(fileNameTextHeight);
QString elidedText = progressFm.elidedText(itemString, Qt::ElideLeft, fileRect.width());
@@ -324,18 +324,6 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
}
painter->restore();
{
QStyleOptionToolButton btnOpt;
btnOpt.text = QLatin1String("...");
btnOpt.state = option.state;
btnOpt.state &= ~(QStyle::State_Selected | QStyle::State_HasFocus);
btnOpt.state |= QStyle::State_Raised;
btnOpt.arrowType = Qt::NoArrow;
btnOpt.subControls = QStyle::SC_ToolButton;
btnOpt.rect = optionsButtonRect(option.rect);
QApplication::style()->drawComplexControl( QStyle::CC_ToolButton, &btnOpt, painter );
}
}
bool FolderStatusDelegate::editorEvent ( QEvent * event, QAbstractItemModel * model,
@@ -344,21 +332,4 @@ bool FolderStatusDelegate::editorEvent ( QEvent * event, QAbstractItemModel * mo
return QStyledItemDelegate::editorEvent(event, model, option, index);
}
QRect FolderStatusDelegate::optionsButtonRect(const QRect &within)
{
QStyleOptionToolButton opt;
opt.text = QLatin1String("...");
QFontMetrics fm = QFontMetrics(QFont());
QSize textSize = fm.size(Qt::TextShowMnemonic, opt.text);
opt.rect.setSize(textSize);
QSize size = QApplication::style()->sizeFromContents(QStyle::CT_ToolButton, &opt, textSize).
expandedTo(QApplication::globalStrut());
int margin = QApplication::style()->pixelMetric(QStyle::PM_DefaultLayoutSpacing);
return QRect(QPoint(within.right() - size.width() - margin,
within.top() + within.height()/2 - size.height()/2),
size);
}
} // namespace OCC
-7
Ver Arquivo
@@ -28,7 +28,6 @@ class FolderStatusDelegate : public QStyledItemDelegate
public:
enum datarole { FolderAliasRole = Qt::UserRole + 100,
HeaderRole,
FolderPathRole,
FolderSecondPathRole,
FolderRemotePath,
@@ -51,12 +50,6 @@ public:
QSize sizeHint( const QStyleOptionViewItem&, const QModelIndex& ) const Q_DECL_OVERRIDE;
bool editorEvent( QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option,
const QModelIndex& index ) Q_DECL_OVERRIDE;
/**
* return the position of the option button within the item
*/
static QRect optionsButtonRect(const QRect &within);
private:
static QString addFolderText();
};
+46 -95
Ver Arquivo
@@ -75,27 +75,18 @@ Qt::ItemFlags FolderStatusModel::flags ( const QModelIndex &index ) const
#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0)
ret = Qt::ItemNeverHasChildren;
#endif
if (!_accountState->isConnected()) {
return ret;
} else if (_folders.count() == 1) {
auto remotePath = _folders.at(0)._folder->remotePath();
if (_folders.count() == 1 && _folders.at(0)._folder->remotePath() == QLatin1String("/")) {
// special case when syncing the entire owncloud: disable the add folder button (#3438)
if (remotePath.isEmpty() || remotePath == QLatin1String("/")) {
return ret;
}
return ret;
} else if (!_accountState->isConnected()) {
return ret;
}
return Qt::ItemIsEnabled | ret;
}
case ErrorLabel:
return Qt::ItemIsEnabled
#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0)
| Qt::ItemNeverHasChildren
#endif
;
case RootFolder:
return Qt::ItemIsEnabled;
return Qt::ItemIsSelectable | Qt::ItemIsEnabled;
case SubFolder:
return Qt::ItemIsEnabled | Qt::ItemIsUserCheckable;
return Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable;
}
return 0;
}
@@ -115,14 +106,12 @@ QVariant FolderStatusModel::data(const QModelIndex &index, int role) const
} else if (role == Qt::ToolTipRole) {
if (!_accountState->isConnected()) {
return tr("You need to be connected to add a folder");
} if (_folders.count() == 1) {
auto remotePath = _folders.at(0)._folder->remotePath();
if (remotePath.isEmpty() || remotePath == QLatin1String("/")) {
// Syncing the entire owncloud: disable the add folder button (#3438)
return tr("Adding folder is disabled because your are already syncing all your files. "
"If you want to sync multiple folders, please remove the currently "
"configured root folder.");
}
} else if (_folders.count() == 1
&& _folders.at(0)._folder->remotePath() == QLatin1String("/")) {
// Syncing the entire owncloud: disable the add folder button (#3438)
return tr("Adding folder is disabled because your are already syncing all your files. "
"If you want to sync multiple folders, please remove the currently "
"configured root folder.");
}
return tr("Click this button to add a folder to synchronize.");
}
@@ -147,11 +136,6 @@ QVariant FolderStatusModel::data(const QModelIndex &index, int role) const
}
}
return QVariant();
case ErrorLabel:
switch(role) {
case Qt::DisplayRole: return tr("Error while loading the list of folders from the server.");
default: return QVariant();
}
case RootFolder:
break;
}
@@ -165,9 +149,8 @@ QVariant FolderStatusModel::data(const QModelIndex &index, int role) const
const bool accountConnected = _accountState->isConnected();
switch (role) {
case FolderStatusDelegate::FolderPathRole : return f->shortGuiPath();
case FolderStatusDelegate::FolderPathRole : return f->nativePath();
case FolderStatusDelegate::FolderSecondPathRole : return f->remotePath();
case FolderStatusDelegate::HeaderRole : return f->aliasGui();
case FolderStatusDelegate::FolderAliasRole : return f->alias();
case FolderStatusDelegate::FolderSyncPaused : return f->syncPaused();
case FolderStatusDelegate::FolderAccountConnected : return accountConnected;
@@ -286,24 +269,19 @@ int FolderStatusModel::columnCount(const QModelIndex&) const
int FolderStatusModel::rowCount(const QModelIndex& parent) const
{
if (!parent.isValid()) {
if( Theme::instance()->singleSyncFolder() && _folders.count() != 0) {
// "Add folder" button not visible in the singleSyncFolder configuration.
return _folders.count();
}
return _folders.count() + 1; // +1 for the "add folder" button
return _folders.count() + 1;
}
auto info = infoForIndex(parent);
if (!info)
return 0;
if (info->_hasError)
return 1;
return info->_subs.count();
}
FolderStatusModel::ItemType FolderStatusModel::classify(const QModelIndex& index) const
{
if (auto sub = static_cast<SubFolderInfo*>(index.internalPointer())) {
return sub->_hasError ? ErrorLabel : SubFolder;
if (index.internalPointer()) {
return SubFolder;
}
if (index.row() < _folders.count()) {
return RootFolder;
@@ -315,12 +293,8 @@ FolderStatusModel::SubFolderInfo* FolderStatusModel::infoForIndex(const QModelIn
{
if (!index.isValid())
return 0;
if (auto parentInfo = static_cast<SubFolderInfo*>(index.internalPointer())) {
if (parentInfo->_hasError) {
// Error label
return 0;
}
return &parentInfo->_subs[index.row()];
if (auto parentInfo = index.internalPointer()) {
return &static_cast<SubFolderInfo*>(parentInfo)->_subs[index.row()];
} else {
if (index.row() >= _folders.count()) {
// AddButton
@@ -337,22 +311,18 @@ QModelIndex FolderStatusModel::index(int row, int column, const QModelIndex& par
return createIndex(row, column/*, nullptr*/);
}
switch(classify(parent)) {
case AddButton:
case ErrorLabel:
return QModelIndex();
case AddButton: return QModelIndex();
case RootFolder:
if (_folders.count() <= parent.row())
return QModelIndex(); // should not happen
return createIndex(row, column, const_cast<SubFolderInfo *>(&_folders[parent.row()]));
case SubFolder: {
auto info = static_cast<SubFolderInfo*>(parent.internalPointer());
if (info->_subs.count() <= parent.row())
case SubFolder:
//return QModelIndex();
if (static_cast<SubFolderInfo*>(parent.internalPointer())->_subs.count() <= parent.row())
return QModelIndex(); // should not happen
if (!info->_subs.at(parent.row())._hasError
&& info->_subs.at(parent.row())._subs.count() <= row)
if (static_cast<SubFolderInfo*>(parent.internalPointer())->_subs.at(parent.row())._subs.count() <= row)
return QModelIndex(); // should not happen
return createIndex(row, column, &info->_subs[parent.row()]);
}
return createIndex(row, column, &static_cast<SubFolderInfo*>(parent.internalPointer())->_subs[parent.row()]);
}
return QModelIndex();
}
@@ -367,18 +337,17 @@ QModelIndex FolderStatusModel::parent(const QModelIndex& child) const
case AddButton:
return QModelIndex();
case SubFolder:
case ErrorLabel:
break;
}
auto pathIdx = static_cast<SubFolderInfo*>(child.internalPointer())->_pathIdx;
auto pathIdx = static_cast<SubFolderInfo*>(child.internalPointer())->_subs[child.row()]._pathIdx;
int i = 1;
Q_ASSERT(pathIdx.at(0) < _folders.count());
if (pathIdx.count() == 1) {
if (pathIdx.count() == 2) {
return createIndex(pathIdx.at(0), 0/*, nullptr*/);
}
const SubFolderInfo *info = &_folders[pathIdx.at(0)];
while (i < pathIdx.count() - 1) {
while (i < pathIdx.count() - 2) {
Q_ASSERT(pathIdx.at(i) < info->_subs.count());
info = &info->_subs[pathIdx.at(i)];
++i;
@@ -453,13 +422,7 @@ void FolderStatusModel::slotUpdateDirectories(const QStringList &list_)
auto list = list_;
list.removeFirst(); // remove the parent item
if (parentInfo->_hasError) {
beginRemoveRows(idx, 0 ,0);
parentInfo->_hasError = false;
endRemoveRows();
}
beginInsertRows(idx, 0, list.count() - 1);
beginInsertRows(idx, 0, list.count());
QUrl url = parentInfo->_folder->remoteUrl();
QString pathToRemove = url.path();
@@ -526,6 +489,14 @@ void FolderStatusModel::slotUpdateDirectories(const QStringList &list_)
void FolderStatusModel::slotLscolFinishedWithError(QNetworkReply* r)
{
/*
if (r->error() == QNetworkReply::ContentNotFoundError) {
_loading->setText(tr("No subfolders currently on the server."));
} else {
_loading->setText(tr("An error occured while loading the list of sub folders."));
}
_loading->resize(_loading->sizeHint()); // because it's not in a layout
*/
auto job = qobject_cast<LsColJob *>(sender());
Q_ASSERT(job);
QModelIndex idx = qvariant_cast<QPersistentModelIndex>(job->property(propertyParentIndexC));
@@ -537,10 +508,6 @@ void FolderStatusModel::slotLscolFinishedWithError(QNetworkReply* r)
parentInfo->_fetching = false;
if (r->error() == QNetworkReply::ContentNotFoundError) {
parentInfo->_fetched = true;
} else if (!parentInfo->_hasError) {
beginInsertRows(idx, 0, 0);
parentInfo->_hasError = true;
endInsertRows();
}
}
}
@@ -599,14 +566,13 @@ void FolderStatusModel::slotApplySelectiveSync()
QStringList blackList = createBlackList(&_folders[i], oldBlackList);
folder->journalDb()->setSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, blackList);
auto blackListSet = blackList.toSet();
auto oldBlackListSet = oldBlackList.toSet();
// The folders that were undecided or blacklisted and that are now checked should go on the white list.
// The user confirmed them already just now.
QStringList toAddToWhiteList = ((oldBlackListSet + folder->journalDb()->getSelectiveSyncList(
SyncJournalDb::SelectiveSyncUndecidedList).toSet()) - blackListSet).toList();
// The folders that were undecided should be part of the white list if they are not in the blacklist
QStringList toAddToWhiteList;
foreach (const auto &undec, folder->journalDb()->getSelectiveSyncList(SyncJournalDb::SelectiveSyncUndecidedList)) {
if (!blackList.contains(undec)) {
toAddToWhiteList.append(undec);
}
}
if (!toAddToWhiteList.isEmpty()) {
auto whiteList = folder->journalDb()->getSelectiveSyncList(SyncJournalDb::SelectiveSyncWhiteList);
whiteList += toAddToWhiteList;
@@ -616,6 +582,8 @@ void FolderStatusModel::slotApplySelectiveSync()
folder->journalDb()->setSelectiveSyncList(SyncJournalDb::SelectiveSyncUndecidedList, QStringList());
// do the sync if there was changes
auto blackListSet = blackList.toSet();
auto oldBlackListSet = oldBlackList.toSet();
auto changes = (oldBlackListSet - blackListSet) + (blackListSet - oldBlackListSet);
if (!changes.isEmpty()) {
if (folder->isBusy()) {
@@ -824,23 +792,6 @@ void FolderStatusModel::slotFolderSyncStateChange()
// update the icon etc. now
slotUpdateFolderState(f);
if (state == SyncResult::Success) {
foreach (const SyncFileItemPtr &i, f->syncResult().syncFileItemVector()) {
if (i->_isDirectory && (i->_instruction == CSYNC_INSTRUCTION_NEW
|| i->_instruction == CSYNC_INSTRUCTION_REMOVE)) {
// There is a new or a removed folder. reset all data
_folders[folderIndex]._fetched = false;
_folders[folderIndex]._fetching = false;
if (!_folders.at(folderIndex)._subs.isEmpty()) {
beginRemoveRows(index(folderIndex), 0, _folders.at(folderIndex)._subs.count() - 1);
_folders[folderIndex]._subs.clear();
endRemoveRows();
}
return;
}
}
}
}
void FolderStatusModel::resetFolders()
+2 -3
Ver Arquivo
@@ -53,7 +53,7 @@ public:
struct SubFolderInfo {
SubFolderInfo()
: _folder(0), _size(0), _fetched(false), _fetching(false), _isUndecided(false),
_hasError(false), _checked(Qt::Checked) {}
_checked(Qt::Checked) {}
Folder *_folder;
QString _name;
QString _path;
@@ -63,7 +63,6 @@ public:
bool _fetched; // If we did the LSCOL for this folder already
bool _fetching;
bool _isUndecided; // undecided folder are the big folder that the user has not accepted yet
bool _hasError; // If the last fetching job ended in an error
Qt::CheckState _checked;
struct Progress {
@@ -80,7 +79,7 @@ public:
QVector<SubFolderInfo> _folders;
enum ItemType { RootFolder, SubFolder, AddButton, ErrorLabel };
enum ItemType { RootFolder, SubFolder, AddButton/*, SelectiveSyncText*/ };
ItemType classify(const QModelIndex &index) const;
SubFolderInfo *infoForIndex(const QModelIndex &index) const;
+2 -11
Ver Arquivo
@@ -87,17 +87,8 @@ void WatcherThread::watchChanges(size_t fileNotifyBufferSize,
}
longfile = QDir::cleanPath(longfile);
// Skip modifications of folders: One of these is triggered for changes
// and new files in a folder, probably because of the folder's mtime
// changing. We don't need them.
bool skip = curEntry->Action == FILE_ACTION_MODIFIED
&& QFileInfo(longfile).isDir();
if (!skip) {
//qDebug() << Q_FUNC_INFO << "Found change in" << longfile
// << "action:" << curEntry->Action;
emit changed(longfile);
}
qDebug() << Q_FUNC_INFO << "Found change in" << longfile << "action:" << curEntry->Action;
emit changed(longfile);
if (curEntry->NextEntryOffset == 0) {
break;
+1 -14
Ver Arquivo
@@ -69,15 +69,7 @@ FolderWizardLocalPath::FolderWizardLocalPath()
_ui.localFolderLineEdit->setToolTip(tr("Enter the path to the local folder."));
registerField(QLatin1String("alias*"), _ui.aliasLineEdit);
QString newAlias = Theme::instance()->appName();
int count = 0;
while (FolderMan::instance()->folder(newAlias)) {
// There is already a folder configured with this name and folder names need to be unique
newAlias = Theme::instance()->appName() + QString::number(++count);
}
_ui.aliasLineEdit->setText( newAlias );
_ui.aliasLineEdit->setText( Theme::instance()->appNameGUI() );
_ui.aliasLineEdit->setToolTip(tr("The directory alias is a descriptive name for this sync connection."));
_ui.warnLabel->setTextFormat(Qt::RichText);
_ui.warnLabel->hide();
@@ -165,11 +157,6 @@ void FolderWizardLocalPath::slotChooseLocalFolder()
QDir pickedDir(dir);
QString newAlias = pickedDir.dirName();
int count = 0;
while (FolderMan::instance()->folder(newAlias)) {
// There is already a folder configured with this name and folder names need to be unique
newAlias = pickedDir.dirName() + QString::number(++count);
}
if( !newAlias.isEmpty() ) {
_ui.aliasLineEdit->setText(newAlias);
}
-5
Ver Arquivo
@@ -50,7 +50,6 @@ GeneralSettings::GeneralSettings(QWidget *parent) :
if (about.isEmpty()) {
_ui->aboutGroupBox->hide();
} else {
_ui->aboutLabel->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextBrowserInteraction);
_ui->aboutLabel->setText(about);
_ui->aboutLabel->setWordWrap(true);
_ui->aboutLabel->setOpenExternalLinks(true);
@@ -77,10 +76,6 @@ GeneralSettings::GeneralSettings(QWidget *parent) :
connect(_ui->ignoredFilesButton, SIGNAL(clicked()), SLOT(slotIgnoreFilesEditor()));
connect(_ui->addAccountButton, SIGNAL(clicked()), SLOT(slotOpenAccountWizard()));
if (Theme::instance()->singleAccount()) {
_ui->addAccountButton->setVisible(false);
}
}
GeneralSettings::~GeneralSettings()
+12 -3
Ver Arquivo
@@ -58,7 +58,12 @@ IgnoreListEditor::IgnoreListEditor(QWidget *parent) :
ui->tableWidget->horizontalHeader()->setResizeMode(patternCol, QHeaderView::Stretch);
ui->tableWidget->verticalHeader()->setVisible(false);
ui->syncHiddenFilesCheckBox->setChecked( !FolderMan::instance()->ignoreHiddenFiles() );
/* value for syncing hidden files */
bool ignoreHidden = true;
if( FolderMan::instance()->map().count() > 0 ) {
ignoreHidden = FolderMan::instance()->map().begin().value()->ignoreHiddenFiles();
}
ui->ignoreHiddenFilesCheckBox->setChecked( !ignoreHidden );
}
IgnoreListEditor::~IgnoreListEditor()
@@ -68,7 +73,7 @@ IgnoreListEditor::~IgnoreListEditor()
bool IgnoreListEditor::ignoreHiddenFiles()
{
return ! ui->syncHiddenFilesCheckBox->isChecked();
return ! ui->ignoreHiddenFilesCheckBox->isChecked();
}
void IgnoreListEditor::slotItemSelectionChanged()
@@ -119,11 +124,15 @@ void IgnoreListEditor::slotUpdateLocalIgnoreList()
}
/* handle the hidden file checkbox */
bool ignoreHiddenFiles = ! ui->ignoreHiddenFilesCheckBox->isChecked();
/* the ignoreHiddenFiles flag is a folder specific setting, but for now, it is
* handled globally. Save it to every folder that is defined.
*/
FolderMan::instance()->setIgnoreHiddenFiles(ignoreHiddenFiles());
foreach (Folder* folder, FolderMan::instance()->map()) {
folder->setIgnoreHiddenFiles(ignoreHiddenFiles);
folder->saveToSettings();
}
}
void IgnoreListEditor::slotAddPattern()
+1 -1
Ver Arquivo
@@ -21,7 +21,7 @@
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QCheckBox" name="syncHiddenFilesCheckBox">
<widget class="QCheckBox" name="ignoreHiddenFilesCheckBox">
<property name="text">
<string>Sync hidden files</string>
</property>
+3 -25
Ver Arquivo
@@ -230,15 +230,6 @@ void ownCloudGui::slotComputeOverallSyncStatus()
if (!problemAccounts.empty()) {
_tray->setIcon(Theme::instance()->folderOfflineIcon(true));
#ifdef Q_OS_WIN
// Windows has a 128-char tray tooltip length limit.
QStringList accountNames;
foreach (AccountStatePtr a, problemAccounts) {
accountNames.append(a->account()->displayName());
}
_tray->setToolTip(tr("Disconnected from %1").arg(
accountNames.join(QLatin1String(", "))));
#else
QStringList messages;
messages.append(tr("Disconnected from accounts:"));
foreach (AccountStatePtr a, problemAccounts) {
@@ -251,7 +242,6 @@ void ownCloudGui::slotComputeOverallSyncStatus()
messages.append(message);
}
_tray->setToolTip(messages.join(QLatin1String("\n\n")));
#endif
return;
}
@@ -269,19 +259,15 @@ void ownCloudGui::slotComputeOverallSyncStatus()
// create the tray blob message, check if we have an defined state
if( overallResult.status() != SyncResult::Undefined ) {
QStringList allStatusStrings;
if( map.count() > 0 ) {
#ifdef Q_OS_WIN
// Windows has a 128-char tray tooltip length limit.
trayMessage = folderMan->statusToString(overallResult.status(), false);
#else
QStringList allStatusStrings;
foreach(Folder* folder, map.values()) {
qDebug() << "Folder in overallStatus Message: " << folder << " with name " << folder->alias();
QString folderMessage = folderMan->statusToString(folder->syncResult().status(), folder->syncPaused());
allStatusStrings += tr("Folder %1: %2").arg(folder->alias(), folderMessage);
}
trayMessage = allStatusStrings.join(QLatin1String("\n"));
#endif
} else {
trayMessage = tr("No sync folders configured.");
}
@@ -342,7 +328,7 @@ void ownCloudGui::addAccountContextMenu(AccountStatePtr accountState, QMenu *men
folderName = Theme::instance()->appNameGUI();
}
QAction *action = new QAction( tr("Open folder '%1'").arg(folder->path()), this );
QAction *action = new QAction( tr("Open folder '%1'").arg(folder->alias()), this );
connect(action, SIGNAL(triggered()),_folderOpenActionMapper, SLOT(map()));
_folderOpenActionMapper->setMapping( action, folder->alias() );
menu->addAction(action);
@@ -431,14 +417,6 @@ void ownCloudGui::setupContextMenu()
_contextMenu->addAction(_actionLogin);
}
_contextMenu->addAction(_actionQuit);
// Workaround for #3656, Qt 5.5.0 + dbus based tray integration.
#ifdef Q_OS_LINUX
#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
_tray->hide();
_tray->show();
#endif
#endif
}
-3
Ver Arquivo
@@ -80,7 +80,6 @@ void OwncloudSetupWizard::startWizard()
{
AccountPtr account = AccountManager::createAccount();
account->setCredentials(CredentialsFactory::create("dummy"));
account->setUrl(Theme::instance()->overrideServerUrl());
_ocWizard->setAccount(account);
_ocWizard->setOCUrl(account->url().toString());
@@ -471,8 +470,6 @@ void OwncloudSetupWizard::slotAssistantFinished( int result )
}
folderDefinition.localPath = localFolder;
folderDefinition.targetPath = _remoteFolder;
folderDefinition.ignoreHiddenFiles = folderMan->ignoreHiddenFiles();
auto f = folderMan->addFolder(account, folderDefinition);
if (f) {
f->journalDb()->setSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList,
+10 -23
Ver Arquivo
@@ -26,7 +26,6 @@
#include "syncfileitem.h"
#include "folder.h"
#include "openfilemanager.h"
#include "owncloudpropagator.h"
#include "ui_protocolwidget.h"
@@ -43,8 +42,6 @@ ProtocolWidget::ProtocolWidget(QWidget *parent) :
connect(ProgressDispatcher::instance(), SIGNAL(progressInfo(QString,ProgressInfo)),
this, SLOT(slotProgressInfo(QString,ProgressInfo)));
connect(ProgressDispatcher::instance(), SIGNAL(itemCompleted(QString,SyncFileItem,PropagatorJob)),
this, SLOT(slotItemCompleted(QString,SyncFileItem,PropagatorJob)));
connect(_ui->_treeWidget, SIGNAL(itemActivated(QTreeWidgetItem*,int)), SLOT(slotOpenFile(QTreeWidgetItem*,int)));
@@ -99,7 +96,7 @@ void ProtocolWidget::copyToClipboard()
<< qSetFieldWidth(64)
<< child->data(1,Qt::DisplayRole).toString()
// folder
<< qSetFieldWidth(30)
<< qSetFieldWidth(15)
<< child->data(2, Qt::DisplayRole).toString()
// action
<< qSetFieldWidth(15)
@@ -161,7 +158,7 @@ void ProtocolWidget::cleanIgnoreItems(const QString& folder)
for( int cnt = itemCnt-1; cnt >=0 ; cnt-- ) {
QTreeWidgetItem *item = _ui->_treeWidget->topLevelItem(cnt);
bool isErrorItem = item->data(0, IgnoredIndicatorRole).toBool();
QString itemFolder = item->data(2, Qt::UserRole).toString();
QString itemFolder = item->data(2, Qt::DisplayRole).toString();
if( isErrorItem && itemFolder == folder ) {
delete item;
}
@@ -179,7 +176,7 @@ QString ProtocolWidget::timeString(QDateTime dt, QLocale::FormatType format) con
void ProtocolWidget::slotOpenFile( QTreeWidgetItem *item, int )
{
QString folderName = item->data(2, Qt::UserRole).toString();
QString folderName = item->text(2);
QString fileName = item->text(1);
Folder *folder = FolderMan::instance()->folder(folderName);
@@ -203,11 +200,6 @@ QString ProtocolWidget::fixupFilename( const QString& name )
QTreeWidgetItem* ProtocolWidget::createCompletedTreewidgetItem(const QString& folder, const SyncFileItem& item)
{
auto f = FolderMan::instance()->folder(folder);
if (!f) {
return 0;
}
QStringList columns;
QDateTime timestamp = QDateTime::currentDateTime();
const QString timeStr = timeString(timestamp);
@@ -215,7 +207,7 @@ QTreeWidgetItem* ProtocolWidget::createCompletedTreewidgetItem(const QString& fo
columns << timeStr;
columns << fixupFilename(item._originalFile);
columns << f->shortGuiPath();
columns << folder;
// If the error string is set, it's prefered because it is a useful user message.
QString message = item._errorString;
@@ -246,7 +238,6 @@ QTreeWidgetItem* ProtocolWidget::createCompletedTreewidgetItem(const QString& fo
twitem->setToolTip(0, longTimeStr);
twitem->setToolTip(1, item._file);
twitem->setToolTip(3, message );
twitem->setData(2, Qt::UserRole, folder);
return twitem;
}
@@ -285,21 +276,17 @@ void ProtocolWidget::slotProgressInfo( const QString& folder, const ProgressInfo
//Sync completed
computeResyncButtonEnabled();
}
}
SyncFileItem last = progress._lastCompletedItem;
if (last.isEmpty()) return;
void ProtocolWidget::slotItemCompleted(const QString &folder, const SyncFileItem &item, const PropagatorJob &job)
{
if (qobject_cast<const PropagateDirectory*>(&job)) {
return;
}
QTreeWidgetItem *line = createCompletedTreewidgetItem(folder, item);
if(line) {
_ui->_treeWidget->insertTopLevelItem(0, line);
QTreeWidgetItem *item = createCompletedTreewidgetItem(folder, last);
if(item) {
_ui->_treeWidget->insertTopLevelItem(0, item);
if (!_copyBtn->isEnabled()) {
_copyBtn->setEnabled(true);
}
}
}
}
-1
Ver Arquivo
@@ -47,7 +47,6 @@ public:
public slots:
void slotProgressInfo( const QString& folder, const ProgressInfo& progress );
void slotItemCompleted( const QString& folder, const SyncFileItem& item, const PropagatorJob& job);
void slotOpenFile( QTreeWidgetItem* item, int );
protected slots:
+9 -33
Ver Arquivo
@@ -165,28 +165,6 @@ void SelectiveSyncTreeView::slotUpdateDirectories(const QStringList&list)
SelectiveSyncTreeViewItem *root = static_cast<SelectiveSyncTreeViewItem*>(topLevelItem(0));
QUrl url = _account->davUrl();
QString pathToRemove = url.path();
if (!pathToRemove.endsWith('/')) {
pathToRemove.append('/');
}
pathToRemove.append(_folderPath);
if (!_folderPath.isEmpty())
pathToRemove.append('/');
// Since / cannot be in the blacklist, expand it to the actual
// list of top-level folders as soon as possible.
if (_oldBlackList == QStringList("/")) {
_oldBlackList.clear();
foreach (QString path, list) {
path.remove(pathToRemove);
if (path.isEmpty()) {
continue;
}
_oldBlackList.append(path);
}
}
if (!root && list.size() <= 1) {
_loading->setText(tr("No subfolders currently on the server."));
_loading->resize(_loading->sizeHint()); // because it's not in a layout
@@ -207,6 +185,15 @@ void SelectiveSyncTreeView::slotUpdateDirectories(const QStringList&list)
}
}
QUrl url = _account->davUrl();
QString pathToRemove = url.path();
if (!pathToRemove.endsWith('/')) {
pathToRemove.append('/');
}
pathToRemove.append(_folderPath);
if (!_folderPath.isEmpty())
pathToRemove.append('/');
foreach (QString path, list) {
auto size = job ? job->_sizes.value(path) : 0;
path.remove(pathToRemove);
@@ -242,7 +229,6 @@ void SelectiveSyncTreeView::slotItemExpanded(QTreeWidgetItem *item)
prefix = _folderPath + QLatin1Char('/');
}
LsColJob *job = new LsColJob(_account, prefix + dir, this);
job->setProperties(QList<QByteArray>() << "resourcetype" << "quota-used-bytes");
connect(job, SIGNAL(directoryListingSubfolders(QStringList)),
SLOT(slotUpdateDirectories(QStringList)));
job->start();
@@ -338,11 +324,6 @@ QStringList SelectiveSyncTreeView::createBlackList(QTreeWidgetItem* root) const
return result;
}
QStringList SelectiveSyncTreeView::oldBlackList() const
{
return _oldBlackList;
}
qint64 SelectiveSyncTreeView::estimatedSize(QTreeWidgetItem* root)
{
if (!root) {
@@ -445,11 +426,6 @@ QStringList SelectiveSyncDialog::createBlackList() const
return _treeView->createBlackList();
}
QStringList SelectiveSyncDialog::oldBlackList() const
{
return _treeView->oldBlackList();
}
qint64 SelectiveSyncDialog::estimatedSize()
{
return _treeView->estimatedSize();
-2
Ver Arquivo
@@ -36,7 +36,6 @@ public:
/// Returns a list of blacklisted paths, each including the trailing /
QStringList createBlackList(QTreeWidgetItem* root = 0) const;
QStringList oldBlackList() const;
//Estimate the total size of checked item (recursively)
qint64 estimatedSize(QTreeWidgetItem *root = 0);
@@ -78,7 +77,6 @@ public:
virtual void accept() Q_DECL_OVERRIDE;
QStringList createBlackList() const;
QStringList oldBlackList() const;
// Estimate the size of the total of sync'ed files from the server
qint64 estimatedSize();
+54 -135
Ver Arquivo
@@ -32,18 +32,13 @@
#include <QDebug>
#include <QSettings>
#include <QToolBar>
#include <QToolButton>
#include <QLayout>
#include <QVBoxLayout>
#include <QPixmap>
#include <QImage>
#include <QWidgetAction>
namespace {
const char TOOLBAR_CSS[] =
"QToolBar { background: %1; margin: 0; padding: 0; border: none; border-bottom: 1px solid %2; spacing: 0; } "
"QToolBar QToolButton { background: %1; border: none; border-bottom: 1px solid %2; margin: 0; padding: 0; } "
"QToolBar QToolButton:checked { background: %3; color: %4; }";
"QToolBar { background: white; margin: 0; padding: 0; border: none; border-bottom: 1px solid %1; spacing: 0; } "
"QToolBar QToolButton { background: white; border: none; border-bottom: 1px solid %1; margin: 0; padding: 0; } "
"QToolBar QToolButton:checked { background: %2; color: %3; }";
}
namespace OCC {
@@ -51,17 +46,21 @@ namespace OCC {
//
// Whenever you change something here check both settingsdialog.cpp and settingsdialogmac.cpp !
//
SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) :
QDialog(parent)
, _ui(new Ui::SettingsDialog), _gui(gui)
{
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
_ui->setupUi(this);
_toolBar = new QToolBar;
_toolBar->setIconSize(QSize(32, 32));
_toolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
layout()->setMenuBar(_toolBar);
QToolBar *toolBar = new QToolBar;
toolBar->setIconSize(QSize(32,32));
QString highlightColor(palette().highlight().color().name());
QString altBase(palette().alternateBase().color().name());
QString dark(palette().dark().color().name());
toolBar->setStyleSheet(QString::fromAscii(TOOLBAR_CSS).arg(dark).arg(highlightColor).arg(altBase));
toolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
layout()->setMenuBar(toolBar);
// People perceive this as a Window, so also make Ctrl+W work
QAction *closeWindowAction = new QAction(this);
@@ -69,40 +68,44 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) :
connect(closeWindowAction, SIGNAL(triggered()), SLOT(accept()));
addAction(closeWindowAction);
setObjectName("Settings"); // required as group for saveGeometry call
setWindowTitle(Theme::instance()->appNameGUI());
// Add a spacer so config buttons are right aligned and account buttons will be left aligned
_seperatorAction = _toolBar->addSeparator();
_actionGroup = new QActionGroup(this);
_actionGroup->setExclusive(true);
// Add a spacer so config buttonns are right aligned and account buttons will be left aligned
auto spacer = new QWidget();
spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
toolBar->addWidget(spacer);
// Note: all the actions have a '\n' because the account name is in two lines and
// all buttons must have the same size in order to keep a good layout
_protocolAction = createColorAwareAction(QLatin1String(":/client/resources/activity.png"), tr("Activity"));
_actionGroup->addAction(_protocolAction);
addActionToToolBar(_protocolAction);
QIcon protocolIcon(QLatin1String(":/client/resources/activity.png"));
_protocolAction = toolBar->addAction(protocolIcon, tr("Activity") + QLatin1Char('\n'));
_protocolAction->setCheckable(true);
ProtocolWidget *protocolWidget = new ProtocolWidget;
_ui->stack->addWidget(protocolWidget);
QAction *generalAction = createColorAwareAction(QLatin1String(":/client/resources/settings.png"), tr("General"));
_actionGroup->addAction(generalAction);
addActionToToolBar(generalAction);
QIcon generalIcon(QLatin1String(":/client/resources/settings.png"));
QAction *generalAction = toolBar->addAction(generalIcon, tr("General") + QLatin1Char('\n'));
generalAction->setCheckable(true);
GeneralSettings *generalSettings = new GeneralSettings;
_ui->stack->addWidget(generalSettings);
QAction *networkAction = createColorAwareAction(QLatin1String(":/client/resources/network.png"), tr("Network"));
_actionGroup->addAction(networkAction);
addActionToToolBar(networkAction);
QIcon networkIcon(QLatin1String(":/client/resources/network.png"));
QAction *networkAction = toolBar->addAction(networkIcon, tr("Network") + QLatin1Char('\n'));
networkAction->setCheckable(true);
NetworkSettings *networkSettings = new NetworkSettings;
_ui->stack->addWidget(networkSettings);
_actionGroupWidgets.insert(_protocolAction, protocolWidget);
_actionGroupWidgets.insert(generalAction, generalSettings);
_actionGroupWidgets.insert(networkAction, networkSettings);
_actions.insert(_protocolAction, protocolWidget);
_actions.insert(generalAction, generalSettings);
_actions.insert(networkAction, networkSettings);
connect(_actionGroup, SIGNAL(triggered(QAction*)), SLOT(slotSwitchPage(QAction*)));
QActionGroup *group = new QActionGroup(this);
group->addAction(_protocolAction);
group->addAction(generalAction);
group->addAction(networkAction);
group->setExclusive(true);
connect(group, SIGNAL(triggered(QAction*)), SLOT(slotSwitchPage(QAction*)));
connect(AccountManager::instance(), SIGNAL(accountAdded(AccountState*)),
this, SLOT(accountAdded(AccountState*)));
@@ -112,7 +115,8 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) :
accountAdded(ai.data());
}
QTimer::singleShot(1, this, SLOT(showFirstPage()));
// default to Account
toolBar->actions().at(0)->trigger();
QPushButton *closeButton = _ui->buttonBox->button(QDialogButtonBox::Close);
connect(closeButton, SIGNAL(clicked()), SLOT(accept()));
@@ -122,8 +126,6 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) :
connect(showLogWindow, SIGNAL(triggered()), gui, SLOT(slotToggleLogBrowser()));
addAction(showLogWindow);
customizeStyle();
ConfigFile cfg;
cfg.restoreGeometry(this);
}
@@ -146,40 +148,9 @@ void SettingsDialog::accept() {
QDialog::accept();
}
void SettingsDialog::changeEvent(QEvent *e)
{
switch (e->type()) {
case QEvent::StyleChange:
case QEvent::PaletteChange:
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
case QEvent::ThemeChange:
#endif
customizeStyle();
break;
default:
break;
}
QDialog::changeEvent(e);
}
void SettingsDialog::slotSwitchPage(QAction *action)
{
_ui->stack->setCurrentWidget(_actionGroupWidgets.value(action));
}
void SettingsDialog::showFirstPage()
{
Q_FOREACH(QAction *action, _toolBar->actions()) {
if (QWidgetAction *wa = qobject_cast<QWidgetAction*>(action)) {
if (QToolButton *qtb = qobject_cast<QToolButton*>(wa->defaultWidget())) {
if (QAction *a2 = qtb->defaultAction()) {
a2->trigger();
break;
}
}
}
}
_ui->stack->setCurrentWidget(_actions.value(action));
}
void SettingsDialog::showActivityPage()
@@ -191,99 +162,47 @@ void SettingsDialog::showActivityPage()
void SettingsDialog::accountAdded(AccountState *s)
{
auto accountAction = createColorAwareAction(QLatin1String(":/client/resources/account.png"),
s->shortDisplayNameForSettings());
QIcon accountIcon(QLatin1String(":/client/resources/account.png"));
auto toolBar = qobject_cast<QToolBar*>(layout()->menuBar());
Q_ASSERT(toolBar);
auto accountAction = new QAction(accountIcon, s->shortDisplayNameForSettings(), this);
accountAction->setToolTip(s->account()->displayName());
QToolButton* accountButton = new QToolButton;
accountButton->setDefaultAction(accountAction);
accountButton->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
accountButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
QAction* toolbarAction = _toolBar->insertWidget(_toolBar->actions().at(0), accountButton);
_toolbarAccountActions.insert(accountAction, toolbarAction);
toolBar->insertAction(toolBar->actions().at(0), accountAction);
accountAction->setCheckable(true);
auto accountSettings = new AccountSettings(s, this);
_ui->stack->insertWidget(0 , accountSettings);
_actionGroup->addAction(accountAction);
_actionGroupWidgets.insert(accountAction, accountSettings);
_actions.insert(accountAction, accountSettings);
auto group = findChild<QActionGroup*>(
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
QString() , Qt::FindDirectChildrenOnly
#endif
);
Q_ASSERT(group);
group->addAction(accountAction);
connect( accountSettings, SIGNAL(folderChanged()), _gui, SLOT(slotFoldersChanged()));
connect( accountSettings, SIGNAL(openFolderAlias(const QString&)),
_gui, SLOT(slotFolderOpenAction(QString)));
_seperatorAction->setVisible(!_toolbarAccountActions.isEmpty());
}
void SettingsDialog::accountRemoved(AccountState *s)
{
for (auto it = _actionGroupWidgets.begin(); it != _actionGroupWidgets.end(); ++it) {
for (auto it = _actions.begin(); it != _actions.end(); ++it) {
auto as = qobject_cast<AccountSettings *>(*it);
if (!as) {
continue;
}
if (as->accountsState() == s) {
_toolBar->removeAction(_toolbarAccountActions.value(it.key()));
_toolbarAccountActions.remove(it.key());
delete it.key();
delete it.value();
_actionGroupWidgets.erase(it);
_actions.erase(it);
break;
}
}
_seperatorAction->setVisible(!_toolbarAccountActions.isEmpty());
}
void SettingsDialog::customizeStyle()
{
QString highlightColor(palette().highlight().color().name());
QString altBase(palette().alternateBase().color().name());
QString dark(palette().dark().color().name());
QString background(palette().base().color().name());
_toolBar->setStyleSheet(QString::fromAscii(TOOLBAR_CSS).arg(background).arg(dark).arg(highlightColor).arg(altBase));
Q_FOREACH(QAction *a, _actionGroup->actions()) {
QIcon icon = createColorAwareIcon(a->property("iconPath").toString());
a->setIcon(icon);
QToolButton *btn = qobject_cast<QToolButton*>(_toolBar->widgetForAction(a));
if (btn) {
btn->setIcon(icon);
}
}
}
QIcon SettingsDialog::createColorAwareIcon(const QString &name)
{
QColor bg(palette().base().color());
QImage img(name);
// account for different sensitivty of the human eye to certain colors
double treshold = 1.0 - ( 0.299 * bg.red() + 0.587 * bg.green() + 0.114 * bg.blue())/255.0;
if (treshold > 0.5) {
img.invertPixels(QImage::InvertRgb);
}
return QIcon(QPixmap::fromImage(img));
}
QAction *SettingsDialog::createColorAwareAction(const QString &iconPath, const QString &text)
{
// all buttons must have the same size in order to keep a good layout
QIcon coloredIcon = createColorAwareIcon(iconPath);
QAction *action = new QAction(coloredIcon, text, this);
action->setCheckable(true);
action->setProperty("iconPath", iconPath);
return action;
}
void SettingsDialog::addActionToToolBar(QAction *action) {
QToolButton* btn = new QToolButton;
btn->setDefaultAction(action);
btn->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
btn->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
_toolBar->addWidget(btn);
}
} // namespace OCC
+1 -18
Ver Arquivo
@@ -20,8 +20,6 @@
#include "progressdispatcher.h"
class QAction;
class QActionGroup;
class QToolBar;
class QStandardItemModel;
namespace OCC {
@@ -51,35 +49,20 @@ public:
void addAccount(const QString &title, QWidget *widget);
public slots:
void showFirstPage();
void showActivityPage();
void slotSwitchPage(QAction *action);
protected:
void reject() Q_DECL_OVERRIDE;
void accept() Q_DECL_OVERRIDE;
void changeEvent(QEvent *) Q_DECL_OVERRIDE;
private slots:
void accountAdded(AccountState *);
void accountRemoved(AccountState *);
private:
void customizeStyle();
QIcon createColorAwareIcon(const QString &name);
QAction *createColorAwareAction(const QString &iconName, const QString &fileName);
void addActionToToolBar(QAction *action);
Ui::SettingsDialog * const _ui;
QActionGroup* _actionGroup;
// Maps the actions from the action group to the corresponding widgets
QHash<QAction*, QWidget*> _actionGroupWidgets;
QToolBar* _toolBar;
// Maps the actions from the action group to the toolbar actions
QHash<QAction*, QAction*> _toolbarAccountActions;
QAction * _seperatorAction;
QHash<QAction*, QWidget*> _actions;
QAction * _protocolAction;
ownCloudGui *_gui;
};
+1 -6
Ver Arquivo
@@ -238,7 +238,6 @@ void ShareDialog::setPassword(const QString &password)
// This happens because the entry field and the button both trigger this slot.
return;
}
_pi_link->startAnimation();
_pi_password->startAnimation();
QUrl url;
QList<QPair<QString, QString> > requestParams;
@@ -321,8 +320,6 @@ void ShareDialog::slotSharesFetched(const QVariantMap &reply)
ShareDialog::_shares = reply.value("ocs").toMap().value("data").toList();
const QString versionString = _account->serverVersion();
qDebug() << Q_FUNC_INFO << versionString << "Fetched" << ShareDialog::_shares.count() << "shares";
//Show link checkbox now
_ui->checkBox_shareLink->setEnabled(true);
_pi_link->stopAnimation();
@@ -458,7 +455,6 @@ void ShareDialog::slotDeleteShareFetched(const QVariantMap &reply)
void ShareDialog::slotCheckBoxShareLinkClicked()
{
qDebug() << Q_FUNC_INFO <<( _ui->checkBox_shareLink->checkState() == Qt::Checked);
if (_ui->checkBox_shareLink->checkState() == Qt::Checked) {
_pi_link->startAnimation();
QUrl url = Account::concatUrlPath(_account->url(), QLatin1String("ocs/v1.php/apps/files_sharing/api/v1/shares"));
@@ -471,7 +467,6 @@ void ShareDialog::slotCheckBoxShareLinkClicked()
* Ask for it directly
*/
if (_account->capabilities().publicLinkEnforcePassword()) {
_pi_link->stopAnimation();
_ui->checkBox_password->setChecked(true);
_ui->checkBox_password->setEnabled(false);
_ui->checkBox_password->setText(tr("Public sh&aring requires a password"));
@@ -529,7 +524,7 @@ void ShareDialog::slotCheckBoxPasswordClicked()
if (_ui->checkBox_password->checkState() == Qt::Checked) {
_ui->lineEdit_password->show();
_ui->pushButton_setPassword->show();
_ui->lineEdit_password->setPlaceholderText(tr("Please Set Password"));
_ui->lineEdit_password->setPlaceholderText(tr("Password"));
_ui->lineEdit_password->setFocus();
} else {
ShareDialog::setPassword(QString());
+4 -11
Ver Arquivo
@@ -59,8 +59,7 @@ enum csync_exclude_type_e {
CSYNC_FILE_EXCLUDE_AND_REMOVE,
CSYNC_FILE_EXCLUDE_LIST,
CSYNC_FILE_EXCLUDE_INVALID_CHAR,
CSYNC_FILE_EXCLUDE_LONG_FILENAME,
CSYNC_FILE_EXCLUDE_HIDDEN
CSYNC_FILE_EXCLUDE_LONG_FILENAME
};
typedef enum csync_exclude_type_e CSYNC_EXCLUDE_TYPE;
@@ -127,8 +126,8 @@ SocketApi::SocketApi(QObject* parent)
// folder watcher
connect(FolderMan::instance(), SIGNAL(folderSyncStateChange(Folder*)), this, SLOT(slotUpdateFolderView(Folder*)));
connect(ProgressDispatcher::instance(), SIGNAL(itemCompleted(QString, const SyncFileItem &, const PropagatorJob &)),
SLOT(slotItemCompleted(QString, const SyncFileItem &)));
connect(ProgressDispatcher::instance(), SIGNAL(jobCompleted(QString, const SyncFileItem &)),
SLOT(slotJobCompleted(QString, const SyncFileItem &)));
connect(ProgressDispatcher::instance(), SIGNAL(syncItemDiscovered(QString, const SyncFileItem &)),
this, SLOT(slotSyncItemDiscovered(QString, const SyncFileItem &)));
}
@@ -141,7 +140,6 @@ SocketApi::~SocketApi()
Q_ASSERT(_listeners.isEmpty() || _listeners.first()->parent() == &_localServer);
_listeners.clear();
slotClearExcludesList();
c_strlist_destroy(_excludes);
}
void SocketApi::slotClearExcludesList()
@@ -276,7 +274,7 @@ void SocketApi::slotUpdateFolderView(Folder *f)
}
}
void SocketApi::slotItemCompleted(const QString &folder, const SyncFileItem &item)
void SocketApi::slotJobCompleted(const QString &folder, const SyncFileItem &item)
{
if (_listeners.isEmpty()) {
return;
@@ -581,11 +579,6 @@ SyncFileStatus SocketApi::fileStatus(Folder *folder, const QString& systemFileNa
// Is it excluded?
CSYNC_EXCLUDE_TYPE excl = csync_excluded_no_ctx(excludes, fileName.toUtf8(), type);
if( folder->ignoreHiddenFiles()
&& (fi.isHidden()
|| fi.fileName().startsWith(QLatin1Char('.'))) ) {
excl = CSYNC_FILE_EXCLUDE_HIDDEN;
}
if( excl != CSYNC_NOT_EXCLUDED ) {
return SyncFileStatus(SyncFileStatus::STATUS_IGNORE);
}
+1 -1
Ver Arquivo
@@ -66,7 +66,7 @@ private slots:
void slotNewConnection();
void onLostConnection();
void slotReadSocket();
void slotItemCompleted(const QString &, const SyncFileItem &);
void slotJobCompleted(const QString &, const SyncFileItem &);
void slotSyncItemDiscovered(const QString &, const SyncFileItem &);
private:
+7 -7
Ver Arquivo
@@ -188,7 +188,7 @@ void SslButton::updateAccountState(AccountState *accountState)
if (account->url().scheme() == QLatin1String("https")) {
QPixmap pm(Theme::hidpiFileName(":/client/resources/lock-https.png"));
setIcon(QIcon(pm));
QSslCipher cipher = account->_sessionCipher;
QSslCipher cipher = account->sslConfiguration().sessionCipher();
setToolTip(tr("This connection is encrypted using %1 bit %2.\n").arg(cipher.usedBits()).arg(cipher.name()));
setMenu(_menu);
} else {
@@ -208,19 +208,19 @@ void SslButton::slotUpdateMenu() {
AccountPtr account = _accountState->account();
if (account->url().scheme() == QLatin1String("https")) {
QString sslVersion = account->_sessionCipher.protocolString()
+ ", " + account->_sessionCipher.authenticationMethod()
+ ", " + account->_sessionCipher.keyExchangeMethod()
+ ", " + account->_sessionCipher.encryptionMethod();
QString sslVersion = account->sslConfiguration().sessionCipher().protocolString()
+ ", " + account->sslConfiguration().sessionCipher().authenticationMethod()
+ ", " + account->sslConfiguration().sessionCipher().keyExchangeMethod()
+ ", " + account->sslConfiguration().sessionCipher().encryptionMethod();
_menu->addAction(sslVersion)->setEnabled(false);
#if QT_VERSION > QT_VERSION_CHECK(5, 2, 0)
if (account->_sessionTicket.isEmpty()) {
if (account->sslConfiguration().sessionTicket().isEmpty()) {
_menu->addAction(tr("No support for SSL session tickets/identifiers"))->setEnabled(false);
}
#endif
QList<QSslCertificate> chain = account->_peerCertificateChain;
QList<QSslCertificate> chain = account->sslConfiguration().peerCertificateChain();
if (chain.isEmpty()) {
qWarning() << "empty certificate chain";
-3
Ver Arquivo
@@ -431,7 +431,6 @@ PassiveUpdateNotifier::PassiveUpdateNotifier(const QUrl &url, QObject *parent)
void PassiveUpdateNotifier::backgroundCheckForUpdate()
{
if( Utility::isLinux() ) {
// on linux, check if the installed binary is still the same version
// as the one that is running. If not, restart if possible.
@@ -441,8 +440,6 @@ void PassiveUpdateNotifier::backgroundCheckForUpdate()
emit requestRestart();
}
}
OCUpdater::backgroundCheckForUpdate();
}
void PassiveUpdateNotifier::versionInfoArrived(const UpdateInfo &info)
+1 -2
Ver Arquivo
@@ -112,10 +112,9 @@ signals:
public slots:
void slotStartInstaller();
protected slots:
private slots:
void backgroundCheckForUpdate() Q_DECL_OVERRIDE;
private slots:
void slotOpenUpdateUrl();
void slotVersionInfoArrived();
void slotTimedOut();
+1 -17
Ver Arquivo
@@ -258,24 +258,8 @@ void OwncloudAdvancedSetupPage::slotSelectiveSyncClicked()
AccountPtr acc = static_cast<OwncloudWizard *>(wizard())->account();
SelectiveSyncDialog *dlg = new SelectiveSyncDialog(acc, _remoteFolder, _selectiveSyncBlacklist, this);
const int result = dlg->exec();
bool updateBlacklist = false;
// We need to update the selective sync blacklist either when the dialog
// was accepted, or when it was used in conjunction with the
// wizardSelectiveSyncDefaultNothing feature and was cancelled - in that
// case the stub blacklist of / was expanded to the actual list of top
// level folders by the selective sync dialog.
if (result == QDialog::Accepted) {
if (dlg->exec() == QDialog::Accepted) {
_selectiveSyncBlacklist = dlg->createBlackList();
updateBlacklist = true;
} else if (result == QDialog::Rejected && _selectiveSyncBlacklist == QStringList("/")) {
_selectiveSyncBlacklist = dlg->oldBlackList();
updateBlacklist = true;
}
if (updateBlacklist) {
if (!_selectiveSyncBlacklist.isEmpty()) {
_ui.rSelectiveSync->blockSignals(true);
_ui.rSelectiveSync->setChecked(true);
+17 -30
Ver Arquivo
@@ -92,19 +92,6 @@
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="1" column="1">
@@ -112,9 +99,6 @@
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
@@ -154,19 +138,6 @@
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="4" column="1" colspan="2">
@@ -200,7 +171,7 @@
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;If this box is checked, existing content in the local directory will be erased to start a clean sync from the server.&lt;/p&gt;&lt;p&gt;Do not check this if the local content should be uploaded to the servers directory.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Start a &amp;clean sync (Erases the local folder!)</string>
<string>&amp;Start a clean sync (Erases the local folder!)</string>
</property>
<property name="checkable">
<bool>true</bool>
@@ -210,6 +181,22 @@
</layout>
</widget>
</item>
<item row="3" column="2">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="1" rowspan="2">
<widget class="QPushButton" name="pbSelectLocalFolder">
<property name="sizePolicy">
+2 -11
Ver Arquivo
@@ -22,11 +22,11 @@ if ( APPLE )
)
endif()
IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD|NetBSD|OpenBSD")
IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
list(APPEND OS_SPECIFIC_LINK_LIBRARIES
inotify
)
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD|NetBSD|OpenBSD")
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
if(SPARKLE_FOUND AND NOT BUILD_LIBRARIES_ONLY)
list (APPEND OS_SPECIFIC_LINK_LIBRARIES ${SPARKLE_LIBRARY})
@@ -119,11 +119,6 @@ if(QTKEYCHAIN_FOUND OR QT5KEYCHAIN_FOUND)
include_directories(${QTKEYCHAIN_INCLUDE_DIR})
endif()
if(INOTIFY_FOUND)
include_directories(${INOTIFY_INCLUDE_DIR})
link_directories(${INOTIFY_LIBRARY_DIR})
endif()
if(NEON_FOUND)
list(APPEND libsync_LINK_TARGETS ${NEON_LIBRARIES} httpbf)
include_directories(${NEON_INCLUDE_DIRS})
@@ -162,10 +157,6 @@ set_target_properties( ${synclib_NAME} PROPERTIES
target_link_libraries(${synclib_NAME} ${libsync_LINK_TARGETS} )
if(INOTIFY_FOUND)
target_link_libraries(${synclib_NAME} ${INOTIFY_LIBRARY} )
endif()
if(BUILD_LIBRARIES_ONLY)
#add_library(${synclib_NAME}_static STATIC ${libsync_SRCS} ${syncMoc})
#qt5_use_modules(${synclib_NAME}_static Widgets Network Xml Sql)
-6
Ver Arquivo
@@ -399,7 +399,6 @@ void Account::slotHandleSslErrors(QNetworkReply *reply , QList<QSslError> errors
if (_sslErrorHandler->handleErrors(errors, reply->sslConfiguration(), &approvedCerts, sharedFromThis())) {
QSslSocket::addDefaultCaCertificates(approvedCerts);
addApprovedCerts(approvedCerts);
emit wantsAccountSaved(sharedFromThis());
// all ssl certs are known and accepted. We can ignore the problems right away.
// qDebug() << out << "Certs are known and trusted! This is not an actual error.";
@@ -409,11 +408,6 @@ void Account::slotHandleSslErrors(QNetworkReply *reply , QList<QSslError> errors
reply->ignoreSslErrors(errors);
} else {
_treatSslErrorsAsFailure = true;
// if during normal operation, a new certificate was MITM'ed, and the user does not
// ACK it, the running request must be aborted and the QNAM must be reset, to not
// treat the new cert as granted. See bug #3283
reply->abort();
resetNetworkAccessManager();
return;
}
}
-10
Ver Arquivo
@@ -22,7 +22,6 @@
#include <QSslSocket>
#include <QSslCertificate>
#include <QSslConfiguration>
#include <QSslCipher>
#include <QSslError>
#include <QSharedPointer>
#include "utility.h"
@@ -112,12 +111,6 @@ public:
QSslConfiguration getOrCreateSslConfig();
QSslConfiguration sslConfiguration() const { return _sslConfiguration; }
void setSslConfiguration(const QSslConfiguration &config);
// Because of bugs in Qt, we use this to store info needed for the SSL Button
QSslCipher _sessionCipher;
QByteArray _sessionTicket;
QList<QSslCertificate> _peerCertificateChain;
/** The certificates of the account */
QList<QSslCertificate> approvedCerts() const { return _approvedCerts; }
void setApprovedCerts(const QList<QSslCertificate> certs);
@@ -167,9 +160,6 @@ signals:
/// Forwards from QNetworkAccessManager::proxyAuthenticationRequired().
void proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*);
// e.g. when the approved SSL certificates changed
void wantsAccountSaved(AccountPtr acc);
protected Q_SLOTS:
void slotHandleSslErrors(QNetworkReply*,QList<QSslError>);
void slotCredentialsFetched();
+1 -25
Ver Arquivo
@@ -18,7 +18,6 @@
#include <QNetworkReply>
#include <QNetworkRequest>
#include <QSslConfiguration>
#include <QSslCipher>
#include <QBuffer>
#include <QXmlStreamReader>
#include <QStringList>
@@ -363,7 +362,6 @@ void CheckServerJob::start()
setReply(getRequest(path()));
setupConnections(reply());
connect(reply(), SIGNAL(metaDataChanged()), this, SLOT(metaDataChangedSlot()));
connect(reply(), SIGNAL(encrypted()), this, SLOT(encryptedSlot()));
AbstractNetworkJob::start();
}
@@ -393,30 +391,10 @@ bool CheckServerJob::installed(const QVariantMap &info)
return info.value(QLatin1String("installed")).toBool();
}
static void mergeSslConfigurationForSslButton(const QSslConfiguration &config, AccountPtr account)
{
if (config.peerCertificateChain().length() > 0) {
account->_peerCertificateChain = config.peerCertificateChain();
}
if (!config.sessionCipher().isNull()) {
account->_sessionCipher = config.sessionCipher();
}
#if QT_VERSION > QT_VERSION_CHECK(5, 2, 0)
if (config.sessionTicket().length() > 0) {
account->_sessionTicket = config.sessionTicket();
}
#endif
}
void CheckServerJob::encryptedSlot()
{
mergeSslConfigurationForSslButton(reply()->sslConfiguration(), account());
}
void CheckServerJob::metaDataChangedSlot()
{
// We used to have this in finished(), but because of a bug in Qt this did not always have the cipher etc.
account()->setSslConfiguration(reply()->sslConfiguration());
mergeSslConfigurationForSslButton(reply()->sslConfiguration(), account());
}
@@ -430,8 +408,6 @@ bool CheckServerJob::finished()
}
#endif
mergeSslConfigurationForSslButton(reply()->sslConfiguration(), account());
// The serverInstalls to /owncloud. Let's try that if the file wasn't found
// at the original location
if ((reply()->error() == QNetworkReply::ContentNotFoundError) && (!_subdirFallback)) {
-1
Ver Arquivo
@@ -167,7 +167,6 @@ private slots:
virtual bool finished() Q_DECL_OVERRIDE;
virtual void slotTimeout() Q_DECL_OVERRIDE;
virtual void metaDataChangedSlot();
virtual void encryptedSlot();
private:
bool _subdirFallback;
+5 -6
Ver Arquivo
@@ -135,7 +135,7 @@ void PropagateItemJob::done(SyncFileItem::Status status, const QString &errorStr
_item->_status = status;
emit itemCompleted(*_item, *this);
emit completed(*_item);
emit finished(status);
}
@@ -187,7 +187,7 @@ bool PropagateItemJob::checkForProblemsWithShared(int httpStatusCode, const QStr
if( newJob ) {
newJob->setRestoreJobMsg(msg);
_restoreJob.reset(newJob);
connect(_restoreJob.data(), SIGNAL(itemCompleted(const SyncFileItemPtr &, const PropagatorJob &)),
connect(_restoreJob.data(), SIGNAL(completed(const SyncFileItemPtr &)),
this, SLOT(slotRestoreJobCompleted(const SyncFileItemPtr &)));
QMetaObject::invokeMethod(newJob, "start");
}
@@ -354,8 +354,7 @@ void OwncloudPropagator::start(const SyncFileItemVector& items)
_rootJob->append(it);
}
connect(_rootJob.data(), SIGNAL(itemCompleted(const SyncFileItem &, const PropagatorJob &)),
this, SIGNAL(itemCompleted(const SyncFileItem &, const PropagatorJob &)));
connect(_rootJob.data(), SIGNAL(completed(const SyncFileItem &)), this, SIGNAL(completed(const SyncFileItem &)));
connect(_rootJob.data(), SIGNAL(progress(const SyncFileItem &,quint64)), this, SIGNAL(progress(const SyncFileItem &,quint64)));
connect(_rootJob.data(), SIGNAL(finished(SyncFileItem::Status)), this, SLOT(emitFinished()));
connect(_rootJob.data(), SIGNAL(ready()), this, SLOT(scheduleNextJob()), Qt::QueuedConnection);
@@ -612,7 +611,7 @@ void PropagateDirectory::slotSubJobFinished(SyncFileItem::Status status)
(sender() == _firstJob.data() && status != SyncFileItem::Success && status != SyncFileItem::Restoration)) {
abort();
_state = Finished;
emit itemCompleted(*_item, *this);
emit completed(*_item);
emit finished(status);
return;
} else if (status == SyncFileItem::NormalError || status == SyncFileItem::SoftError) {
@@ -656,7 +655,7 @@ void PropagateDirectory::finalize()
}
}
_state = Finished;
emit itemCompleted(*_item, *this);
emit completed(*_item);
emit finished(_hasError == SyncFileItem::NoStatus ? SyncFileItem::Success : _hasError);
}
+4 -5
Ver Arquivo
@@ -94,7 +94,7 @@ signals:
/**
* Emitted when one item has been completed within a job.
*/
void itemCompleted(const SyncFileItem &, const PropagatorJob &);
void completed(const SyncFileItem &);
/**
* Emitted when all the sub-jobs have been finished and
@@ -160,7 +160,7 @@ public slots:
* @brief Propagate a directory, and all its sub entries.
* @ingroup libsync
*/
class OWNCLOUDSYNC_EXPORT PropagateDirectory : public PropagatorJob {
class PropagateDirectory : public PropagatorJob {
Q_OBJECT
public:
// e.g: create the directory
@@ -207,8 +207,7 @@ private slots:
bool possiblyRunNextJob(PropagatorJob *next) {
if (next->_state == NotYetStarted) {
connect(next, SIGNAL(finished(SyncFileItem::Status)), this, SLOT(slotSubJobFinished(SyncFileItem::Status)), Qt::QueuedConnection);
connect(next, SIGNAL(itemCompleted(const SyncFileItem &, const PropagatorJob &)),
this, SIGNAL(itemCompleted(const SyncFileItem &, const PropagatorJob &)));
connect(next, SIGNAL(completed(const SyncFileItem &)), this, SIGNAL(completed(const SyncFileItem &)));
connect(next, SIGNAL(progress(const SyncFileItem &,quint64)), this, SIGNAL(progress(const SyncFileItem &,quint64)));
connect(next, SIGNAL(ready()), this, SIGNAL(ready()));
_runningNow++;
@@ -334,7 +333,7 @@ private slots:
void scheduleNextJob();
signals:
void itemCompleted(const SyncFileItem &, const PropagatorJob &);
void completed(const SyncFileItem &);
void progress(const SyncFileItem&, quint64 bytes);
void finished();
/**
+2 -2
Ver Arquivo
@@ -53,7 +53,7 @@ QString ownCloudTheme::about() const
"Inc. in the United States, other countries, or both.</p>"
)
.arg(MIRALL_VERSION_STRING)
.arg("https://" MIRALL_STRINGIFY(APPLICATION_DOMAIN))
.arg("http://" MIRALL_STRINGIFY(APPLICATION_DOMAIN))
.arg(MIRALL_STRINGIFY(APPLICATION_DOMAIN));
devString += gitSHA1();
@@ -91,7 +91,7 @@ QVariant ownCloudTheme::customMedia(Theme::CustomMediaType type)
QString ownCloudTheme::helpUrl() const
{
return QString::fromLatin1("https://doc.owncloud.org/desktop/%1.%2/").arg(MIRALL_VERSION_MAJOR).arg(MIRALL_VERSION_MINOR);
return QString::fromLatin1("http://doc.owncloud.org/desktop/%1.%2/").arg(MIRALL_VERSION_MAJOR).arg(MIRALL_VERSION_MINOR);
}
#ifndef TOKEN_AUTH_ONLY
+4 -10
Ver Arquivo
@@ -182,7 +182,7 @@ quint64 ProgressInfo::completedSize() const
void ProgressInfo::setProgressComplete(const SyncFileItem &item)
{
_currentItems.remove(item._file);
_fileProgress.setCompleted(_fileProgress._completed + item._affectedItems);
_fileProgress._completed += item._affectedItems;
if (ProgressInfo::isSizeDependent(item)) {
_totalSizeOfCompletedJobs += item._size;
}
@@ -190,11 +190,11 @@ void ProgressInfo::setProgressComplete(const SyncFileItem &item)
_lastCompletedItem = item;
}
void ProgressInfo::setProgressItem(const SyncFileItem &item, quint64 completed)
void ProgressInfo::setProgressItem(const SyncFileItem &item, quint64 size)
{
_currentItems[item._file]._item = item;
_currentItems[item._file]._progress._completed = size;
_currentItems[item._file]._progress._total = item._size;
_currentItems[item._file]._progress.setCompleted(completed);
recomputeCompletedSize();
// This seems dubious!
@@ -273,7 +273,7 @@ void ProgressInfo::recomputeCompletedSize()
if (isSizeDependent(i._item))
r += i._progress._completed;
}
_sizeProgress.setCompleted(r);
_sizeProgress._completed = r;
}
ProgressInfo::Estimates ProgressInfo::Progress::estimates() const
@@ -314,11 +314,5 @@ void ProgressInfo::Progress::update()
_prevCompleted = _completed;
}
void ProgressInfo::Progress::setCompleted(quint64 completed)
{
_completed = qMin(completed, _total);
_prevCompleted = qMin(_prevCompleted, _completed);
}
}
+3 -13
Ver Arquivo
@@ -27,8 +27,6 @@
namespace OCC {
class PropagatorJob;
/**
* @brief The ProgressInfo class
* @ingroup libsync
@@ -128,12 +126,6 @@ public:
*/
void update();
/**
* Changes the _completed value and does sanity checks on
* _prevCompleted and _total.
*/
void setCompleted(quint64 completed);
// Updated by update()
double _progressPerSec;
quint64 _prevCompleted;
@@ -163,7 +155,7 @@ public:
void setProgressComplete(const SyncFileItem &item);
void setProgressItem(const SyncFileItem &item, quint64 completed);
void setProgressItem(const SyncFileItem &item, quint64 size);
/**
* Get the total completion estimate
@@ -239,11 +231,9 @@ signals:
*/
void progressInfo( const QString& folder, const ProgressInfo& progress );
/**
* @brief: the item was completed by a job
* @brief: the item's job is completed
*/
void itemCompleted(const QString &folder,
const SyncFileItem & item,
const PropagatorJob & job);
void jobCompleted(const QString &folder, const SyncFileItem & item);
void syncItemDiscovered(const QString &folder, const SyncFileItem & item);
+1 -2
Ver Arquivo
@@ -682,8 +682,7 @@ void PropagateUploadFileQNAM::slotPutFinished()
qWarning() << "Server do not support X-OC-MTime" << job->reply()->rawHeader("X-OC-MTime");
#ifdef USE_NEON
PropagatorJob *newJob = new UpdateMTimeAndETagJob(_propagator, _item);
QObject::connect(newJob, SIGNAL(itemCompleted(SyncFileItem, PropagatorJob)),
this, SLOT(finalize(SyncFileItem)));
QObject::connect(newJob, SIGNAL(completed(SyncFileItem)), this, SLOT(finalize(SyncFileItem)));
QMetaObject::invokeMethod(newJob, "start");
return;
#else
+4 -7
Ver Arquivo
@@ -403,9 +403,6 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote )
case CYSNC_STATUS_FILE_LOCKED_OR_OPEN:
item->_errorString = QLatin1String("File locked"); // don't translate, internal use!
break;
case CSYNC_STATUS_INDIVIDUAL_STAT_FAILED:
item->_errorString = tr("Stat failed.");
break;
case CSYNC_STATUS_SERVICE_UNAVAILABLE:
item->_errorString = QLatin1String("Server temporarily unavailable.");
break;
@@ -802,8 +799,8 @@ void SyncEngine::slotDiscoveryJobFinished(int discoveryResult)
_propagator = QSharedPointer<OwncloudPropagator>(
new OwncloudPropagator (_account, session, _localPath, _remoteUrl, _remotePath, _journal, &_thread));
connect(_propagator.data(), SIGNAL(itemCompleted(const SyncFileItem &, const PropagatorJob &)),
this, SLOT(slotItemCompleted(const SyncFileItem &, const PropagatorJob &)));
connect(_propagator.data(), SIGNAL(completed(const SyncFileItem &)),
this, SLOT(slotJobCompleted(const SyncFileItem &)));
connect(_propagator.data(), SIGNAL(progress(const SyncFileItem &,quint64)),
this, SLOT(slotProgress(const SyncFileItem &,quint64)));
connect(_propagator.data(), SIGNAL(adjustTotalTransmissionSize(qint64)), this, SLOT(slotAdjustTotalTransmissionSize(qint64)));
@@ -858,7 +855,7 @@ void SyncEngine::setNetworkLimits(int upload, int download)
}
}
void SyncEngine::slotItemCompleted(const SyncFileItem &item, const PropagatorJob &job)
void SyncEngine::slotJobCompleted(const SyncFileItem &item)
{
const char * instruction_str = csync_instruction_str(item._instruction);
qDebug() << Q_FUNC_INFO << item._file << instruction_str << item._status << item._errorString;
@@ -870,7 +867,7 @@ void SyncEngine::slotItemCompleted(const SyncFileItem &item, const PropagatorJob
}
emit transmissionProgress(*_progressInfo);
emit itemCompleted(item, job);
emit jobCompleted(item);
}
void SyncEngine::slotFinished()
+3 -4
Ver Arquivo
@@ -45,7 +45,6 @@ namespace OCC {
class SyncJournalFileRecord;
class SyncJournalDb;
class OwncloudPropagator;
class PropagatorJob;
/**
* @brief The SyncEngine class
@@ -101,8 +100,8 @@ signals:
// after the above signals. with the items that actually need propagating
void aboutToPropagate(SyncFileItemVector&);
// after each item completed by a job (successful or not)
void itemCompleted(const SyncFileItem&, const PropagatorJob&);
// after each job (successful or not)
void jobCompleted(const SyncFileItem&);
// after sync is done
void treeWalkResult(const SyncFileItemVector&);
@@ -122,7 +121,7 @@ signals:
private slots:
void slotRootEtagReceived(QString);
void slotItemCompleted(const SyncFileItem& item, const PropagatorJob & job);
void slotJobCompleted(const SyncFileItem& item);
void slotFinished();
void slotProgress(const SyncFileItem& item, quint64 curent);
void slotAdjustTotalTransmissionSize(qint64 change);
-5
Ver Arquivo
@@ -201,11 +201,6 @@ bool Theme::singleSyncFolder() const {
return false;
}
bool Theme::singleAccount() const
{
return false;
}
QString Theme::defaultServerFolder() const
{
return QLatin1String("/");
-4
Ver Arquivo
@@ -111,10 +111,6 @@ public:
* Characteristics: bool if more than one sync folder is allowed
*/
virtual bool singleSyncFolder() const;
/**
* When true, there can only be one account.
*/
virtual bool singleAccount() const;
/**
* URL to help file
+8 -8
Ver Arquivo
@@ -182,7 +182,7 @@ void Utility::setLaunchOnStartup(const QString &appName, const QString& guiName,
qint64 Utility::freeDiskSpace(const QString &path, bool *ok)
{
#if defined(Q_OS_MAC) || defined(Q_OS_FREEBSD) || defined(Q_OS_FREEBSD_KERNEL) || defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD)
#if defined(Q_OS_MAC) || defined(Q_OS_FREEBSD) || defined(Q_OS_FREEBSD_KERNEL) || defined(Q_OS_NETBSD)
Q_UNUSED(ok)
struct statvfs stat;
statvfs(path.toUtf8().data(), &stat);
@@ -301,12 +301,12 @@ QString Utility::durationToDescriptiveString(quint64 msecs)
{
struct Period { const char *name; quint64 msec; };
Q_DECL_CONSTEXPR Period periods[] = {
{ QT_TRANSLATE_NOOP("Utility", "%Ln year(s)") , 365*24*3600*1000LL },
{ QT_TRANSLATE_NOOP("Utility", "%Ln month(s)") , 30*24*3600*1000LL },
{ QT_TRANSLATE_NOOP("Utility", "%Ln day(s)") , 24*3600*1000LL },
{ QT_TRANSLATE_NOOP("Utility", "%Ln hour(s)") , 3600*1000LL },
{ QT_TRANSLATE_NOOP("Utility", "%Ln minute(s)") , 60*1000LL },
{ QT_TRANSLATE_NOOP("Utility", "%Ln second(s)") , 1000LL },
{ QT_TRANSLATE_NOOP("Utility", "%Ln year(s)") , 365*24*3600*1000L },
{ QT_TRANSLATE_NOOP("Utility", "%Ln month(s)") , 30*24*3600*1000L },
{ QT_TRANSLATE_NOOP("Utility", "%Ln day(s)") , 24*3600*1000L },
{ QT_TRANSLATE_NOOP("Utility", "%Ln hour(s)") , 3600*1000L },
{ QT_TRANSLATE_NOOP("Utility", "%Ln minute(s)") , 60*1000L },
{ QT_TRANSLATE_NOOP("Utility", "%Ln second(s)") , 1000L },
{ 0, 0 }
};
@@ -379,7 +379,7 @@ bool Utility::isLinux()
bool Utility::isBSD()
{
#if defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD)
#if defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD)
return true;
#else
return false;
+1 -3
Ver Arquivo
@@ -41,6 +41,4 @@ desktop.ini
*.gnucash.tmp-*
.synkron.*
.sync.ffs_db
.symform
.symform-store
.sync.ffs_db
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff

Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais