Changeset View
Changeset View
Standalone View
Standalone View
krusader/Synchronizer/synchronizergui.cpp
Context not available. | |||||
1986 | if (!filterTabs->fillQuery(&query)) | 1986 | if (!filterTabs->fillQuery(&query)) | ||
---|---|---|---|---|---|
1987 | return; | 1987 | return; | ||
1988 | 1988 | | |||
1989 | // perform some previous tests | ||||
1990 | QString leftLocationTrimmed = leftLocation->currentText().trimmed(); | ||||
1991 | QString rightLocationTrimmed = rightLocation->currentText().trimmed(); | ||||
1992 | if (leftLocationTrimmed.isEmpty()) { | ||||
1993 | KMessageBox::error(this, i18n("The target directory must not be empty.")); | ||||
1994 | leftLocation->setFocus(); | ||||
1995 | return; | ||||
1996 | } | ||||
1997 | if (rightLocationTrimmed.isEmpty()) { | ||||
1998 | KMessageBox::error(this, i18n("The source directory must not be empty.")); | ||||
1999 | rightLocation->setFocus(); | ||||
2000 | return; | ||||
2001 | } | ||||
2002 | // until the bug https://bugs.kde.org/show_bug.cgi?id=270150 is solved, | ||||
2003 | // some protocols will not be directly used when synchronizing | ||||
2004 | QUrl leftUrl = QUrl::fromUserInput(leftLocationTrimmed); | ||||
2005 | if (leftUrl.scheme() != QString("file")) { | ||||
2006 | KMessageBox::error(this, i18n("In the target directory the synchronizer does not directly support protocols " | ||||
2007 | "like FISH, SFTP, SMB, etc.")); | ||||
2008 | leftLocation->setFocus(); | ||||
2009 | return; | ||||
2010 | } | ||||
2011 | QUrl rightUrl = QUrl::fromUserInput(rightLocationTrimmed); | ||||
2012 | if (rightUrl.scheme() != QString("file")) { | ||||
2013 | KMessageBox::error(this, i18n("In the source directory the synchronizer does not directly support protocols " | ||||
2014 | "like FISH, SFTP, SMB, etc.")); | ||||
2015 | rightLocation->setFocus(); | ||||
2016 | return; | ||||
2017 | } | ||||
2018 | | ||||
1989 | query.setNameFilter(fileFilter->currentText(), query.isCaseSensitive()); | 2019 | query.setNameFilter(fileFilter->currentText(), query.isCaseSensitive()); | ||
1990 | synchronizerTabs->setCurrentIndex(0); | 2020 | synchronizerTabs->setCurrentIndex(0); | ||
1991 | 2021 | | |||
Context not available. |