File indexing completed on 2024-04-28 17:01:40

0001 /*
0002 SPDX-FileCopyrightText: 2001-2003 Otto Bruggeman <otto.bruggeman@home.nl>
0003 SPDX-FileCopyrightText: 2001-2003 John Firebaugh <jfirebaugh@kde.org>
0004 
0005 SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #include "kompare.h"
0009 
0010 Kompare::Info::Info(Kompare::Mode _mode, Kompare::DiffMode _diffMode, Kompare::Format _format, Kompare::Generator _generator, QUrl _source, QUrl _destination, QString _localSource, QString _localDestination, QTemporaryDir* _sourceQTempDir, QTemporaryDir* _destinationQTempDir, uint _depth, bool _applied)
0011     : mode(_mode)
0012     , diffMode(_diffMode)
0013     , format(_format)
0014     , generator(_generator)
0015     , source(_source)
0016     , destination(_destination)
0017     , localSource(_localSource)
0018     , localDestination(_localDestination)
0019     , sourceQTempDir(_sourceQTempDir)
0020     , destinationQTempDir(_destinationQTempDir)
0021     , depth(_depth)
0022     , applied(_applied)
0023 {
0024 }
0025 
0026 
0027 void Kompare::Info::swapSourceWithDestination()
0028 {
0029     QUrl url = source;
0030     source = destination;
0031     destination = url;
0032 
0033     QString string = localSource;
0034     localSource = localDestination;
0035     localDestination = string;
0036 
0037     QTemporaryDir* tmpDir = sourceQTempDir;
0038     sourceQTempDir = destinationQTempDir;
0039     destinationQTempDir = tmpDir;
0040 }