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
100 arquivos alterados com 8014 adições e 9083 exclusões
+3 -6
Ver Arquivo
@@ -9,12 +9,11 @@ version 2.0.0 (release 2015-08-??)
* 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)
@@ -22,13 +21,11 @@ version 2.0.0 (release 2015-08-??)
* 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)
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)
* Reduce 'Connection closed' errors (#3318, #3313, #3298)
+1 -1
Ver Arquivo
@@ -4,7 +4,7 @@ set( MIRALL_VERSION_PATCH 0 )
set( MIRALL_SOVERSION 0 )
if ( NOT DEFINED MIRALL_VERSION_SUFFIX )
set( MIRALL_VERSION_SUFFIX "git") #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 "
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;
+41 -39
Ver Arquivo
@@ -191,6 +191,7 @@ CSYNC_EXCLUDE_TYPE csync_excluded_no_ctx(c_strlist_t *excludes, const char *path
const char *p = NULL;
char *bname = NULL;
char *dname = NULL;
char *prev_dname = NULL;
char *conflict = NULL;
int rc = -1;
CSYNC_EXCLUDE_TYPE match = CSYNC_NOT_EXCLUDED;
@@ -303,33 +304,6 @@ CSYNC_EXCLUDE_TYPE csync_excluded_no_ctx(c_strlist_t *excludes, const char *path
goto out;
}
/* split the path into its components */
/* First, count the number of components, ie. /foo/bar/baz/file.txt has four components */
size_t comp_cnt = 1;
int starter = 0;
if( path[0] == '/' ) {
starter = 1; /* in case of trailing slash, skip that one */
}
for( i = starter; i < strlen(path); i++ ) {
if( path[i] == '/' ) {
comp_cnt++;
}
}
/* Fill a string list with the components to the given path
* so far with all the components. */
c_strlist_t *path_components = NULL;
if( comp_cnt > 0 ) {
char *comp_path = c_strdup( path );
path_components = c_strlist_new(comp_cnt);
for (char *token = strtok(comp_path, "/"); token; token = strtok(NULL, "/")) {
c_strlist_add(path_components, c_strdup(token));
}
SAFE_FREE(comp_path);
}
/* Loop over all exclude patterns and evaluate the given path */
for (i = 0; match == CSYNC_NOT_EXCLUDED && i < excludes->count; i++) {
bool match_dirs_only = false;
@@ -365,25 +339,53 @@ CSYNC_EXCLUDE_TYPE csync_excluded_no_ctx(c_strlist_t *excludes, const char *path
match = CSYNC_NOT_EXCLUDED;
}
}
/* if still not excluded, check each component of the path */
if (match == CSYNC_NOT_EXCLUDED) {
size_t stop_at = comp_cnt;
if( match_dirs_only && filetype == CSYNC_FTW_TYPE_FILE ) {
stop_at--; // do not check the trailing component for files
}
/* Loop over every component of the path and check */
for( size_t comp_no = 0; comp_no < stop_at && match == CSYNC_NOT_EXCLUDED; comp_no++ ) {
char *component = path_components->vector[comp_no];
int trailing_component = 1;
dname = c_dirname(path);
bname = c_basename(path);
rc = csync_fnmatch(pattern, component, 0);
if (rc == 0) {
match = type;
}
if (bname == NULL || dname == NULL) {
match = CSYNC_NOT_EXCLUDED;
SAFE_FREE(bname);
SAFE_FREE(dname);
SAFE_FREE(pattern_stored);
goto out;
}
/* Check each component of the path */
do {
/* Do not check the bname if its a file and the pattern matches dirs only. */
if ( !(trailing_component == 1 /* it is the trailing component */
&& match_dirs_only /* but only directories are matched by the pattern */
&& filetype == CSYNC_FTW_TYPE_FILE) ) {
/* Check the name component against the pattern */
rc = csync_fnmatch(pattern, bname, 0);
if (rc == 0) {
match = type;
}
}
if (!(c_streq(dname, ".") || c_streq(dname, "/"))) {
rc = csync_fnmatch(pattern, dname, 0);
if (rc == 0) {
match = type;
}
}
trailing_component = 0;
prev_dname = dname;
SAFE_FREE(bname);
bname = c_basename(prev_dname);
dname = c_dirname(prev_dname);
SAFE_FREE(prev_dname);
} while( match == CSYNC_NOT_EXCLUDED && !c_streq(dname, ".")
&& !c_streq(dname, "/") );
}
SAFE_FREE(pattern_stored);
SAFE_FREE(bname);
SAFE_FREE(dname);
}
c_strlist_destroy(path_components);
out:
+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;
}
}
}
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

-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);
+16 -28
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();
@@ -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 )
@@ -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.
+7 -35
Ver Arquivo
@@ -132,7 +132,7 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
int margin = subFm.height()/4;
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));
@@ -224,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),
@@ -272,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();
@@ -283,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;
@@ -294,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 );
@@ -312,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());
@@ -323,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,
@@ -343,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();
};
+22 -44
Ver Arquivo
@@ -75,21 +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 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;
}
@@ -109,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.");
}
@@ -154,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;
@@ -572,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;
@@ -589,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()) {
@@ -797,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 -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 -17
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);
-2
Ver Arquivo
@@ -470,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:
+54 -132
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,28 +46,21 @@ namespace OCC {
//
// Whenever you change something here check both settingsdialog.cpp and settingsdialogmac.cpp !
//
void SettingsDialog::setDefaultAction()
{
Q_FOREACH(QAction *action, _toolBar->actions()) {
if (QWidgetAction *wa = qobject_cast<QWidgetAction*>(action)) {
if (QToolButton *qtb = qobject_cast<QToolButton*>(wa->defaultWidget())) {
qtb->setChecked(true);
break;
}
}
}
}
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);
@@ -80,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*)));
@@ -123,7 +115,8 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) :
accountAdded(ai.data());
}
setDefaultAction();
// default to Account
toolBar->actions().at(0)->trigger();
QPushButton *closeButton = _ui->buttonBox->button(QDialogButtonBox::Close);
connect(closeButton, SIGNAL(clicked()), SLOT(accept()));
@@ -133,8 +126,6 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) :
connect(showLogWindow, SIGNAL(triggered()), gui, SLOT(slotToggleLogBrowser()));
addAction(showLogWindow);
customizeStyle();
ConfigFile cfg;
cfg.restoreGeometry(this);
}
@@ -157,26 +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));
_ui->stack->setCurrentWidget(_actions.value(action));
}
void SettingsDialog::showActivityPage()
@@ -188,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 {
@@ -50,7 +48,6 @@ public:
void addAccount(const QString &title, QWidget *widget);
void setDefaultAction();
public slots:
void showActivityPage();
void slotSwitchPage(QAction *action);
@@ -58,28 +55,14 @@ public slots:
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();
+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
+2 -2
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);
@@ -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;
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
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