Commit fab4b917 authored by Volker Krause's avatar Volker Krause
Browse files

Prepare for stricter upcoming ECM compiler settings

parent 82cd72a8
......@@ -329,7 +329,7 @@ private Q_SLOTS:
// check we get update signals for all weather elements
QSignalSpy spy(&model, &TimelineModel::dataChanged);
QVERIFY(spy.isValid());
emit weatherMgr.forecastUpdated();
Q_EMIT weatherMgr.forecastUpdated();
QCOMPARE(spy.size(), 10);
fc = model.index(3, 0).data(TimelineModel::WeatherForecastRole).value<WeatherForecast>();
......
......@@ -99,7 +99,7 @@ void DocumentManager::addDocument(const QString &id, const QVariant &info, const
}
metaFile.write(QJsonDocument(JsonLdDocument::toJson(normalizedDocInfo)).toJson());
metaFile.close();
emit documentAdded(id);
Q_EMIT documentAdded(id);
}
void DocumentManager::addDocument(const QString& id, const QVariant& info, const QString& filePath)
......@@ -134,7 +134,7 @@ void DocumentManager::addDocument(const QString& id, const QVariant& info, const
}
metaFile.write(QJsonDocument(JsonLdDocument::toJson(normalizedDocInfo)).toJson());
metaFile.close();
emit documentAdded(id);
Q_EMIT documentAdded(id);
}
void DocumentManager::removeDocument(const QString& id)
......@@ -144,7 +144,7 @@ void DocumentManager::removeDocument(const QString& id)
if (!docDir.removeRecursively()) {
qCWarning(Log) << "Failed to delete directory" << path;
}
emit documentRemoved(id);
Q_EMIT documentRemoved(id);
}
QString DocumentManager::basePath() const
......
......@@ -93,7 +93,7 @@ void DocumentsModel::setDocumentManager(DocumentManager *mgr)
connect(mgr, &DocumentManager::documentAdded, this, &DocumentsModel::reload);
connect(mgr, &DocumentManager::documentRemoved, this, &DocumentsModel::reload);
emit setupChanged();
Q_EMIT setupChanged();
}
void DocumentsModel::setReservationManager(ReservationManager* mgr)
......@@ -109,7 +109,7 @@ void DocumentsModel::setReservationManager(ReservationManager* mgr)
}
});
emit setupChanged();
Q_EMIT setupChanged();
}
void DocumentsModel::reload()
......@@ -135,7 +135,7 @@ void DocumentsModel::reload()
std::sort(m_docIds.begin(), m_docIds.end());
m_docIds.erase(std::unique(m_docIds.begin(), m_docIds.end()), m_docIds.end());
endResetModel();
emit emptyChanged();
Q_EMIT emptyChanged();
}
bool DocumentsModel::isEmpty() const
......
......@@ -233,17 +233,17 @@ bool FavoriteLocationModel::setData(const QModelIndex &index, const QVariant &va
switch (role) {
case Qt::DisplayRole:
loc.setName(value.toString());
emit dataChanged(index, index);
Q_EMIT dataChanged(index, index);
saveLocations();
return true;
case FavoriteLocationModel::LatitudeRole:
loc.setLatitude(value.toFloat());
emit dataChanged(index, index);
Q_EMIT dataChanged(index, index);
saveLocations();
return true;
case FavoriteLocationModel::LongitudeRole:
loc.setLongitude(value.toFloat());
emit dataChanged(index, index);
Q_EMIT dataChanged(index, index);
saveLocations();
return true;
}
......
......@@ -129,9 +129,9 @@ void LiveDataManager::setJourney(const QString &resId, const KPublicTransport::J
ld.arrivalTimestamp = now();
ld.store(resId, LiveData::AllTypes);
emit journeyUpdated(resId);
emit departureUpdated(resId);
emit arrivalUpdated(resId);
Q_EMIT journeyUpdated(resId);
Q_EMIT departureUpdated(resId);
Q_EMIT arrivalUpdated(resId);
}
void LiveDataManager::checkForUpdates()
......@@ -225,7 +225,7 @@ void LiveDataManager::updateStopoverData(const KPublicTransport::Stopover &stop,
}
// emit update signals
emit type == LiveData::Arrival ? arrivalUpdated(resId) : departureUpdated(resId);
Q_EMIT type == LiveData::Arrival ? arrivalUpdated(resId) : departureUpdated(resId);
// check if we need to notify
if (NotificationHelper::shouldNotify(oldStop, stop, type)) {
......@@ -324,9 +324,9 @@ void LiveDataManager::importData(const QString& resId, LiveData &&data)
{
// we don't need to store data, Importer already does that
m_data[resId] = std::move(data);
emit journeyUpdated(resId);
emit departureUpdated(resId);
emit arrivalUpdated(resId);
Q_EMIT journeyUpdated(resId);
Q_EMIT departureUpdated(resId);
Q_EMIT arrivalUpdated(resId);
}
bool LiveDataManager::isRelevant(const QString &resId) const
......@@ -375,20 +375,20 @@ void LiveDataManager::batchChanged(const QString &resId)
(*dataIt).departure = {};
(*dataIt).departureTimestamp = {};
(*dataIt).store(resId, LiveData::Departure);
emit departureUpdated(resId);
Q_EMIT departureUpdated(resId);
}
if ((*dataIt).arrivalTimestamp.isValid() && !isArrivalForReservation(res, (*dataIt).arrival)) {
(*dataIt).arrival = {};
(*dataIt).arrivalTimestamp = {};
(*dataIt).store(resId, LiveData::Arrival);
emit arrivalUpdated(resId);
Q_EMIT arrivalUpdated(resId);
}
// TODO check if the change made this necessary at all
(*dataIt).journey = {};
(*dataIt).journeyTimestamp = {};
(*dataIt).store(resId, LiveData::Journey);
emit journeyUpdated(resId);
Q_EMIT journeyUpdated(resId);
}
m_pollTimer.setInterval(nextPollTime());
......
......@@ -139,7 +139,7 @@ void MapDownloadManager::downloadFinished()
m_loader = nullptr;
if (m_pendingRequests.empty()) {
emit finished();
Q_EMIT finished();
} else {
downloadNext();
}
......
......@@ -180,10 +180,10 @@ QString PkPassManager::doImportPass(const QUrl& url, const QByteArray &data, PkP
changes.push_back(f.changeMessage());
}
}
emit passUpdated(passId, changes);
Q_EMIT passUpdated(passId, changes);
oldPass->deleteLater();
} else {
emit passAdded(passId);
Q_EMIT passAdded(passId);
}
return passId;
......@@ -193,7 +193,7 @@ void PkPassManager::removePass(const QString& passId)
{
const QString basePath = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QStringLiteral("/passes/");
QFile::remove(basePath + QLatin1Char('/') + passId + QLatin1String(".pkpass"));
emit passRemoved(passId);
Q_EMIT passRemoved(passId);
delete m_passes.take(passId);
}
......
......@@ -201,7 +201,7 @@ QVector<QString> ReservationManager::importReservations(const QVector<QVariant>
ids.push_back(addReservation(res));
}
emit infoMessage(i18np("One reservation imported.", "%1 reservations imported.", ids.size()));
Q_EMIT infoMessage(i18np("One reservation imported.", "%1 reservations imported.", ids.size()));
return ids;
}
......@@ -243,11 +243,11 @@ QString ReservationManager::addReservation(const QVariant &res)
// truly new, and added to an existing batch
const QString resId = QUuid::createUuid().toString();
storeReservation(resId, res);
emit reservationAdded(resId);
Q_EMIT reservationAdded(resId);
m_batchToResMap[*it].push_back(resId);
m_resToBatchMap.insert(resId, *it);
emit batchChanged(*it);
Q_EMIT batchChanged(*it);
storeBatch(*it);
return resId;
}
......@@ -256,7 +256,7 @@ QString ReservationManager::addReservation(const QVariant &res)
// truly new, and starting a new batch
const QString resId = QUuid::createUuid().toString();
storeReservation(resId, res);
emit reservationAdded(resId);
Q_EMIT reservationAdded(resId);
// search for the precise insertion place, beginIt is only the begin of our initial search range
const auto insertIt = std::lower_bound(m_batches.begin(), m_batches.end(), SortUtil::startDateTime(res), [this](const auto &lhs, const auto &rhs) {
......@@ -265,7 +265,7 @@ QString ReservationManager::addReservation(const QVariant &res)
m_batches.insert(insertIt, resId);
m_batchToResMap.insert(resId, {resId});
m_resToBatchMap.insert(resId, resId);
emit batchAdded(resId);
Q_EMIT batchAdded(resId);
storeBatch(resId);
return resId;
}
......@@ -275,7 +275,7 @@ void ReservationManager::updateReservation(const QString &resId, const QVariant
const auto oldRes = reservation(resId);
storeReservation(resId, res);
emit reservationChanged(resId);
Q_EMIT reservationChanged(resId);
updateBatch(resId, res, oldRes);
}
......@@ -301,7 +301,7 @@ void ReservationManager::removeReservation(const QString& id)
const QString basePath = reservationsBasePath();
QFile::remove(basePath + QLatin1Char('/') + id + QLatin1String(".jsonld"));
emit reservationRemoved(id);
Q_EMIT reservationRemoved(id);
m_reservations.remove(id);
}
......@@ -455,7 +455,7 @@ void ReservationManager::updateBatch(const QString &resId, const QVariant &newRe
// still in the same batch?
if (!oldBatchId.isEmpty() && oldBatchId == newBatchId) {
emit batchContentChanged(oldBatchId);
Q_EMIT batchContentChanged(oldBatchId);
// no need to store here, as batching didn't actually change
return;
}
......@@ -474,12 +474,12 @@ void ReservationManager::updateBatch(const QString &resId, const QVariant &newRe
m_batches.insert(it, QString(resId));
m_batchToResMap.insert(resId, {resId});
m_resToBatchMap.insert(resId, resId);
emit batchAdded(resId);
Q_EMIT batchAdded(resId);
storeBatch(resId);
} else {
m_batchToResMap[newBatchId].push_back(resId);
m_resToBatchMap.insert(resId, newBatchId);
emit batchChanged(newBatchId);
Q_EMIT batchChanged(newBatchId);
storeBatch(newBatchId);
}
}
......@@ -496,7 +496,7 @@ void ReservationManager::removeFromBatch(const QString &resId, const QString &ba
m_batchToResMap.remove(batchId);
const auto it = std::find(m_batches.begin(), m_batches.end(), batchId);
m_batches.erase(it);
emit batchRemoved(batchId);
Q_EMIT batchRemoved(batchId);
storeRemoveBatch(batchId);
} else if (resId == batchId) {
// our id was the batch id, so rename the old batch
......@@ -510,13 +510,13 @@ void ReservationManager::removeFromBatch(const QString &resId, const QString &ba
}
m_batchToResMap[renamedBatchId] = batches;
m_batchToResMap.remove(batchId);
emit batchRenamed(batchId, renamedBatchId);
Q_EMIT batchRenamed(batchId, renamedBatchId);
storeRemoveBatch(batchId);
storeBatch(renamedBatchId);
} else {
// old batch remains
batches.removeAll(resId);
emit batchChanged(batchId);
Q_EMIT batchChanged(batchId);
storeBatch(batchId);
}
}
......
......@@ -52,7 +52,7 @@ void Settings::setWeatherForecastEnabled(bool enabled)
s.beginGroup(QLatin1String("Settings"));
s.setValue(QLatin1String("WeatherForecastEnabled"), enabled);
emit weatherForecastEnabledChanged(enabled);
Q_EMIT weatherForecastEnabledChanged(enabled);
}
QString Settings::homeCountryIsoCode() const
......@@ -71,7 +71,7 @@ void Settings::setHomeCountryIsoCode(const QString& isoCode)
s.beginGroup(QLatin1String("Settings"));
s.setValue(QLatin1String("HomeCountry"), isoCode);
emit homeCountryIsoCodeChanged(isoCode);
Q_EMIT homeCountryIsoCodeChanged(isoCode);
}
bool Settings::queryLiveData() const
......@@ -94,7 +94,7 @@ void Settings::setQueryLiveData(bool queryLiveData)
s.beginGroup(QLatin1String("Settings"));
s.setValue(QLatin1String("QueryLiveData"), queryLiveData);
emit queryLiveDataChanged(queryLiveData);
Q_EMIT queryLiveDataChanged(queryLiveData);
}
bool Settings::preloadMapData() const
......@@ -113,7 +113,7 @@ void Settings::setPreloadMapData(bool preload)
s.beginGroup(QLatin1String("Settings"));
s.setValue(QLatin1String("PreloadMapData"), preload);
emit preloadMapDataChanged(preload);
Q_EMIT preloadMapDataChanged(preload);
}
bool Settings::autoAddTransfers() const
......@@ -136,7 +136,7 @@ void Settings::setAutoAddTransfers(bool autoAdd)
s.beginGroup(QLatin1String("Settings"));
s.setValue(QLatin1String("AutoAddTransfers"), autoAdd);
emit autoAddTransfersChanged(autoAdd);
Q_EMIT autoAddTransfersChanged(autoAdd);
}
bool Settings::autoFillTransfers() const
......@@ -155,7 +155,7 @@ void Settings::setAutoFillTransfers(bool autoFill)
s.beginGroup(QLatin1String("Settings"));
s.setValue(QLatin1String("AutoFillTransfers"), autoFill);
emit autoFillTransfersChanged(autoFill);
Q_EMIT autoFillTransfersChanged(autoFill);
}
bool Settings::showNotificationOnLockScreen() const
......@@ -174,7 +174,7 @@ void Settings::setShowNotificationOnLockScreen(bool enabled)
s.beginGroup(QLatin1String("Settings"));
s.setValue(QLatin1String("ShowNotificationOnLockScreen"), m_showNotificationOnLockScreen);
emit showNotificationOnLockScreenChanged(m_showNotificationOnLockScreen);
Q_EMIT showNotificationOnLockScreenChanged(m_showNotificationOnLockScreen);
}
bool Settings::developmentMode() const
......@@ -192,5 +192,5 @@ void Settings::setDevelopmentMode(bool enabled)
QSettings s;
s.beginGroup(QLatin1String("Settings"));
s.setValue(QLatin1String("DevelopmentMode"), m_developmentMode);
emit developmentModeChanged(m_developmentMode);
Q_EMIT developmentModeChanged(m_developmentMode);
}
......@@ -53,7 +53,7 @@ void StatisticsModel::setReservationManager(ReservationManager *resMgr)
}
m_resMgr = resMgr;
connect(m_resMgr, &ReservationManager::batchAdded, this, &StatisticsModel::recompute);
emit setupChanged();
Q_EMIT setupChanged();
}
TripGroupManager* StatisticsModel::tripGroupManager() const
......@@ -68,7 +68,7 @@ void StatisticsModel::setTripGroupManager(TripGroupManager* tripGroupMgr)
}
m_tripGroupMgr = tripGroupMgr;
connect(m_tripGroupMgr, &TripGroupManager::tripGroupAdded, this, &StatisticsModel::recompute);
emit setupChanged();
Q_EMIT setupChanged();
}
void StatisticsModel::setTimeRange(const QDate &begin, const QDate &end)
......@@ -304,7 +304,7 @@ void StatisticsModel::recompute()
m_tripGroupCount = tripGroups.size();
m_prevTripGroupCount = prevTripGroups.size();
emit changed();
Q_EMIT changed();
}
StatisticsItem::Trend StatisticsModel::trend(int current, int prev) const
......
......@@ -35,7 +35,7 @@ void StatisticsTimeRangeModel::setReservationManager(ReservationManager *resMgr)
return;
}
m_resMgr = resMgr;
emit setupChanged();
Q_EMIT setupChanged();
beginResetModel();
int y = 0;
......
......@@ -66,11 +66,11 @@ void TimelineDelegateController::setReservationManager(QObject *resMgr)
}
m_resMgr = qobject_cast<ReservationManager*>(resMgr);
emit setupChanged();
emit contentChanged();
emit departureChanged();
emit arrivalChanged();
emit previousLocationChanged();
Q_EMIT setupChanged();
Q_EMIT contentChanged();
Q_EMIT departureChanged();
Q_EMIT arrivalChanged();
Q_EMIT previousLocationChanged();
connect(m_resMgr, &ReservationManager::batchChanged, this, &TimelineDelegateController::batchChanged);
connect(m_resMgr, &ReservationManager::batchContentChanged, this, &TimelineDelegateController::batchChanged);
......@@ -93,20 +93,20 @@ void TimelineDelegateController::setLiveDataManager(QObject* liveDataMgr)
}
m_liveDataMgr = qobject_cast<LiveDataManager*>(liveDataMgr);
emit setupChanged();
emit departureChanged();
emit arrivalChanged();
Q_EMIT setupChanged();
Q_EMIT departureChanged();
Q_EMIT arrivalChanged();
connect(m_liveDataMgr, &LiveDataManager::arrivalUpdated, this, &TimelineDelegateController::checkForUpdate);
connect(m_liveDataMgr, &LiveDataManager::departureUpdated, this, &TimelineDelegateController::checkForUpdate);
connect(m_liveDataMgr, &LiveDataManager::arrivalUpdated, this, [this](const auto &batchId) {
if (batchId == m_batchId) {
emit arrivalChanged();
Q_EMIT arrivalChanged();
}
});
connect(m_liveDataMgr, &LiveDataManager::departureUpdated, this, [this](const auto &batchId) {
if (batchId == m_batchId) {
emit departureChanged();
Q_EMIT departureChanged();
}
});
......@@ -125,7 +125,7 @@ void TimelineDelegateController::setTransferManager(QObject *transferMgr)
}
m_transferMgr = qobject_cast<TransferManager*>(transferMgr);
emit setupChanged();
Q_EMIT setupChanged();
}
QString TimelineDelegateController::batchId() const
......@@ -139,11 +139,11 @@ void TimelineDelegateController::setBatchId(const QString &batchId)
return;
m_batchId = batchId;
emit batchIdChanged();
emit contentChanged();
emit departureChanged();
emit arrivalChanged();
emit previousLocationChanged();
Q_EMIT batchIdChanged();
Q_EMIT contentChanged();
Q_EMIT departureChanged();
Q_EMIT arrivalChanged();
Q_EMIT previousLocationChanged();
checkForUpdate(batchId);
}
......@@ -159,7 +159,7 @@ void TimelineDelegateController::setCurrent(bool current, const QVariant &res)
}
m_isCurrent = current;
emit currentChanged();
Q_EMIT currentChanged();
if (!LocationUtil::isLocationChange(res)) {
return;
......@@ -307,10 +307,10 @@ void TimelineDelegateController::batchChanged(const QString& batchId)
return;
}
checkForUpdate(batchId);
emit contentChanged();
emit arrivalChanged();
emit departureChanged();
emit previousLocationChanged();
Q_EMIT contentChanged();
Q_EMIT arrivalChanged();
Q_EMIT departureChanged();
Q_EMIT previousLocationChanged();
}
QVariant TimelineDelegateController::previousLocation() const
......
......@@ -87,7 +87,7 @@ TimelineModel::TimelineModel(QObject *parent)
return;
}
m_todayEmpty = !m_todayEmpty;
emit dataChanged(idx, idx);
Q_EMIT dataChanged(idx, idx);
});
}
......@@ -135,7 +135,7 @@ void TimelineModel::setReservationManager(ReservationManager* mgr)
endResetModel();
updateInformationElements();
emit todayRowChanged();
Q_EMIT todayRowChanged();
}
void TimelineModel::setWeatherForecastManager(WeatherForecastManager* mgr)
......@@ -295,7 +295,7 @@ void TimelineModel::batchAdded(const QString &resId)
updateInformationElements();
updateTransfersForBatch(resId);
emit todayRowChanged();
Q_EMIT todayRowChanged();
}
void TimelineModel::insertElement(TimelineElement &&elem)
......@@ -323,7 +323,7 @@ std::vector<TimelineElement>::iterator TimelineModel::insertOrUpdate(std::vector
if (it != m_elements.end() && (*it) == elem) {
const auto row = std::distance(m_elements.begin(), it);
(*it) = std::move(elem);
emit dataChanged(index(row, 0), index(row, 0));
Q_EMIT dataChanged(index(row, 0), index(row, 0));
} else {
const auto row = std::distance(m_elements.begin(), it);
beginInsertRows({}, row, row);
......@@ -355,7 +355,7 @@ void TimelineModel::batchRenamed(const QString& oldBatchId, const QString& newBa
(*it).setContent(newBatchId);
const auto idx = index(std::distance(m_elements.begin(), it), 0);
emit dataChanged(idx, idx);
Q_EMIT dataChanged(idx, idx);
if ((*it).rangeType == TimelineElement::SelfContained || (*it).rangeType == TimelineElement::RangeEnd) {
break;
......@@ -381,7 +381,7 @@ void TimelineModel::updateElement(const QString &resId, const QVariant &res, Tim
endRemoveRows();
insertElement(TimelineElement{resId, res, rangeType});
} else {
emit dataChanged(index(row, 0), index(row, 0));
Q_EMIT dataChanged(index(row, 0), index(row, 0));
}
}
......@@ -399,7 +399,7 @@ void TimelineModel::batchRemoved(const QString &resId)
beginRemoveRows({}, row, row);
m_elements.erase(it);
endRemoveRows();
emit todayRowChanged();
Q_EMIT todayRowChanged();
if (isSplit) {
batchRemoved(resId);
......@@ -433,7 +433,7 @@ void TimelineModel::updateTodayMarker()
beginRemoveRows({}, oldRow, oldRow);
m_elements.erase(m_elements.begin() + oldRow);
endRemoveRows();
emit todayRowChanged();
Q_EMIT todayRowChanged();
}
void TimelineModel::updateInformationElements()
......@@ -727,7 +727,7 @@ void TimelineModel::transferChanged(const Transfer& transfer)
}
insertOrUpdate(it, TimelineElement(transfer));
emit todayRowChanged();
Q_EMIT todayRowChanged();
}
void TimelineModel::transferRemoved(const QString &resId, Transfer::Alignment alignment)
......@@ -745,5 +745,5 @@ void TimelineModel::transferRemoved(const QString &resId, Transfer::Alignment al
m_elements.erase(it);
endRemoveRows();
emit todayRowChanged();
Q_EMIT todayRowChanged();
}
......@@ -99,7 +99,7 @@ void TransferManager::setJourneyForTransfer(Transfer transfer, const KPublicTran
transfer.setJourney(journey);
m_transfers[transfer.alignment()].insert(transfer.reservationId(), transfer);
writeToFile(transfer);
emit transferChanged(transfer);
Q_EMIT transferChanged(transfer);
}
Transfer TransferManager::setFavoriteLocationForTransfer(Transfer transfer, const FavoriteLocation& favoriteLocation)
......@@ -123,7 +123,7 @@ Transfer TransferManager::setFavoriteLocationForTransfer(Transfer transfer, cons
transfer.setJourney({});
m_transfers[transfer.alignment()].insert(transfer.reservationId(), transfer);
writeToFile(transfer);
emit transferChanged(transfer);
Q_EMIT transferChanged(transfer);
return transfer;
}
......@@ -353,8 +353,8 @@ void TransferManager::reservationRemoved(const QString &resId)
removeFile(resId, Transfer::Before);
removeFile(resId, Transfer::After);
// TODO updates to adjacent transfers?
emit transferRemoved(resId, Transfer::Before);
emit transferRemoved(resId, Transfer::After);
Q_EMIT transferRemoved(resId, Transfer::Before);
Q_EMIT transferRemoved(resId, Transfer::After);
}
void TransferManager::tripGroupChanged(const QString &tgId)
......@@ -430,15 +430,15 @@ void TransferManager::addOrUpdateTransfer(Transfer &t)
autoFillTransfer(t);
m_transfers[t.alignment()].insert(t.reservationId(), t);
writeToFile(t);
emit transferAdded(t);
Q_EMIT transferAdded(t);
} else if (t.state() == Transfer::Discarded) {
m_transfers[t.alignment()].insert(t.reservationId(), t);
writeToFile(t);
emit transferRemoved(t.reservationId(), t.alignment());
Q_EMIT transferRemoved(t.reservationId(), t.alignment());
} else { // update existing data
m_transfers[t.alignment()].insert(t.reservationId(), t);
writeToFile(t);
emit transferChanged(t);
Q_EMIT transferChanged(t);
}
}
......@@ -449,7 +449,7 @@ void TransferManager::removeTransfer(const Transfer &t)
}
m_transfers[t.alignment()].remove(t.reservationId());
removeFile(t.reservationId(), t.alignment());
emit transferRemoved(t.reservationId(), t.alignment());
Q_EMIT transferRemoved(t.reservationId(), t.alignment());
}
static QString transferBasePath()
......@@ -495,7 +495,7 @@ void TransferManager::importTransfer(const Transfer &transfer)
m_transfers[transfer.alignment()].insert(transfer.reservationId(), transfer);
writeToFile(transfer);
update ?