Comparar commits

..

48 Commits

Autor SHA1 Mensagem Data
Piotr M 5aa1629440 remove excesive loops and add sync files scheduler 2016-10-25 00:23:50 +02:00
Marcus Hoffmann fe984b61d7 Add script to create a caja plugin. (#5262)
Caja is a fork of nautilus maintained by the Mate project.
This adds a script to create a caja plugin from the nautilus plugin.
It replaces all occurences of nautilus with caja (case sensitive).
This is done in the same way the nemo plugin is generated from the nautilus one.
2016-10-24 15:36:23 +02:00
Olivier Goffart 6b899be895 Merge remote-tracking branch 'origin/2.2' into master 2016-10-21 10:27:33 +02:00
Jenkins for ownCloud 641785298f [tx-robot] updated from transifex 2016-10-21 02:18:31 +02:00
Jenkins for ownCloud 1f78ea0fd1 [tx-robot] updated from transifex 2016-10-20 02:18:28 +02:00
Jenkins for ownCloud 2fd9767892 [tx-robot] updated from transifex 2016-10-19 02:18:33 +02:00
Christian Kamm 69a1e46d0c Progress: Reset lastCompletedItem #5256
Otherwise progress listeners think it's still the last-completed
item when the next sync starts. This lead to spurious entries in
the "Recent Changes" list.
2016-10-18 12:29:52 +02:00
Christian Kamm e020a5327e Force a remote discovery when upgrading to this version #5242
A remote discovery will fix up any lingering problems caused by #5190.
2016-10-18 11:21:01 +02:00
Christian Kamm 1b04489887 Remove stale commented code
These functions don't even exist anymore.
2016-10-18 11:21:01 +02:00
Olivier Goffart 36a19703db SyncEngine: Permission error in subfolder of a folder that cannnot be added is a SoftError
Issue #5059
2016-10-17 12:22:04 +02:00
Jenkins for ownCloud f3a345a23b [tx-robot] updated from transifex 2016-10-17 02:18:29 +02:00
Jenkins for ownCloud 826459eae7 [tx-robot] updated from transifex 2016-10-17 01:15:13 +02:00
Jenkins for ownCloud c2c36b85cb [tx-robot] updated from transifex 2016-10-16 02:18:28 +02:00
Jenkins for ownCloud 7b2f8ae6f7 [tx-robot] updated from transifex 2016-10-15 02:18:29 +02:00
Markus Goetz d600fdc89b OS X: Use monochrome tray icon by default (#5229) 2016-10-14 14:26:31 +02:00
Markus Goetz 8c5ea8dc90 Propagator: Also upload more in parallel (#5230)
Fix for https://github.com/owncloud/client/issues/4986#issuecomment-227071801

This is before we have bundling at some point.
2016-10-14 14:23:55 +02:00
Jenkins for ownCloud 0eddcd6384 [tx-robot] updated from transifex 2016-10-14 02:18:29 +02:00
Klaas Freitag 9f2ae5dd17 Add a note that the source repositories need to be enabled. (#5239)
* Add a note that the source repositories need to be enabled.

* Fix typo, is => are.
2016-10-13 16:22:54 +02:00
Olivier Goffart 766d9ae1ac QProgressIndicator: update copy from upstream
Update from commit 05ce8a23cdc12e825532dc6de06c267fb8d48b4f from
https://github.com/dragotin/QProgressIndicator
Which itself is forked from commit e5ba0fd09bfd43b067ee3646d70b294c7efcb558 from
upstream, with additional license header.

It was relicensed to MIT according to
https://github.com/mojocorp/QProgressIndicator/commit/14bb9d10e29407175fdf4b9f03ed9cc7bb124f93

Relates to issues #5180 and #5184
2016-10-13 12:05:59 +02:00
Jenkins for ownCloud 21128ed762 [tx-robot] updated from transifex 2016-10-13 02:18:28 +02:00
Markus Goetz 5000d40619 Fixup previous commit
Thanks @ogoffart for spotting.
2016-10-12 19:10:56 +02:00
Jenkins for ownCloud 0d321050a6 [tx-robot] updated from transifex 2016-10-12 02:18:34 +02:00
Markus Goetz fc7aaf792b Auto Start: Only set on first account setup, not all later ones 2016-10-11 20:28:14 +02:00
Markus Goetz f6355e15a3 sqlite: Update bundled version to 3.14.2
For OS X and Windows.
2016-10-11 20:06:43 +02:00
Olivier Goffart d80d5a8ee4 SyncEngine: Fix renaming a folder should keep the selective sync state
Issue #5224

Two problems:

 - In the discovery phase, we need to check the selective sync entries of
   the source path in case of renames.

 - When the rename is done, we need to actually update the black list in the
   database.
2016-10-11 14:38:25 +02:00
Olivier Goffart e0a36ab313 TestFolderMan: don't pollute user's settings 2016-10-11 14:27:14 +02:00
Olivier Goffart 9d3e78ed54 AccountManager: do not load invalid account
Some tests (such as FolderManTest) can polute the config file with invalid
accounts.

(That's because most of the code, (even in libsync) always instentiate a ConfigFile)
2016-10-11 14:27:14 +02:00
Olivier Goffart b6079bfe4f Remove usused variable 2016-10-11 12:12:28 +02:00
Olivier Goffart f75106fd8e SyncJournalDB: check the return value of the prepare statements in checkConnect
Relates to #5199
2016-10-11 11:35:26 +02:00
Olivier Goffart 57fe7b800f Theme: Fix compiler warning
Relates #5227
2016-10-11 10:31:47 +02:00
Jenkins for ownCloud 089ecf8222 [tx-robot] updated from transifex 2016-10-11 02:18:32 +02:00
Olivier Goffart c2fa9b5bbf AccoutWizard: Change the set policy of a radio button
In an attempt to make sure the button next to it don't get too small.

Issue #5209
2016-10-10 13:27:28 +02:00
Olivier Goffart 86522cbbf0 OwnSQL: avoid crashing in SqlQuery::reset_and_clear_bindings
The crash reporter shows a lot of crashes in sqlite3_clear_bindings
which seems to indicate that _stmt is null. We should guard against
a null value in order to avoid crashing.

This should only happen if the prepare call fails. We don't usually
check the return value of the prepare call, but if _stmt is null, the
exec call should return false, not true. We check the result of the
exec call, so this should then abort the sync with an error, rather
than crashing.
2016-10-10 13:27:12 +02:00
Jenkins for ownCloud d54f8adac5 [tx-robot] updated from transifex 2016-10-10 02:18:29 +02:00
Jenkins for ownCloud d35ecafa0b [tx-robot] updated from transifex 2016-10-09 02:18:27 +02:00
Jenkins for ownCloud 2ca807280a [tx-robot] updated from transifex 2016-10-08 02:18:33 +02:00
Christian Kamm 91b6b88883 Tray: Fix crash on startup for non-OSX oses 2016-10-07 13:32:42 +02:00
Christian Kamm f36d4562a1 Doc: Remove mention of "F5 to reset database" #5130 2016-10-07 13:22:43 +02:00
Tommy Sparber 67ecca492b Improve macOS SysTray/StatusBar monochrome icon (#5227)
- Use a white icon if the context menu is visible.
- Enable `QIcon::setIsMask` if compiled on Qt >= 5.6 to allow automatic
  macOS color handling.
- No changes if the colored icons are used.
2016-10-06 17:18:51 +02:00
Markus Goetz 84c925dc58 503: Also parse other server error message (#5228)
From https://github.com/owncloud/core/pull/26145
2016-10-06 14:45:04 +02:00
Jenkins for ownCloud e1a01c75d9 [tx-robot] updated from transifex 2016-10-06 02:18:30 +02:00
Jenkins for ownCloud 6a4adbc87e [tx-robot] updated from transifex 2016-10-05 02:18:30 +02:00
Jenkins for ownCloud 89974ab1d4 [tx-robot] updated from transifex 2016-10-04 02:18:30 +02:00
Jenkins for ownCloud 8d0c313486 [tx-robot] updated from transifex 2016-10-03 02:18:39 +02:00
Jenkins for ownCloud aab0cdf12a [tx-robot] updated from transifex 2016-10-02 02:18:29 +02:00
Jenkins for ownCloud a89520043e [tx-robot] updated from transifex 2016-10-01 02:18:30 +02:00
Jenkins for ownCloud 6382a142cd [tx-robot] updated from transifex 2016-10-01 01:15:17 +02:00
Jenkins for ownCloud 02c403e360 [tx-robot] updated from transifex 2016-09-30 02:18:34 +02:00
48 arquivos alterados com 4858 adições e 3279 exclusões
+1 -1
Ver Arquivo
@@ -1,5 +1,5 @@
# Auto-generated - do not modify
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Toon opmerkingen bij deze uitgave"
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Toon opmerkingen bij deze versie"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Gevonden ${APPLICATION_EXECUTABLE} proces(sen) moet worden gestopt.$\nWilt u dat het installatieprogramma dat voor u doet?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Stoppen ${APPLICATION_EXECUTABLE} processen."
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Het te stoppen proces is niet gevonden!"
+1 -1
Ver Arquivo
@@ -2,7 +2,7 @@
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Mostrar las notas de la versión"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "El/los proceso/s ${APPLICATION_EXECUTABLE} debe/n ser detenidos.$\n¿Quiere que el instalador lo haga por usted?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Deteniendo el/los proceso/s ${APPLICATION_EXECUTABLE}."
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "¡Proceso para finalizar no encontrado!"
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "¡Proceso a finalizar no encontrado!"
StrCpy $PageReinstall_NEW_Field_1 "Una versión anterior de ${APPLICATION_NAME} se encuentra instalada en el sistema. Se recomienda de instalar la versión actual antes de instalar la nueva. Seleccione la operacion deseada y haga click en Siguiente para continuar."
StrCpy $PageReinstall_NEW_Field_2 "Desinstalar antes de instalar"
StrCpy $PageReinstall_NEW_Field_3 "No desinstalar"
+1
Ver Arquivo
@@ -521,6 +521,7 @@ static void _csync_clean_ctx(CSYNC *ctx)
c_rbtree_free(ctx->local.tree);
c_rbtree_free(ctx->remote.tree);
SAFE_FREE(ctx->statedb.file);
SAFE_FREE(ctx->remote.root_perms);
}
+5
Ver Arquivo
@@ -20,6 +20,7 @@
extern "C" {
#include "csync_private.h"
#include "csync_rename.h"
}
#include <map>
@@ -93,5 +94,9 @@ char* csync_rename_adjust_path_source(CSYNC* ctx, const char* path)
return c_strdup(path);
}
bool csync_rename_count(CSYNC *ctx) {
csync_rename_s* d = csync_rename_s::get(ctx);
return d->folder_renamed_from.size();
}
}
+2
Ver Arquivo
@@ -32,6 +32,8 @@ char OCSYNC_EXPORT *csync_rename_adjust_path(CSYNC *ctx, const char *path);
char OCSYNC_EXPORT *csync_rename_adjust_path_source(CSYNC *ctx, const char *path);
void OCSYNC_EXPORT csync_rename_destroy(CSYNC *ctx);
void OCSYNC_EXPORT csync_rename_record(CSYNC *ctx, const char *from, const char *to);
/* Return the amount of renamed item recorded */
bool OCSYNC_EXPORT csync_rename_count(CSYNC *ctx);
#ifdef __cplusplus
}
-6
Ver Arquivo
@@ -199,12 +199,6 @@ the database by comparing the files and their modification times. This process
ensures that both server and client are synchronized using the appropriate NTP
time before restarting the client following a database removal.
Pressing ``F5`` while in the Account Settings Dialog enables you to "reset" the
journal. This function can be used to recreate the journal database.
.. note:: We recommend that you use this function only when advised to do so by
ownCloud support staff.
Custom WebDAV Properties
------------------------
+2 -1
Ver Arquivo
@@ -42,7 +42,8 @@ repositories`_ to see all the Linux client repos.
echo 'deb-src
http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Debian_8.0/ /' >> /etc/apt/sources.list.d/owncloud-client.list
2. Install the dependencies using the following commands for your specific Linux distribution:
2. Install the dependencies using the following commands for your specific Linux
distribution. Make sure the repositories for source packages are enabled.
* Debian/Ubuntu: ``apt-get update; apt-get build-dep owncloud-client``
* openSUSE/SLES: ``zypper ref; zypper si -d owncloud-client``
+60
Ver Arquivo
@@ -355,6 +355,66 @@ X-GNOME-Autostart-Delay=3
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
Comment[oc]=@APPLICATION_NAME@ sincronizacion del client
GenericName[oc]=Dorsièr de Sincronizacion
+9
Ver Arquivo
@@ -4,6 +4,7 @@ if( UNIX AND NOT APPLE )
configure_file(syncstate.py syncstate.py COPYONLY)
configure_file(syncstate.py syncstate_nemo.py COPYONLY)
configure_file(syncstate.py syncstate_caja.py COPYONLY)
# Call the setupappname.sh script to set the custom app name.
set (cmd "${CMAKE_CURRENT_SOURCE_DIR}/setappname.sh")
@@ -18,9 +19,17 @@ if( UNIX AND NOT APPLE )
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
ERROR_VARIABLE errors OUTPUT_VARIABLE out)
# Create a caja plugin script from the nautilus one.
# cajacmd copies the syncstate.py and performs string replacement.
set (cajacmd "${CMAKE_CURRENT_SOURCE_DIR}/createcajaplugin.sh")
execute_process(COMMAND ${cajacmd}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
ERROR_VARIABLE errors OUTPUT_VARIABLE out)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/syncstate.py DESTINATION ${DATADIR}/nautilus-python/extensions RENAME syncstate-${APPLICATION_SHORTNAME}.py)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/syncstate_nemo.py DESTINATION ${DATADIR}/nemo-python/extensions RENAME syncstate-${APPLICATION_SHORTNAME}.py)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/syncstate_caja.py DESTINATION ${DATADIR}/caja-python/extensions RENAME syncstate-${APPLICATION_SHORTNAME}.py)
+7
Ver Arquivo
@@ -0,0 +1,7 @@
#!/bin/sh
# this script creates a plugin for caja, just by replacing
# all occurences of Nautilus with Caja (case sensitive).
sed -i.org -e 's/Nautilus/Caja/g' syncstate_caja.py
sed -i.org -e 's/nautilus/caja/g' syncstate_caja.py
+17 -161
Ver Arquivo
@@ -1,165 +1,21 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
The MIT License (MIT)
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Copyright (c) 2011 Morgan Leborgne
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+23 -20
Ver Arquivo
@@ -1,24 +1,27 @@
/*
*
* This file is part of QProgressIndicator,
* an open-source recent files menu widget
*
* Copyright (C) 2009 - 2010 Morgan Leborgne
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QRecentFilesMenu. If not, see <http://www.gnu.org/licenses/>.
*
*/
* The MIT License (MIT)
*
* Copyright (c) 2011 Morgan Leborgne
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include "QProgressIndicator.h"
#include <QPainter>
+27 -24
Ver Arquivo
@@ -1,24 +1,27 @@
/*
*
* This file is part of QProgressIndicator,
* an open-source recent files menu widget
*
* Copyright (C) 2009 - 2010 Morgan Leborgne
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QRecentFilesMenu. If not, see <http://www.gnu.org/licenses/>.
*
*/
* The MIT License (MIT)
*
* Copyright (c) 2011 Morgan Leborgne
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef QPROGRESSINDICATOR_H
#define QPROGRESSINDICATOR_H
@@ -64,8 +67,8 @@ public:
*/
const QColor & color() const { return m_color; }
virtual QSize sizeHint() const Q_DECL_OVERRIDE;
int heightForWidth(int w) const Q_DECL_OVERRIDE;
virtual QSize sizeHint() const;
int heightForWidth(int w) const;
public slots:
/*! Starts the spin animation.
\sa stopAnimation isAnimated
@@ -95,8 +98,8 @@ public slots:
*/
void setColor(const QColor & color);
protected:
virtual void timerEvent(QTimerEvent * event) Q_DECL_OVERRIDE;
virtual void paintEvent(QPaintEvent * event) Q_DECL_OVERRIDE;
virtual void timerEvent(QTimerEvent * event);
virtual void paintEvent(QPaintEvent * event);
private:
int m_angle;
int m_timerId;
+1 -1
Ver Arquivo
@@ -11,4 +11,4 @@ Qt 4.4.x.
## License
LGPL
MIT
+3732 -2679
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+421 -267
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+8 -1
Ver Arquivo
@@ -209,6 +209,13 @@ void AccountManager::saveAccountHelper(Account* acc, QSettings& settings, bool s
AccountPtr AccountManager::loadAccountHelper(QSettings& settings)
{
auto urlConfig = settings.value(QLatin1String(urlC));
if (!urlConfig.isValid()) {
// No URL probably means a corrupted entry in the account settings
qDebug() << "No URL for account " << settings.group();
return AccountPtr();
}
auto acc = createAccount();
QString authType = settings.value(QLatin1String(authTypeC)).toString();
@@ -220,7 +227,7 @@ AccountPtr AccountManager::loadAccountHelper(QSettings& settings)
acc->setUrl(overrideUrl);
authType = forceAuth;
} else {
acc->setUrl(settings.value(QLatin1String(urlC)).toUrl());
acc->setUrl(urlConfig.toUrl());
}
acc->_serverVersion = settings.value(QLatin1String(serverVersionC)).toString();
+8 -3
Ver Arquivo
@@ -336,9 +336,14 @@ void Application::slotownCloudWizardDone( int res )
_checkConnectionTimer.start();
slotCheckConnection();
// The very first time an account is configured: enabled autostart
// TODO: Doing this every time the account wizard finishes will annoy users.
Utility::setLaunchOnStartup(_theme->appName(), _theme->appNameGUI(), true);
// If one account is configured: enable autostart
bool shouldSetAutoStart = (accountMan->accounts().size() == 1);
#ifdef Q_OS_MAC
// Don't auto start when not being 'installed'
shouldSetAutoStart = shouldSetAutoStart
&& QCoreApplication::applicationDirPath().startsWith("/Applications/");
#endif
Utility::setLaunchOnStartup(_theme->appName(), _theme->appNameGUI(), shouldSetAutoStart);
}
}
-5
Ver Arquivo
@@ -758,8 +758,6 @@ void Folder::startSync(const QStringList &pathList)
QMetaObject::invokeMethod(_engine.data(), "startSync", Qt::QueuedConnection);
// disable events until syncing is done
// _watcher->setEventsEnabled(false);
emit syncStarted();
}
@@ -823,9 +821,6 @@ void Folder::slotSyncFinished(bool success)
bubbleUpSyncResult();
bool anotherSyncNeeded = _engine->isAnotherSyncNeeded();
// _watcher->setEventsEnabledDelayed(2000);
if (_csyncError) {
_syncResult.setStatus(SyncResult::Error);
+12 -6
Ver Arquivo
@@ -67,7 +67,7 @@ ownCloudGui::ownCloudGui(Application *parent) :
_tray->setParent(this);
// for the beginning, set the offline icon until the account was verified
_tray->setIcon( Theme::instance()->folderOfflineIcon(true));
_tray->setIcon( Theme::instance()->folderOfflineIcon(/*systray?*/ true, /*currently visible?*/ false));
connect(_tray.data(), SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
SLOT(slotTrayClicked(QSystemTrayIcon::ActivationReason)));
@@ -262,7 +262,7 @@ void ownCloudGui::slotComputeOverallSyncStatus()
}
if (!problemAccounts.empty()) {
_tray->setIcon(Theme::instance()->folderOfflineIcon(true));
_tray->setIcon(Theme::instance()->folderOfflineIcon(true, contextMenuVisible()));
#ifdef Q_OS_WIN
// Windows has a 128-char tray tooltip length limit.
QStringList accountNames;
@@ -289,11 +289,11 @@ void ownCloudGui::slotComputeOverallSyncStatus()
}
if (allSignedOut) {
_tray->setIcon(Theme::instance()->folderOfflineIcon(true));
_tray->setIcon(Theme::instance()->folderOfflineIcon(true, contextMenuVisible()));
_tray->setToolTip(tr("Please sign in"));
return;
} else if (allPaused) {
_tray->setIcon(Theme::instance()->syncStateIcon(SyncResult::Paused, true));
_tray->setIcon(Theme::instance()->syncStateIcon(SyncResult::Paused, true, contextMenuVisible()));
_tray->setToolTip(tr("Account synchronization is disabled"));
return;
}
@@ -323,12 +323,12 @@ void ownCloudGui::slotComputeOverallSyncStatus()
trayMessage = tr("No sync folders configured.");
}
QIcon statusIcon = Theme::instance()->syncStateIcon( overallResult.status(), true);
QIcon statusIcon = Theme::instance()->syncStateIcon( overallResult.status(), true, contextMenuVisible());
_tray->setIcon( statusIcon );
_tray->setToolTip(trayMessage);
} else {
// undefined because there are no folders.
QIcon icon = Theme::instance()->syncStateIcon(SyncResult::Problem, true);
QIcon icon = Theme::instance()->syncStateIcon(SyncResult::Problem, true, contextMenuVisible());
_tray->setIcon( icon );
_tray->setToolTip(tr("There are no sync folders configured."));
}
@@ -405,6 +405,9 @@ void ownCloudGui::slotContextMenuAboutToShow()
// For some reason on OS X _contextMenu->isVisible returns always false
qDebug() << "";
_contextMenuVisibleOsx = true;
// Update icon in sys tray, as it might change depending on the context menu state
slotComputeOverallSyncStatus();
}
void ownCloudGui::slotContextMenuAboutToHide()
@@ -412,6 +415,9 @@ void ownCloudGui::slotContextMenuAboutToHide()
// For some reason on OS X _contextMenu->isVisible returns always false
qDebug() << "";
_contextMenuVisibleOsx = false;
// Update icon in sys tray, as it might change depending on the context menu state
slotComputeOverallSyncStatus();
}
bool ownCloudGui::contextMenuVisible() const
@@ -267,6 +267,12 @@
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QRadioButton" name="rSelectiveSync">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
+6 -1
Ver Arquivo
@@ -611,7 +611,12 @@ void ConfigFile::setPromptDeleteFiles(bool promptDeleteFiles)
bool ConfigFile::monoIcons() const
{
QSettings settings(configFile(), QSettings::IniFormat);
return settings.value(QLatin1String(monoIconsC), false).toBool();
bool monoDefault = false; // On Mac we want bw by default
#ifdef Q_OS_MAC
// OEM themes are not obliged to ship mono icons
monoDefault = (0 == (strcmp("ownCloud",APPLICATION_NAME)));
#endif
return settings.value(QLatin1String(monoIconsC), monoDefault).toBool();
}
void ConfigFile::setMonoIcons(bool useMonoIcons)
+18 -4
Ver Arquivo
@@ -14,6 +14,7 @@
#include "discoveryphase.h"
#include <csync_private.h>
#include <csync_rename.h>
#include <qdebug.h>
#include <QUrl>
@@ -51,7 +52,7 @@ static bool findPathInList(const QStringList &list, const QString &path)
return pathSlash.startsWith(*it);
}
bool DiscoveryJob::isInSelectiveSyncBlackList(const QString& path) const
bool DiscoveryJob::isInSelectiveSyncBlackList(const char *path) const
{
if (_selectiveSyncBlackList.isEmpty()) {
// If there is no black list, everything is allowed
@@ -59,13 +60,25 @@ bool DiscoveryJob::isInSelectiveSyncBlackList(const QString& path) const
}
// Block if it is in the black list
return findPathInList(_selectiveSyncBlackList, path);
if (findPathInList(_selectiveSyncBlackList, QString::fromUtf8(path))) {
return true;
}
// Also try to adjust the path if there was renames
if (csync_rename_count(_csync_ctx)) {
QScopedPointer<char, QScopedPointerPodDeleter> adjusted(
csync_rename_adjust_path_source(_csync_ctx, path));
if (strcmp(adjusted.data(), path) != 0) {
return findPathInList(_selectiveSyncBlackList, QString::fromUtf8(adjusted.data()));
}
}
return false;
}
int DiscoveryJob::isInSelectiveSyncBlackListCallback(void *data, const char *path)
{
return static_cast<DiscoveryJob*>(data)->isInSelectiveSyncBlackList(QString::fromUtf8(path));
return static_cast<DiscoveryJob*>(data)->isInSelectiveSyncBlackList(path);
}
bool DiscoveryJob::checkSelectiveSyncNewFolder(const QString& path)
@@ -192,7 +205,8 @@ int get_errno_from_http_errcode( int err, const QString & reason ) {
new_errno = EIO;
break;
case 503: /* Service Unavailable */
if (reason == "Storage not available") {
// https://github.com/owncloud/core/pull/26145/files
if (reason == "Storage not available" || reason == "Storage is temporarily not available") {
new_errno = ERRNO_STORAGE_UNAVAILABLE;
} else {
new_errno = ERRNO_SERVICE_UNAVAILABLE;
+1 -1
Ver Arquivo
@@ -174,7 +174,7 @@ class DiscoveryJob : public QObject {
* return true if the given path should be ignored,
* false if the path should be synced
*/
bool isInSelectiveSyncBlackList(const QString &path) const;
bool isInSelectiveSyncBlackList(const char* path) const;
static int isInSelectiveSyncBlackListCallback(void *, const char *);
bool checkSelectiveSyncNewFolder(const QString &path);
static int checkSelectiveSyncNewFolderCallback(void*, const char*);
+94 -3
Ver Arquivo
@@ -384,6 +384,8 @@ void OwncloudPropagator::start(const SyncFileItemVector& items)
// will delete directories, so defer execution
directoriesToRemove.prepend(current);
removedDirectory = item->_file + "/";
} else if (item->_instruction == CSYNC_INSTRUCTION_NEW || item->_instruction == CSYNC_INSTRUCTION_SYNC){
directories.top().second->appendSyncJob(current);
} else {
directories.top().second->append(current);
}
@@ -529,7 +531,7 @@ void OwncloudPropagator::scheduleNextJob()
}
}
if (_activeJobList.count() < maximumActiveJob() + likelyFinishedQuicklyCount) {
qDebug() << "Can pump in another request!";
qDebug() << "Can pump in another request! activeJobs =" << _activeJobList.count();
if (_rootJob->scheduleNextJob()) {
QTimer::singleShot(0, this, SLOT(scheduleNextJob()));
}
@@ -593,7 +595,11 @@ bool PropagateDirectory::scheduleNextJob()
_state = Running;
if (!_firstJob && _subJobs.isEmpty()) {
finalize();
if (!_scheduledSyncJobs && _syncJobsScheduler) {
scheduleSyncJobs();
} else {
finalize();
}
return true;
}
}
@@ -657,12 +663,23 @@ void PropagateDirectory::slotSubJobFinished(SyncFileItem::Status status)
// check if we finished
if (_jobsFinished >= totalJobs) {
Q_ASSERT(!_runningNow); // how can we be finished if there are still jobs running now
finalize();
if (!_scheduledSyncJobs && _syncJobsScheduler) {
scheduleSyncJobs();
} else {
finalize();
}
} else {
emit ready();
}
}
void PropagateDirectory::scheduleSyncJobs() {
_scheduledSyncJobs = true;
//at this point, scheduler will be destroyed together with _subJobs
_subJobs.append(_syncJobsScheduler.data());
emit ready();
}
void PropagateDirectory::finalize()
{
bool ok = true;
@@ -711,6 +728,80 @@ qint64 PropagateDirectory::committedDiskSpace() const
return needed;
}
// ================================================================================
PropagatorJob::JobParallelism PropagateSyncItems::parallelism()
{
return FullParallelism;
}
bool PropagateSyncItems::scheduleNextJob()
{
if (_state == Finished) {
return false;
}
if (_state == NotYetStarted) {
_state = Running;
if (_syncJobs.isEmpty()) {
finalize();
return true;
}
}
while (!_syncJobs.isEmpty()) {
PropagatorJob *next = _syncJobs.takeFirst();
if (next->_state == Finished) {
continue;
}
if (possiblyRunNextJob(next)) {
return true;
}
Q_ASSERT(next->_state == Running);
}
return false;
}
void PropagateSyncItems::slotSubJobFinished(SyncFileItem::Status status)
{
if (status == SyncFileItem::FatalError) {
abort();
_hasError = status;
finalize();
return;
} else if (status == SyncFileItem::NormalError || status == SyncFileItem::SoftError) {
_hasError = status;
}
_jobsFinished++;
// We finished processing all the jobs
// check if we finished
if (_syncJobs.isEmpty() && (_syncJobsCount == _jobsFinished)) {
finalize();
} else {
emit ready();
}
}
void PropagateSyncItems::finalize()
{
_state = Finished;
emit finished(_hasError == SyncFileItem::NoStatus ? SyncFileItem::Success : _hasError);
}
qint64 PropagateSyncItems::committedDiskSpace() const
{
qint64 needed = 0;
foreach (PropagatorJob* job, _syncJobs) {
needed += job->committedDiskSpace();
}
return needed;
}
CleanupPollsJob::~CleanupPollsJob()
{}
+76 -3
Ver Arquivo
@@ -176,6 +176,59 @@ public slots:
virtual void start() = 0;
};
/**
* @brief Propagate sync items within a specific folder, and all its sub entries.
* @ingroup libsync
*/
class PropagateSyncItems : public PropagatorJob {
Q_OBJECT
public:
// all the sub files or sub directories.
QList<PropagatorJob *> _syncJobs;
int _jobsFinished; // number of jobs that have completed
int _syncJobsCount; // number of subJobs running right now
SyncFileItem::Status _hasError; // NoStatus, or NormalError / SoftError if there was an error
PropagateSyncItems(OwncloudPropagator *propagator)
: PropagatorJob(propagator)
, _jobsFinished(0), _syncJobsCount(0), _hasError(SyncFileItem::NoStatus)
{ }
virtual ~PropagateSyncItems() {
qDeleteAll(_syncJobs);
}
void append(PropagatorJob *subJob) {
_syncJobs.append(subJob);
_syncJobsCount++;
}
virtual bool scheduleNextJob() Q_DECL_OVERRIDE;
virtual JobParallelism parallelism() Q_DECL_OVERRIDE;
virtual void abort() Q_DECL_OVERRIDE {
foreach (PropagatorJob *j, _syncJobs)
j->abort();
}
void finalize();
qint64 committedDiskSpace() const Q_DECL_OVERRIDE;
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(progress(const SyncFileItem &,quint64)), this, SIGNAL(progress(const SyncFileItem &,quint64)));
connect(next, SIGNAL(ready()), this, SIGNAL(ready()));
}
return next->scheduleNextJob();
}
void slotSubJobFinished(SyncFileItem::Status status);
};
/**
* @brief Propagate a directory, and all its sub entries.
@@ -187,7 +240,12 @@ public:
// e.g: create the directory
QScopedPointer<PropagateItemJob>_firstJob;
// all the sub files or sub directories.
// all the new and changed files without conflicts scheduler class
// remark: do not QScopedPointer, since this class is either deleted via qDeleteAll(_subJobs) or usual delete,
// depending on ownership determined by flag _scheduledSyncJobs
QPointer<PropagateSyncItems> _syncJobsScheduler;
// all the other file operation or sub directories.
QVector<PropagatorJob *> _subJobs;
SyncFileItemPtr _item;
@@ -195,13 +253,18 @@ public:
int _jobsFinished; // number of jobs that have completed
int _runningNow; // number of subJobs running right now
SyncFileItem::Status _hasError; // NoStatus, or NormalError / SoftError if there was an error
bool _scheduledSyncJobs; // verify if already scheduled execution of files sync jobs
explicit PropagateDirectory(OwncloudPropagator *propagator, const SyncFileItemPtr &item = SyncFileItemPtr(new SyncFileItem))
: PropagatorJob(propagator)
, _firstJob(0), _item(item), _jobsFinished(0), _runningNow(0), _hasError(SyncFileItem::NoStatus)
, _firstJob(0), _syncJobsScheduler(0), _item(item), _jobsFinished(0), _runningNow(0), _hasError(SyncFileItem::NoStatus), _scheduledSyncJobs(false)
{ }
virtual ~PropagateDirectory() {
// check whether the owner of the pointer is _subJobs or PropagateDirectory class
if (!_scheduledSyncJobs){
delete _syncJobsScheduler;
}
qDeleteAll(_subJobs);
}
@@ -209,11 +272,20 @@ public:
_subJobs.append(subJob);
}
void appendSyncJob(PropagatorJob *subJob) {
if (!_syncJobsScheduler) {
_syncJobsScheduler = new PropagateSyncItems(_propagator);
}
_syncJobsScheduler->append(subJob);
}
virtual bool scheduleNextJob() Q_DECL_OVERRIDE;
virtual JobParallelism parallelism() Q_DECL_OVERRIDE;
virtual void abort() Q_DECL_OVERRIDE {
if (_firstJob)
_firstJob->abort();
if (_syncJobsScheduler)
_syncJobsScheduler->abort();
foreach (PropagatorJob *j, _subJobs)
j->abort();
}
@@ -224,6 +296,8 @@ public:
void finalize();
void scheduleSyncJobs();
qint64 committedDiskSpace() const Q_DECL_OVERRIDE;
private slots:
@@ -242,7 +316,6 @@ private slots:
void slotSubJobFinished(SyncFileItem::Status status);
};
/**
* @brief Dummy job that just mark it as completed and ignored
* @ingroup libsync
+9 -3
Ver Arquivo
@@ -230,8 +230,12 @@ bool SqlQuery::isPragma()
bool SqlQuery::exec()
{
if (!_stmt) {
return false;
}
// Don't do anything for selects, that is how we use the lib :-|
if(_stmt && !isSelect() && !isPragma() ) {
if( !isSelect() && !isPragma() ) {
int rc, n = 0;
do {
rc = sqlite3_step(_stmt);
@@ -376,8 +380,10 @@ void SqlQuery::finish()
void SqlQuery::reset_and_clear_bindings()
{
SQLITE_DO(sqlite3_reset(_stmt));
SQLITE_DO(sqlite3_clear_bindings(_stmt));
if (_stmt) {
SQLITE_DO(sqlite3_reset(_stmt));
SQLITE_DO(sqlite3_clear_bindings(_stmt));
}
}
} // namespace OCC
+1
Ver Arquivo
@@ -147,6 +147,7 @@ void ProgressInfo::reset()
_maxBytesPerSecond = 100000.0;
_maxFilesPerSecond = 2.0;
_updateEstimatesTimer.stop();
_lastCompletedItem = SyncFileItem();
}
void ProgressInfo::startEstimateUpdates()
+36
Ver Arquivo
@@ -13,6 +13,7 @@
*/
#include "propagateremotemove.h"
#include "propagatorjobs.h"
#include "owncloudpropagator_p.h"
#include "account.h"
#include "syncjournalfilerecord.h"
@@ -175,10 +176,45 @@ void PropagateRemoteMove::finalize()
done(SyncFileItem::FatalError, tr("Error writing metadata to the database"));
return;
}
if (_item->_isDirectory) {
if (!adjustSelectiveSync(_propagator->_journal, _item->_file, _item->_renameTarget)) {
done(SyncFileItem::FatalError, tr("Error writing metadata to the database"));
return;
}
}
_propagator->_journal->commit("Remote Rename");
done(SyncFileItem::Success);
}
bool PropagateRemoteMove::adjustSelectiveSync(SyncJournalDb *journal, const QString &from_, const QString &to_)
{
bool ok;
// We only care about preserving the blacklist. The white list should anyway be empty.
// And the undecided list will be repopulated on the next sync, if there is anything too big.
QStringList list = journal->getSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, &ok);
if (!ok)
return false;
bool changed = false;
Q_ASSERT(!from_.endsWith(QLatin1String("/")));
Q_ASSERT(!to_.endsWith(QLatin1String("/")));
QString from = from_ + QLatin1String("/");
QString to = to_ + QLatin1String("/");
for (auto it = list.begin(); it != list.end(); ++it) {
if (it->startsWith(from)) {
*it = it->replace(0, from.size(), to);
changed = true;
}
}
if (changed) {
journal->setSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, list);
}
return true;
}
}
+6
Ver Arquivo
@@ -51,6 +51,12 @@ public:
void start() Q_DECL_OVERRIDE;
void abort() Q_DECL_OVERRIDE;
JobParallelism parallelism() Q_DECL_OVERRIDE { return OCC::PropagatorJob::WaitForFinishedInParentDirectory; }
/**
* Rename the directory in the selective sync list
*/
static bool adjustSelectiveSync(SyncJournalDb *journal, const QString &from, const QString &to);
private slots:
void slotMoveJobFinished();
void finalize();
+2
Ver Arquivo
@@ -195,6 +195,8 @@ public:
: PropagateItemJob(propagator, item), _startChunk(0), _currentChunk(0), _chunkCount(0), _transferId(0), _finished(false), _deleteExisting(false) {}
void start() Q_DECL_OVERRIDE;
bool isLikelyFinishedQuickly() Q_DECL_OVERRIDE { return _item->_size < 100*1024; }
/**
* Whether an existing entity with the same name may be deleted before
* the upload.
+8 -2
Ver Arquivo
@@ -15,7 +15,7 @@
#include "propagatorjobs.h"
#include "owncloudpropagator_p.h"
#include "propagateremotemove.h"
#include "utility.h"
#include "syncjournaldb.h"
#include "syncjournalfilerecord.h"
@@ -231,6 +231,7 @@ void PropagateLocalRename::start()
_propagator->_journal->deleteFileRecord(_item->_originalFile);
// store the rename file name in the item.
const auto oldFile = _item->_file;
_item->_file = _item->_renameTarget;
SyncJournalFileRecord record(*_item, targetFile);
@@ -245,9 +246,14 @@ void PropagateLocalRename::start()
done(SyncFileItem::FatalError, tr("Error writing metadata to the database"));
return;
}
} else {
if (!PropagateRemoteMove::adjustSelectiveSync(_propagator->_journal, oldFile, _item->_renameTarget)) {
done(SyncFileItem::FatalError, tr("Error writing metadata to the database"));
return;
}
}
_propagator->_journal->commit("localRename");
_propagator->_journal->commit("localRename");
done(SyncFileItem::Success);
}
+1 -1
Ver Arquivo
@@ -1163,7 +1163,7 @@ void SyncEngine::checkForPermission()
qDebug() << "Moving of " << (*it)->_file << " canceled because no permission to add parent folder";
}
(*it)->_instruction = CSYNC_INSTRUCTION_ERROR;
(*it)->_status = SyncFileItem::NormalError;
(*it)->_status = SyncFileItem::SoftError;
(*it)->_errorString = tr("Not allowed because you don't have permission to add parent folder");
}
-1
Ver Arquivo
@@ -202,7 +202,6 @@ private:
SyncJournalDb *_journal;
QPointer<DiscoveryMainThread> _discoveryMainThread;
QSharedPointer <OwncloudPropagator> _propagator;
QString _lastDeleted; // if the last item was a path and it has been deleted
// After a sync, only the syncdb entries whose filenames appear in this
// set will be kept. See _temporarilyUnavailablePaths.
+84 -31
Ver Arquivo
@@ -318,7 +318,9 @@ bool SyncJournalDb::checkConnect()
createQuery.bindValue(2, MIRALL_VERSION_MINOR);
createQuery.bindValue(3, MIRALL_VERSION_PATCH);
createQuery.bindValue(4, MIRALL_VERSION_BUILD);
createQuery.exec();
if (!createQuery.exec()) {
return sqlFail("Update version", createQuery);
}
} else {
int major = versionQuery.intValue(0);
@@ -329,6 +331,15 @@ bool SyncJournalDb::checkConnect()
qDebug() << Q_FUNC_INFO << "possibleUpgradeFromMirall_1_8_0_or_1 detected!";
forceRemoteDiscovery = true;
}
// There was a bug in versions <2.3.0 that could lead to stale
// local files and a remote discovery will fix them.
// See #5190 #5242.
if( major == 2 && minor < 3) {
qDebug() << Q_FUNC_INFO << "upgrade form client < 2.3.0 detected! forcing remote discovery";
forceRemoteDiscovery = true;
}
// Not comparing the BUILD id here, correct?
if( !(major == MIRALL_VERSION_MAJOR && minor == MIRALL_VERSION_MINOR && patch == MIRALL_VERSION_PATCH) ) {
createQuery.prepare("UPDATE version SET major=?1, minor=?2, patch =?3, custom=?4 "
@@ -367,60 +378,84 @@ bool SyncJournalDb::checkConnect()
}
_getFileRecordQuery.reset(new SqlQuery(_db));
_getFileRecordQuery->prepare(
if (_getFileRecordQuery->prepare(
"SELECT path, inode, uid, gid, mode, modtime, type, md5, fileid, remotePerm, filesize,"
" ignoredChildrenRemote, contentChecksum, contentchecksumtype.name"
" FROM metadata"
" LEFT JOIN checksumtype as contentchecksumtype ON metadata.contentChecksumTypeId == contentchecksumtype.id"
" WHERE phash=?1" );
" WHERE phash=?1" )) {
return sqlFail("prepare _getFileRecordQuery", *_getFileRecordQuery);
}
_setFileRecordQuery.reset(new SqlQuery(_db) );
_setFileRecordQuery->prepare("INSERT OR REPLACE INTO metadata "
if (_setFileRecordQuery->prepare("INSERT OR REPLACE INTO metadata "
"(phash, pathlen, path, inode, uid, gid, mode, modtime, type, md5, fileid, remotePerm, filesize, ignoredChildrenRemote, contentChecksum, contentChecksumTypeId) "
"VALUES (?1 , ?2, ?3 , ?4 , ?5 , ?6 , ?7, ?8 , ?9 , ?10, ?11, ?12, ?13, ?14, ?15, ?16);" );
"VALUES (?1 , ?2, ?3 , ?4 , ?5 , ?6 , ?7, ?8 , ?9 , ?10, ?11, ?12, ?13, ?14, ?15, ?16);" )) {
return sqlFail("prepare _setFileRecordQuery", *_setFileRecordQuery);
}
_setFileRecordChecksumQuery.reset(new SqlQuery(_db) );
_setFileRecordChecksumQuery->prepare(
if (_setFileRecordChecksumQuery->prepare(
"UPDATE metadata"
" SET contentChecksum = ?2, contentChecksumTypeId = ?3"
" WHERE phash == ?1;");
" WHERE phash == ?1;")) {
return sqlFail("prepare _setFileRecordChecksumQuery", *_setFileRecordChecksumQuery);
}
_setFileRecordLocalMetadataQuery.reset(new SqlQuery(_db));
_setFileRecordLocalMetadataQuery->prepare(
if (_setFileRecordLocalMetadataQuery->prepare(
"UPDATE metadata"
" SET inode=?2, modtime=?3, filesize=?4"
" WHERE phash == ?1;");
" WHERE phash == ?1;")) {
return sqlFail("prepare _setFileRecordLocalMetadataQuery", *_setFileRecordLocalMetadataQuery);
}
_getDownloadInfoQuery.reset(new SqlQuery(_db) );
_getDownloadInfoQuery->prepare( "SELECT tmpfile, etag, errorcount FROM "
"downloadinfo WHERE path=?1" );
if (_getDownloadInfoQuery->prepare( "SELECT tmpfile, etag, errorcount FROM "
"downloadinfo WHERE path=?1" )) {
return sqlFail("prepare _getDownloadInfoQuery", *_getDownloadInfoQuery);
}
_setDownloadInfoQuery.reset(new SqlQuery(_db) );
_setDownloadInfoQuery->prepare( "INSERT OR REPLACE INTO downloadinfo "
if (_setDownloadInfoQuery->prepare( "INSERT OR REPLACE INTO downloadinfo "
"(path, tmpfile, etag, errorcount) "
"VALUES ( ?1 , ?2, ?3, ?4 )" );
"VALUES ( ?1 , ?2, ?3, ?4 )" )) {
return sqlFail("prepare _setDownloadInfoQuery", *_setDownloadInfoQuery);
}
_deleteDownloadInfoQuery.reset(new SqlQuery(_db) );
_deleteDownloadInfoQuery->prepare( "DELETE FROM downloadinfo WHERE path=?1" );
if (_deleteDownloadInfoQuery->prepare( "DELETE FROM downloadinfo WHERE path=?1" )) {
return sqlFail("prepare _deleteDownloadInfoQuery", *_deleteDownloadInfoQuery);
}
_getUploadInfoQuery.reset(new SqlQuery(_db));
_getUploadInfoQuery->prepare( "SELECT chunk, transferid, errorcount, size, modtime FROM "
"uploadinfo WHERE path=?1" );
if (_getUploadInfoQuery->prepare( "SELECT chunk, transferid, errorcount, size, modtime FROM "
"uploadinfo WHERE path=?1" )) {
return sqlFail("prepare _getUploadInfoQuery", *_getUploadInfoQuery);
}
_setUploadInfoQuery.reset(new SqlQuery(_db));
_setUploadInfoQuery->prepare( "INSERT OR REPLACE INTO uploadinfo "
if (_setUploadInfoQuery->prepare( "INSERT OR REPLACE INTO uploadinfo "
"(path, chunk, transferid, errorcount, size, modtime) "
"VALUES ( ?1 , ?2, ?3 , ?4 , ?5, ?6 )");
"VALUES ( ?1 , ?2, ?3 , ?4 , ?5, ?6 )")) {
return sqlFail("prepare _setUploadInfoQuery", *_setUploadInfoQuery);
}
_deleteUploadInfoQuery.reset(new SqlQuery(_db));
_deleteUploadInfoQuery->prepare("DELETE FROM uploadinfo WHERE path=?1" );
if (_deleteUploadInfoQuery->prepare("DELETE FROM uploadinfo WHERE path=?1" )) {
return sqlFail("prepare _deleteUploadInfoQuery", *_deleteUploadInfoQuery);
}
_deleteFileRecordPhash.reset(new SqlQuery(_db));
_deleteFileRecordPhash->prepare("DELETE FROM metadata WHERE phash=?1");
if (_deleteFileRecordPhash->prepare("DELETE FROM metadata WHERE phash=?1")) {
return sqlFail("prepare _deleteFileRecordPhash", *_deleteFileRecordPhash);
}
_deleteFileRecordRecursively.reset(new SqlQuery(_db));
_deleteFileRecordRecursively->prepare("DELETE FROM metadata WHERE path LIKE(?||'/%')");
if (_deleteFileRecordRecursively->prepare("DELETE FROM metadata WHERE path LIKE(?||'/%')")) {
return sqlFail("prepare _deleteFileRecordRecursively", *_deleteFileRecordRecursively);
}
QString sql( "SELECT lastTryEtag, lastTryModtime, retrycount, errorstring, lastTryTime, ignoreDuration, renameTarget "
"FROM blacklist WHERE path=?1");
@@ -430,32 +465,50 @@ bool SyncJournalDb::checkConnect()
sql += QLatin1String(" COLLATE NOCASE");
}
_getErrorBlacklistQuery.reset(new SqlQuery(_db));
_getErrorBlacklistQuery->prepare(sql);
if (_getErrorBlacklistQuery->prepare(sql)) {
return sqlFail("prepare _getErrorBlacklistQuery", *_getErrorBlacklistQuery);
}
_setErrorBlacklistQuery.reset(new SqlQuery(_db));
_setErrorBlacklistQuery->prepare("INSERT OR REPLACE INTO blacklist "
if (_setErrorBlacklistQuery->prepare("INSERT OR REPLACE INTO blacklist "
"(path, lastTryEtag, lastTryModtime, retrycount, errorstring, lastTryTime, ignoreDuration, renameTarget) "
"VALUES ( ?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8)");
"VALUES ( ?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8)")) {
return sqlFail("prepare _setErrorBlacklistQuery", *_setErrorBlacklistQuery);
}
_getSelectiveSyncListQuery.reset(new SqlQuery(_db));
_getSelectiveSyncListQuery->prepare("SELECT path FROM selectivesync WHERE type=?1");
if (_getSelectiveSyncListQuery->prepare("SELECT path FROM selectivesync WHERE type=?1")) {
return sqlFail("prepare _getSelectiveSyncListQuery", *_getSelectiveSyncListQuery);
}
_getChecksumTypeIdQuery.reset(new SqlQuery(_db));
_getChecksumTypeIdQuery->prepare("SELECT id FROM checksumtype WHERE name=?1");
if (_getChecksumTypeIdQuery->prepare("SELECT id FROM checksumtype WHERE name=?1")) {
return sqlFail("prepare _getChecksumTypeIdQuery", *_getChecksumTypeIdQuery);
}
_getChecksumTypeQuery.reset(new SqlQuery(_db));
_getChecksumTypeQuery->prepare("SELECT name FROM checksumtype WHERE id=?1");
if (_getChecksumTypeQuery->prepare("SELECT name FROM checksumtype WHERE id=?1")) {
return sqlFail("prepare _getChecksumTypeQuery", *_getChecksumTypeQuery);
}
_insertChecksumTypeQuery.reset(new SqlQuery(_db));
_insertChecksumTypeQuery->prepare("INSERT OR IGNORE INTO checksumtype (name) VALUES (?1)");
if (_insertChecksumTypeQuery->prepare("INSERT OR IGNORE INTO checksumtype (name) VALUES (?1)")) {
return sqlFail("prepare _insertChecksumTypeQuery", *_insertChecksumTypeQuery);
}
_getDataFingerprintQuery.reset(new SqlQuery(_db));
_getDataFingerprintQuery->prepare("SELECT fingerprint FROM datafingerprint");
if (_getDataFingerprintQuery->prepare("SELECT fingerprint FROM datafingerprint")) {
return sqlFail("prepare _getDataFingerprintQuery", *_getDataFingerprintQuery);
}
_setDataFingerprintQuery1.reset(new SqlQuery(_db));
_setDataFingerprintQuery1->prepare("DELETE FROM datafingerprint;");
if (_setDataFingerprintQuery1->prepare("DELETE FROM datafingerprint;")) {
return sqlFail("prepare _setDataFingerprintQuery1", *_setDataFingerprintQuery1);
}
_setDataFingerprintQuery2.reset(new SqlQuery(_db));
_setDataFingerprintQuery2->prepare("INSERT INTO datafingerprint (fingerprint) VALUES (?1);");
if (_setDataFingerprintQuery2->prepare("INSERT INTO datafingerprint (fingerprint) VALUES (?1);")) {
return sqlFail("prepare _setDataFingerprintQuery2", *_setDataFingerprintQuery2);
}
// don't start a new transaction now
commitInternal(QString("checkConnect End"), false);
+22 -7
Ver Arquivo
@@ -115,11 +115,11 @@ QIcon Theme::trayFolderIcon( const QString& backend ) const
* helper to load a icon from either the icon theme the desktop provides or from
* the apps Qt resources.
*/
QIcon Theme::themeIcon( const QString& name, bool sysTray ) const
QIcon Theme::themeIcon( const QString& name, bool sysTray, bool sysTrayMenuVisible ) const
{
QString flavor;
if (sysTray) {
flavor = systrayIconFlavor(_mono);
flavor = systrayIconFlavor(_mono, sysTrayMenuVisible);
} else {
flavor = QLatin1String("colored");
}
@@ -158,6 +158,14 @@ QIcon Theme::themeIcon( const QString& name, bool sysTray ) const
}
}
#ifdef Q_OS_MAC
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
// This defines the icon as a template and enables automatic macOS color handling
// See https://bugreports.qt.io/browse/QTBUG-42109
cached.setIsMask(_mono && sysTray && !sysTrayMenuVisible);
#endif
#endif
return cached;
}
@@ -227,11 +235,18 @@ QString Theme::defaultClientFolder() const
return appName();
}
QString Theme::systrayIconFlavor(bool mono) const
QString Theme::systrayIconFlavor(bool mono, bool sysTrayMenuVisible ) const
{
Q_UNUSED(sysTrayMenuVisible)
QString flavor;
if (mono) {
flavor = Utility::hasDarkSystray() ? QLatin1String("white") : QLatin1String("black");
#ifdef Q_OS_MAC
if (sysTrayMenuVisible) {
flavor = QLatin1String("white");
}
#endif
} else {
flavor = QLatin1String("colored");
}
@@ -331,7 +346,7 @@ QVariant Theme::customMedia( CustomMediaType type )
return re;
}
QIcon Theme::syncStateIcon( SyncResult::Status status, bool sysTray ) const
QIcon Theme::syncStateIcon( SyncResult::Status status, bool sysTray, bool sysTrayMenuVisible ) const
{
// FIXME: Mind the size!
QString statusIcon;
@@ -363,7 +378,7 @@ QIcon Theme::syncStateIcon( SyncResult::Status status, bool sysTray ) const
statusIcon = QLatin1String("state-error");
}
return themeIcon( statusIcon, sysTray );
return themeIcon( statusIcon, sysTray, sysTrayMenuVisible );
}
QIcon Theme::folderDisabledIcon( ) const
@@ -371,9 +386,9 @@ QIcon Theme::folderDisabledIcon( ) const
return themeIcon( QLatin1String("state-pause") );
}
QIcon Theme::folderOfflineIcon(bool systray) const
QIcon Theme::folderOfflineIcon(bool sysTray, bool sysTrayMenuVisible ) const
{
return themeIcon( QLatin1String("state-offline"), systray );
return themeIcon( QLatin1String("state-offline"), sysTray, sysTrayMenuVisible );
}
QColor Theme::wizardHeaderTitleColor() const
+4 -4
Ver Arquivo
@@ -97,10 +97,10 @@ public:
/**
* get an sync state icon
*/
virtual QIcon syncStateIcon( SyncResult::Status, bool sysTray = false ) const;
virtual QIcon syncStateIcon( SyncResult::Status, bool sysTray = false, bool sysTrayMenuVisible = false) const;
virtual QIcon folderDisabledIcon() const;
virtual QIcon folderOfflineIcon(bool systray = false) const;
virtual QIcon folderOfflineIcon(bool sysTray = false, bool sysTrayMenuVisible = false) const;
virtual QIcon applicationIcon() const = 0;
#endif
@@ -152,7 +152,7 @@ public:
virtual QString enforcedLocale() const { return QString::null; }
/** colored, white or black */
QString systrayIconFlavor(bool mono) const;
QString systrayIconFlavor(bool mono, bool sysTrayMenuVisible = false) const;
#ifndef TOKEN_AUTH_ONLY
/**
@@ -304,7 +304,7 @@ public:
protected:
#ifndef TOKEN_AUTH_ONLY
QIcon themeIcon(const QString& name, bool sysTray = false) const;
QIcon themeIcon(const QString& name, bool sysTray = false, bool sysTrayMenuVisible = false) const;
#endif
Theme();
+2
Ver Arquivo
@@ -27,7 +27,9 @@ ENDIF()
owncloud_add_test(FolderWatcher "${FolderWatcher_SRC}")
if( UNIX AND NOT APPLE )
if(HAVE_QT5 AND NOT BUILD_WITH_QT4)
owncloud_add_test(InotifyWatcher "${FolderWatcher_SRC}")
endif(HAVE_QT5 AND NOT BUILD_WITH_QT4)
endif(UNIX AND NOT APPLE)
owncloud_add_test(CSyncSqlite "")
+36 -2
Ver Arquivo
@@ -28,6 +28,7 @@ inline QByteArray generateFileId() {
class PathComponents : public QStringList {
public:
PathComponents(const char *path) : PathComponents{QString::fromUtf8(path)} {}
PathComponents(const QString &path) : QStringList{path.split('/', QString::SkipEmptyParts)} { }
PathComponents(const QStringList &pathComponents) : QStringList{pathComponents} { }
@@ -90,8 +91,9 @@ public:
void mkdir(const QString &relativePath) override {
_rootDir.mkpath(relativePath);
}
void rename(const QString &, const QString &) override {
Q_ASSERT(!"not implemented");
void rename(const QString &from, const QString &to) override {
QVERIFY(_rootDir.exists(from));
QVERIFY(_rootDir.rename(from, to));
}
};
@@ -457,6 +459,36 @@ public:
qint64 readData(char *, qint64) override { return 0; }
};
class FakeMoveReply : public QNetworkReply
{
Q_OBJECT
public:
FakeMoveReply(FileInfo &remoteRootFileInfo, QNetworkAccessManager::Operation op, const QNetworkRequest &request, QObject *parent)
: QNetworkReply{parent} {
setRequest(request);
setUrl(request.url());
setOperation(op);
open(QIODevice::ReadOnly);
Q_ASSERT(request.url().path().startsWith(sRootUrl.path()));
QString fileName = request.url().path().mid(sRootUrl.path().length());
QString destPath = request.rawHeader("Destination");
Q_ASSERT(destPath.startsWith(sRootUrl.path()));
QString dest = destPath.mid(sRootUrl.path().length());
remoteRootFileInfo.rename(fileName, dest);
QMetaObject::invokeMethod(this, "respond", Qt::QueuedConnection);
}
Q_INVOKABLE void respond() {
setAttribute(QNetworkRequest::HttpStatusCodeAttribute, 201);
emit metaDataChanged();
emit finished();
}
void abort() override { }
qint64 readData(char *, qint64) override { return 0; }
};
class FakeGetReply : public QNetworkReply
{
Q_OBJECT
@@ -552,6 +584,8 @@ protected:
return new FakeMkcolReply{_remoteRootFileInfo, op, request, this};
else if (verb == QLatin1String("DELETE"))
return new FakeDeleteReply{_remoteRootFileInfo, op, request, this};
else if (verb == QLatin1String("MOVE"))
return new FakeMoveReply{_remoteRootFileInfo, op, request, this};
else {
qDebug() << verb << outgoingData;
Q_UNREACHABLE();
+2
Ver Arquivo
@@ -15,6 +15,7 @@
#include "folderman.h"
#include "account.h"
#include "accountstate.h"
#include "configfile.h"
using namespace OCC;
@@ -39,6 +40,7 @@ private slots:
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0)
QTemporaryDir dir;
ConfigFile::setConfDir(dir.path()); // we don't want to pollute the user's config file
QVERIFY(dir.isValid());
QDir dir2(dir.path());
QVERIFY(dir2.mkpath("sub/ownCloud1/folder/f"));
+69 -2
Ver Arquivo
@@ -7,6 +7,7 @@
#include <QtTest>
#include "syncenginetestutils.h"
#include <syncengine.h>
using namespace OCC;
@@ -137,8 +138,8 @@ private slots:
fakeFolder.syncOnce();
QCOMPARE(fakeFolder.currentLocalState(), fakeFolder.currentRemoteState());
auto oldState = fakeFolder.currentLocalState();
QVERIFY(oldState.find(PathComponents("folder/folderB/folderA/file.txt")));
QVERIFY(!oldState.find(PathComponents("folder/folderA/file.txt")));
QVERIFY(oldState.find("folder/folderB/folderA/file.txt"));
QVERIFY(!oldState.find("folder/folderA/file.txt"));
// This sync should not remove the file
fakeFolder.syncOnce();
@@ -146,6 +147,72 @@ private slots:
QCOMPARE(fakeFolder.currentLocalState(), oldState);
}
void testSelectiveSyncModevFolder() {
// issue #5224
FakeFolder fakeFolder{FileInfo{ QString(), {
FileInfo { QStringLiteral("parentFolder"), {
FileInfo{ QStringLiteral("subFolderA"), { { QStringLiteral("fileA.txt"), 400 } } },
FileInfo{ QStringLiteral("subFolderB"), { { QStringLiteral("fileB.txt"), 400 } } }
}
}}}};
QCOMPARE(fakeFolder.currentLocalState(), fakeFolder.currentRemoteState());
auto expectedServerState = fakeFolder.currentRemoteState();
// Remove subFolderA with selectiveSync:
fakeFolder.syncEngine().journal()->setSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList,
{"parentFolder/subFolderA/"});
fakeFolder.syncEngine().journal()->avoidReadFromDbOnNextSync("parentFolder/subFolderA/");
fakeFolder.syncOnce();
{
// Nothing changed on the server
QCOMPARE(fakeFolder.currentRemoteState(), expectedServerState);
// The local state should not have subFolderA
auto remoteState = fakeFolder.currentRemoteState();
remoteState.remove("parentFolder/subFolderA");
QCOMPARE(fakeFolder.currentLocalState(), remoteState);
}
// Rename parentFolder on the server
fakeFolder.remoteModifier().rename("parentFolder", "parentFolderRenamed");
expectedServerState = fakeFolder.currentRemoteState();
fakeFolder.syncOnce();
{
QCOMPARE(fakeFolder.currentRemoteState(), expectedServerState);
auto remoteState = fakeFolder.currentRemoteState();
// The subFolderA should still be there on the server.
QVERIFY(remoteState.find("parentFolderRenamed/subFolderA/fileA.txt"));
// But not on the client because of the selective sync
remoteState.remove("parentFolderRenamed/subFolderA");
QCOMPARE(fakeFolder.currentLocalState(), remoteState);
}
// Rename it again, locally this time.
fakeFolder.localModifier().rename("parentFolderRenamed", "parentThirdName");
fakeFolder.syncOnce();
{
auto remoteState = fakeFolder.currentRemoteState();
// The subFolderA should still be there on the server.
QVERIFY(remoteState.find("parentThirdName/subFolderA/fileA.txt"));
// But not on the client because of the selective sync
remoteState.remove("parentThirdName/subFolderA");
QCOMPARE(fakeFolder.currentLocalState(), remoteState);
expectedServerState = fakeFolder.currentRemoteState();
QSignalSpy completeSpy(&fakeFolder.syncEngine(), SIGNAL(itemCompleted(const SyncFileItem &, const PropagatorJob &)));
fakeFolder.syncOnce(); // This sync should do nothing
QCOMPARE(completeSpy.count(), 0);
QCOMPARE(fakeFolder.currentRemoteState(), expectedServerState);
QCOMPARE(fakeFolder.currentLocalState(), remoteState);
}
}
};
QTEST_GUILESS_MAIN(TestSyncEngine)
+18 -18
Ver Arquivo
@@ -724,7 +724,7 @@ Continuing the sync as normal will cause all your files to be overwritten by an
<message>
<location filename="../src/gui/folder.cpp" line="1006"/>
<source>Backup detected</source>
<translation type="unfinished"/>
<translation>Copia de seguretat detectada</translation>
</message>
<message>
<location filename="../src/gui/folder.cpp" line="1008"/>
@@ -734,7 +734,7 @@ Continuing the sync as normal will cause all your files to be overwritten by an
<message>
<location filename="../src/gui/folder.cpp" line="1009"/>
<source>Keep Local Files as Conflict</source>
<translation type="unfinished"/>
<translation>Manté els fitxers locals com a conflicte</translation>
</message>
</context>
<context>
@@ -817,7 +817,7 @@ Continuing the sync as normal will cause all your files to be overwritten by an
<message>
<location filename="../src/gui/folderman.cpp" line="1190"/>
<source>The selected path is not a folder!</source>
<translation type="unfinished"/>
<translation>La ruta seleccionada no és un directori!</translation>
</message>
<message>
<location filename="../src/gui/folderman.cpp" line="1194"/>
@@ -904,7 +904,7 @@ Continuing the sync as normal will cause all your files to be overwritten by an
<message>
<location filename="../src/gui/folderstatusmodel.cpp" line="170"/>
<source>Fetching folder list from server...</source>
<translation type="unfinished"/>
<translation>Obtenint la llista de carpetes del servidor...</translation>
</message>
<message>
<location filename="../src/gui/folderstatusmodel.cpp" line="841"/>
@@ -1006,7 +1006,7 @@ Continuing the sync as normal will cause all your files to be overwritten by an
<message>
<location filename="../src/gui/folderwizard.cpp" line="544"/>
<source>Add Sync Connection</source>
<translation type="unfinished"/>
<translation>Afegir una connexió de sincronització</translation>
</message>
</context>
<context>
@@ -1521,7 +1521,7 @@ Els elements que poden ser eliminats s&apos;eliminaran si impedeixen que una car
<message>
<location filename="../src/gui/notificationwidget.cpp" line="50"/>
<source>Created at %1</source>
<translation type="unfinished"/>
<translation>Creat el %1</translation>
</message>
<message>
<location filename="../src/gui/notificationwidget.cpp" line="99"/>
@@ -1626,12 +1626,12 @@ privilegis addicionals durant el procés.</translation>
<message>
<location filename="../src/gui/wizard/owncloudadvancedsetuppage.cpp" line="142"/>
<source>Sync the folder &apos;%1&apos;</source>
<translation type="unfinished"/>
<translation>Sincronitzar el directori &apos;%1&apos;</translation>
</message>
<message>
<location filename="../src/gui/wizard/owncloudadvancedsetuppage.cpp" line="147"/>
<source>&lt;p&gt;&lt;small&gt;&lt;strong&gt;Warning:&lt;/strong&gt; The local folder is not empty. Pick a resolution!&lt;/small&gt;&lt;/p&gt;</source>
<translation type="unfinished"/>
<translation>&lt;p&gt;&lt;small&gt;&lt;strong&gt;Atenció:&lt;/strong&gt; La carpeta local no està buida. Trieu una resolució!&lt;/small&gt;&lt;/p&gt;</translation>
</message>
<message>
<location filename="../src/gui/wizard/owncloudadvancedsetuppage.cpp" line="246"/>
@@ -1741,7 +1741,7 @@ No és aconsellada usar-la.</translation>
<message>
<location filename="../src/gui/owncloudsetupwizard.cpp" line="181"/>
<source>Timeout while trying to connect to %1 at %2.</source>
<translation type="unfinished"/>
<translation>S&apos;ha esgotat el temps d&apos;espera mentres es conectava a %1 a les %2.</translation>
</message>
<message>
<location filename="../src/gui/owncloudsetupwizard.cpp" line="192"/>
@@ -1931,12 +1931,12 @@ No és aconsellada usar-la.</translation>
<message>
<location filename="../src/libsync/propagatedownload.cpp" line="376"/>
<source>The download would reduce free disk space below %1</source>
<translation type="unfinished"/>
<translation>La descàrrega reduïrà l&apos;espai lliure al disc per sota de %1</translation>
</message>
<message>
<location filename="../src/libsync/propagatedownload.cpp" line="381"/>
<source>Free space on disk is less than %1</source>
<translation type="unfinished"/>
<translation>L&apos;espai lliure del disc dur es inferior a %1</translation>
</message>
<message>
<location filename="../src/libsync/propagatedownload.cpp" line="496"/>
@@ -1946,7 +1946,7 @@ No és aconsellada usar-la.</translation>
<message>
<location filename="../src/libsync/propagatedownload.cpp" line="545"/>
<source>The file could not be downloaded completely.</source>
<translation type="unfinished"/>
<translation>No es pot descarregar el fitxer completament.</translation>
</message>
<message>
<location filename="../src/libsync/propagatedownload.cpp" line="552"/>
@@ -2363,7 +2363,7 @@ No és aconsellada usar-la.</translation>
<message>
<location filename="../src/gui/sharedialog.cpp" line="98"/>
<source>%1 Sharing</source>
<translation type="unfinished"/>
<translation>Compartint amb %1</translation>
</message>
<message>
<location filename="../src/gui/sharedialog.cpp" line="73"/>
@@ -2378,7 +2378,7 @@ No és aconsellada usar-la.</translation>
<message>
<location filename="../src/gui/sharedialog.cpp" line="101"/>
<source>The server does not allow sharing</source>
<translation type="unfinished"/>
<translation>El servidor no permet la compartició de fitxers</translation>
</message>
<message>
<location filename="../src/gui/sharedialog.cpp" line="113"/>
@@ -3048,7 +3048,7 @@ No és aconsellada usar-la.</translation>
<message>
<location filename="../src/gui/synclogdialog.ui" line="14"/>
<source>Synchronisation Log</source>
<translation type="unfinished"/>
<translation>Registre de sincronització</translation>
</message>
</context>
<context>
@@ -3069,7 +3069,7 @@ No és aconsellada usar-la.</translation>
<message>
<location filename="../src/libsync/theme.cpp" line="289"/>
<source>&lt;p&gt;Copyright ownCloud GmbH&lt;/p&gt;</source>
<translation type="unfinished"/>
<translation>&lt;p&gt;Copyright ownCloud GmbH&lt;/p&gt;</translation>
</message>
<message>
<location filename="../src/libsync/theme.cpp" line="290"/>
@@ -3215,7 +3215,7 @@ No és aconsellada usar-la.</translation>
<message>
<location filename="../src/gui/owncloudgui.cpp" line="296"/>
<source>Account synchronization is disabled</source>
<translation type="unfinished"/>
<translation>La sincronització del compte està deshabilitada</translation>
</message>
<message>
<location filename="../src/gui/owncloudgui.cpp" line="379"/>
@@ -3642,7 +3642,7 @@ No és aconsellada usar-la.</translation>
<message>
<location filename="../src/libsync/progressdispatcher.cpp" line="37"/>
<source>Server version downloaded, copied changed local file into conflict file</source>
<translation type="unfinished"/>
<translation>S&apos;ha baixat la versió del servidor i s&apos;ha renomenat el fitxer local com a fitxer de conflicte</translation>
</message>
<message>
<location filename="../src/libsync/progressdispatcher.cpp" line="39"/>
+2 -2
Ver Arquivo
@@ -3071,7 +3071,7 @@ Il est déconseillé de l&apos;utiliser.</translation>
<message>
<location filename="../src/libsync/theme.cpp" line="289"/>
<source>&lt;p&gt;Copyright ownCloud GmbH&lt;/p&gt;</source>
<translation type="unfinished"/>
<translation>&lt;p&gt;Copyright ownCloud, Inc.&lt;/p&gt;</translation>
</message>
<message>
<location filename="../src/libsync/theme.cpp" line="290"/>
@@ -3296,7 +3296,7 @@ Il est déconseillé de l&apos;utiliser.</translation>
<message>
<location filename="../src/libsync/owncloudtheme.cpp" line="47"/>
<source>&lt;p&gt;Version %2. For more information visit &lt;a href=&quot;%3&quot;&gt;%4&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.&lt;/small&gt;&lt;/p&gt;&lt;p&gt;Copyright ownCloud GmbH&lt;/p&gt;&lt;p&gt;Licensed under the GNU General Public License (GPL) Version 2.0&lt;br/&gt;ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.&lt;/p&gt;</source>
<translation type="unfinished"/>
<translation>&lt;p&gt;Version %2. Pour plus d&apos;informations, consultez &lt;a href=&quot;%3&quot;&gt;%4&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;Par Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz et autres.&lt;/small&gt;&lt;/p&gt;&lt;p&gt;Copyright ownCloud GmbH&lt;/p&gt;&lt;p&gt;Sous licence GNU General Public License (GPL) Version 2.0&lt;br/&gt;ownCloud et le logo ownCloud sont des marques déposées de ownCloud, Inc. aux Etats-Unis, dans d&apos;autres pays, ou dans les deux.&lt;/p&gt;</translation>
</message>
</context>
<context>
+1 -1
Ver Arquivo
@@ -3601,7 +3601,7 @@ We adviseren deze site niet te gebruiken.</translation>
<message numerus="yes">
<location filename="../src/libsync/utility.cpp" line="324"/>
<source>%n second(s)</source>
<translation><numerusform>%n seconde</numerusform><numerusform>%n seconden</numerusform></translation>
<translation><numerusform>%n seconde</numerusform><numerusform>%n seconde(n)</numerusform></translation>
</message>
<message>
<location filename="../src/libsync/utility.cpp" line="348"/>
+13 -13
Ver Arquivo
@@ -631,17 +631,17 @@
<message numerus="yes">
<location filename="../src/gui/folder.cpp" line="489"/>
<source>%1 and %n other file(s) have been removed.</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
<translation><numerusform>%1 i %n inny plik został usunięty.</numerusform><numerusform>%1 i %n inne pliki zostały usunięte.</numerusform><numerusform>%1 i %n innych plików zostało usuniętych.</numerusform></translation>
</message>
<message numerus="yes">
<location filename="../src/gui/folder.cpp" line="496"/>
<source>%1 and %n other file(s) have been downloaded.</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
<translation><numerusform>%1 i %n inny plik został pobrany.</numerusform><numerusform>%1 i %n inne pliki zostały pobrane.</numerusform><numerusform>%1 i %n innych plików zostało pobranych.</numerusform></translation>
</message>
<message numerus="yes">
<location filename="../src/gui/folder.cpp" line="503"/>
<source>%1 and %n other file(s) have been updated.</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
<translation><numerusform>%1 i %n inny plik został zaktualizowany.</numerusform><numerusform>%1 i %n inne pliki zostały zaktualizowane.</numerusform><numerusform>%1 i %n innych plików zostało zaktualizowanych.</numerusform></translation>
</message>
<message numerus="yes">
<location filename="../src/gui/folder.cpp" line="510"/>
@@ -1156,7 +1156,7 @@ Jeśli kontynuujesz synchronizację, pliki zostaną nadpisane przez swój pierwo
<message>
<location filename="../src/gui/generalsettings.ui" line="26"/>
<source>&amp;Launch on System Startup</source>
<translation>&amp;Uruchamiaj podczas startu systemu Windows</translation>
<translation>&amp;Uruchamiaj podczas startu systemu</translation>
</message>
<message>
<location filename="../src/gui/generalsettings.ui" line="33"/>
@@ -1933,7 +1933,7 @@ Niezalecane jest jego użycie.</translation>
<message>
<location filename="../src/libsync/propagatedownload.cpp" line="376"/>
<source>The download would reduce free disk space below %1</source>
<translation type="unfinished"/>
<translation>Pobranie zmniejszy ilość wolnego miejsca poniżej %1.</translation>
</message>
<message>
<location filename="../src/libsync/propagatedownload.cpp" line="381"/>
@@ -3523,12 +3523,12 @@ Kliknij</translation>
<message numerus="yes">
<location filename="../src/libsync/utility.cpp" line="469"/>
<source>%n day(s) ago</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
<translation><numerusform>%n dzień temu</numerusform><numerusform>%n dni temu</numerusform><numerusform>%n dni temu</numerusform></translation>
</message>
<message numerus="yes">
<location filename="../src/libsync/utility.cpp" line="477"/>
<source>%n hour(s) ago</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
<translation><numerusform>%n godzinę temu</numerusform><numerusform>%n godziny temu</numerusform><numerusform>%n godzin temu</numerusform></translation>
</message>
<message>
<location filename="../src/libsync/utility.cpp" line="482"/>
@@ -3543,7 +3543,7 @@ Kliknij</translation>
<message numerus="yes">
<location filename="../src/libsync/utility.cpp" line="487"/>
<source>%n minute(s) ago</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
<translation><numerusform>%n minutę temu</numerusform><numerusform>%n minuty temu</numerusform><numerusform>%n minut temu</numerusform></translation>
</message>
<message>
<location filename="../src/libsync/utility.cpp" line="490"/>
@@ -3576,27 +3576,27 @@ Kliknij</translation>
<message numerus="yes">
<location filename="../src/libsync/utility.cpp" line="319"/>
<source>%n year(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
<translation><numerusform>%n rok</numerusform><numerusform>%n lata</numerusform><numerusform>%n lat</numerusform></translation>
</message>
<message numerus="yes">
<location filename="../src/libsync/utility.cpp" line="320"/>
<source>%n month(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
<translation><numerusform>%n miesiąc</numerusform><numerusform>%n miesiące</numerusform><numerusform>%n miesięcy</numerusform></translation>
</message>
<message numerus="yes">
<location filename="../src/libsync/utility.cpp" line="321"/>
<source>%n day(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
<translation><numerusform>%n dzień</numerusform><numerusform>%n dni</numerusform><numerusform>%n dni</numerusform></translation>
</message>
<message numerus="yes">
<location filename="../src/libsync/utility.cpp" line="322"/>
<source>%n hour(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
<translation><numerusform>%n godzina</numerusform><numerusform>%n godziny</numerusform><numerusform>%n godzin</numerusform></translation>
</message>
<message numerus="yes">
<location filename="../src/libsync/utility.cpp" line="323"/>
<source>%n minute(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
<translation><numerusform>%n minuta</numerusform><numerusform>%n minuty</numerusform><numerusform>%n minut</numerusform></translation>
</message>
<message numerus="yes">
<location filename="../src/libsync/utility.cpp" line="324"/>
+1 -1
Ver Arquivo
@@ -264,7 +264,7 @@
<message>
<location filename="../src/gui/accountsettings.cpp" line="346"/>
<source>&lt;p&gt;Do you really want to stop syncing the folder &lt;i&gt;%1&lt;/i&gt;?&lt;/p&gt;&lt;p&gt;&lt;b&gt;Note:&lt;/b&gt; This will &lt;b&gt;not&lt;/b&gt; delete any files.&lt;/p&gt;</source>
<translation>&lt;p&gt;Deseja mesmo parar a sincronização da pasta &lt;i&gt;%1&lt;/i&gt;?&lt;/p&gt;&lt;p&gt;&lt;b&gt;Nota:&lt;/b&gt; isto &lt;b&gt;não&lt;/b&gt; irá eliminar quaisquer ficheiros.&lt;/p&gt;</translation>
<translation>&lt;p&gt;Deseja mesmo parar a sincronização da pasta &lt;i&gt;%1&lt;/i&gt;?&lt;/p&gt;&lt;p&gt;&lt;b&gt;Nota:&lt;/b&gt; isto &lt;b&gt;não&lt;/b&gt; irá eliminar qualquer ficheiro.&lt;/p&gt;</translation>
</message>
<message>
<location filename="../src/gui/accountsettings.cpp" line="488"/>
+2 -2
Ver Arquivo
@@ -3070,7 +3070,7 @@ It is not advisable to use it.</source>
<message>
<location filename="../src/libsync/theme.cpp" line="289"/>
<source>&lt;p&gt;Copyright ownCloud GmbH&lt;/p&gt;</source>
<translation type="unfinished"/>
<translation>&lt;p&gt;Все права принадлежат ownCloud GmbH&lt;/p&gt;</translation>
</message>
<message>
<location filename="../src/libsync/theme.cpp" line="290"/>
@@ -3295,7 +3295,7 @@ It is not advisable to use it.</source>
<message>
<location filename="../src/libsync/owncloudtheme.cpp" line="47"/>
<source>&lt;p&gt;Version %2. For more information visit &lt;a href=&quot;%3&quot;&gt;%4&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;By Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz and others.&lt;/small&gt;&lt;/p&gt;&lt;p&gt;Copyright ownCloud GmbH&lt;/p&gt;&lt;p&gt;Licensed under the GNU General Public License (GPL) Version 2.0&lt;br/&gt;ownCloud and the ownCloud Logo are registered trademarks of ownCloud, Inc. in the United States, other countries, or both.&lt;/p&gt;</source>
<translation type="unfinished"/>
<translation>&lt;p&gt;Версия %2. Дополнительная информация доступна по ссылке &lt;a href=&quot;%3&quot;&gt;%4&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;Авторы: Klaas Freitag, Daniel Molkentin, Jan-Christoph Borchardt, Olivier Goffart, Markus Götz, и другие.&lt;/small&gt;&lt;/p&gt;&lt;p&gt;Авторские права принадлежат ownCloud GmbH&lt;/p&gt;&lt;p&gt;Лицензировано под GNU General Public License (GPL) Версии 2.0&lt;br/&gt;ownCloud и логотип ownCloud - зарегистрированные торговые марки ownCloud, Inc. в Соединенных Штатах, и/или других странах&lt;/p&gt;</translation>
</message>
</context>
<context>
+1 -1
Ver Arquivo
@@ -2550,7 +2550,7 @@ It is not advisable to use it.</source>
<message>
<location filename="../src/gui/creds/shibboleth/shibbolethwebview.cpp" line="91"/>
<source>SSL Chipher Debug View</source>
<translation type="unfinished"/>
<translation>SSL加密调试信息</translation>
</message>
<message>
<location filename="../src/gui/creds/shibboleth/shibbolethwebview.cpp" line="99"/>