Skip to content

Commit

Permalink
Merge pull request #5290 from nextcloud/bugfix/remove-unused
Browse files Browse the repository at this point in the history
Remove unused variables
  • Loading branch information
claucambra authored Dec 20, 2022
2 parents 0b70e49 + bbb77dc commit 8313d79
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 19 deletions.
11 changes: 0 additions & 11 deletions src/gui/folderstatusdelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &

QFontMetrics subFm(subFont);
QFontMetrics aliasFm(aliasFont);
QFontMetrics progressFm(progressFont);

int aliasMargin = aliasFm.height() / 2;
int margin = subFm.height() / 4;
Expand Down Expand Up @@ -156,7 +155,6 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
auto statusIcon = qvariant_cast<QIcon>(index.data(FolderStatusIconRole));
auto aliasText = qvariant_cast<QString>(index.data(HeaderRole));
auto pathText = qvariant_cast<QString>(index.data(FolderPathRole));
auto remotePath = qvariant_cast<QString>(index.data(FolderSecondPathRole));
auto conflictTexts = qvariant_cast<QStringList>(index.data(FolderConflictMsg));
auto errorTexts = qvariant_cast<QStringList>(index.data(FolderErrorMsg));
auto infoTexts = qvariant_cast<QStringList>(index.data(FolderInfoMsg));
Expand Down Expand Up @@ -223,15 +221,6 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &

auto palette = option.palette;

if (qApp->style()->inherits("QWindowsVistaStyle")) {
// Hack: Windows Vista's light blue is not contrasting enough for white

// (code from QWindowsVistaStyle::drawControl for CE_ItemViewItem)
palette.setColor(QPalette::All, QPalette::HighlightedText, palette.color(QPalette::Active, QPalette::Text));
palette.setColor(QPalette::All, QPalette::Highlight, palette.base().color().darker(108));
}


QPalette::ColorGroup cg = option.state & QStyle::State_Enabled
? QPalette::Normal
: QPalette::Disabled;
Expand Down
2 changes: 0 additions & 2 deletions src/gui/remotewipe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ void RemoteWipe::checkJobSlot()
//check for errors
if (_networkReplyCheck->error() != QNetworkReply::NoError ||
jsonParseError.error != QJsonParseError::NoError) {
QString errorReason;
QString errorFromJson = json["error"].toString();
if (!errorFromJson.isEmpty()) {
qCWarning(lcRemoteWipe) << QString("Error returned from the server: <em>%1<em>")
Expand Down Expand Up @@ -153,7 +152,6 @@ void RemoteWipe::notifyServerSuccessJobSlot()
QJsonObject json = QJsonDocument::fromJson(jsonData, &jsonParseError).object();
if (_networkReplySuccess->error() != QNetworkReply::NoError ||
jsonParseError.error != QJsonParseError::NoError) {
QString errorReason;
QString errorFromJson = json["error"].toString();
if (!errorFromJson.isEmpty()) {
qCWarning(lcRemoteWipe) << QString("Error returned from the server: <em>%1</em>")
Expand Down
4 changes: 0 additions & 4 deletions src/libsync/bulkpropagatorjob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,6 @@ void BulkPropagatorJob::checkPropagationIsDone()
void BulkPropagatorJob::slotComputeTransmissionChecksum(SyncFileItemPtr item,
UploadFileInfo fileToUpload)
{
// Reuse the content checksum as the transmission checksum if possible
const auto supportedTransmissionChecksums =
propagator()->account()->capabilities().supportedChecksumTypes();

// Compute the transmission checksum.
auto computeChecksum = std::make_unique<ComputeChecksum>(this);
if (uploadChecksumEnabled()) {
Expand Down
2 changes: 0 additions & 2 deletions src/libsync/propagateremotemove.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ void PropagateRemoteMove::start()
QString origin = propagator()->adjustRenamedPath(_item->_file);
qCInfo(lcPropagateRemoteMove) << origin << _item->_renameTarget;

QString targetFile(propagator()->fullLocalPath(_item->_renameTarget));

if (origin == _item->_renameTarget) {
// The parent has been renamed already so there is nothing more to do.

Expand Down

0 comments on commit 8313d79

Please sign in to comment.