mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-21 19:19:26 +02:00
Disable emit macro from Qt to fix Qt-tbb conflict
This commit is contained in:
parent
a432009841
commit
e2e5fce3b5
3
Global.h
3
Global.h
@ -273,6 +273,9 @@ using TLockGuardRec = std::lock_guard<std::recursive_mutex>;
|
||||
#define VCMI_LIB_WRAP_NAMESPACE(x) ::x
|
||||
#endif
|
||||
|
||||
// Qt defines 'emit' as macros, which conflicts with TBB definition of method with same name
|
||||
#define QT_NO_EMIT
|
||||
|
||||
/* ---------------------------------------------------------------------------- */
|
||||
/* VCMI standard library */
|
||||
/* ---------------------------------------------------------------------------- */
|
||||
|
@ -122,7 +122,7 @@ void CDownloadManager::downloadFinished(QNetworkReply * reply)
|
||||
}
|
||||
|
||||
if(downloadComplete)
|
||||
emit finished(successful, failed, encounteredErrors);
|
||||
finished(successful, failed, encounteredErrors);
|
||||
|
||||
file.reply->deleteLater();
|
||||
file.reply = nullptr;
|
||||
@ -149,7 +149,7 @@ void CDownloadManager::downloadProgressChanged(qint64 bytesReceived, qint64 byte
|
||||
if(received > total)
|
||||
total = received;
|
||||
|
||||
emit downloadProgress(received, total);
|
||||
downloadProgress(received, total);
|
||||
}
|
||||
|
||||
bool CDownloadManager::downloadInProgress(const QUrl & url) const
|
||||
|
@ -824,7 +824,7 @@ void CModListView::installFiles(QStringList files)
|
||||
|
||||
while(futureExtract.wait_for(std::chrono::milliseconds(10)) != std::future_status::ready)
|
||||
{
|
||||
emit extractionProgress(static_cast<int>(prog * 1000.f), 1000);
|
||||
extractionProgress(static_cast<int>(prog * 1000.f), 1000);
|
||||
qApp->processEvents();
|
||||
}
|
||||
|
||||
|
@ -214,7 +214,7 @@ bool ModStateController::doInstallMod(QString modname, QString archivePath)
|
||||
|
||||
while(futureExtract.wait_for(std::chrono::milliseconds(10)) != std::future_status::ready)
|
||||
{
|
||||
emit extractionProgress(filesCounter, filesToExtract.size());
|
||||
extractionProgress(filesCounter, filesToExtract.size());
|
||||
qApp->processEvents();
|
||||
}
|
||||
|
||||
|
@ -206,7 +206,7 @@ void ModStateItemModel::modChanged(QString modID)
|
||||
int index = modNameToID.indexOf(modID);
|
||||
QModelIndex parent = this->parent(createIndex(0, 0, index));
|
||||
int row = modIndex[modIndexToName(parent)].indexOf(modID);
|
||||
emit dataChanged(createIndex(row, 0, index), createIndex(row, 4, index));
|
||||
dataChanged(createIndex(row, 0, index), createIndex(row, 4, index));
|
||||
}
|
||||
|
||||
void ModStateItemModel::endResetModel()
|
||||
|
@ -10,7 +10,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "../Global.h"
|
||||
#include <tbb/concurrent_hash_map.h> // Workaround for Qt / tbb name clash
|
||||
|
||||
#define VCMI_EDITOR_NAME "VCMI Map Editor"
|
||||
|
||||
|
@ -23,7 +23,7 @@ ArtifactWidget::ArtifactWidget(CArtifactFittingSet & fittingSet, QWidget * paren
|
||||
|
||||
connect(ui->saveButton, &QPushButton::clicked, this, [this]()
|
||||
{
|
||||
emit saveArtifact(ui->artifact->currentData().toInt(), ArtifactPosition(ui->possiblePositions->currentData().toInt()));
|
||||
saveArtifact(ui->artifact->currentData().toInt(), ArtifactPosition(ui->possiblePositions->currentData().toInt()));
|
||||
close();
|
||||
});
|
||||
connect(ui->cancelButton, &QPushButton::clicked, this, &ArtifactWidget::close);
|
||||
|
@ -428,8 +428,8 @@ bool QuestDelegate::eventFilter(QObject * object, QEvent * event)
|
||||
return false;
|
||||
if(event->type() == QEvent::Close)
|
||||
{
|
||||
emit commitData(ed);
|
||||
emit closeEditor(ed);
|
||||
commitData(ed);
|
||||
closeEditor(ed);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ void RumorSettings::on_add_clicked()
|
||||
item->setData(Qt::UserRole, QVariant(""));
|
||||
item->setFlags(item->flags() | Qt::ItemIsEditable);
|
||||
ui->rumors->addItem(item);
|
||||
emit ui->rumors->itemActivated(item);
|
||||
ui->rumors->itemActivated(item);
|
||||
}
|
||||
|
||||
void RumorSettings::on_remove_clicked()
|
||||
|
@ -47,7 +47,7 @@ void MinimapView::mouseMoveEvent(QMouseEvent *mouseEvent)
|
||||
|
||||
auto pos = mapToScene(mouseEvent->pos());
|
||||
pos *= 32;
|
||||
emit cameraPositionChanged(pos);
|
||||
cameraPositionChanged(pos);
|
||||
}
|
||||
|
||||
void MinimapView::mousePressEvent(QMouseEvent* event)
|
||||
@ -90,7 +90,7 @@ void MapView::mouseMoveEvent(QMouseEvent *mouseEvent)
|
||||
if(tile == tilePrev) //do not redraw
|
||||
return;
|
||||
|
||||
emit currentCoordinates(tile.x, tile.y);
|
||||
currentCoordinates(tile.x, tile.y);
|
||||
|
||||
switch(selectionTool)
|
||||
{
|
||||
@ -563,7 +563,7 @@ void MapView::mouseReleaseEvent(QMouseEvent *event)
|
||||
auto selection = sc->selectionObjectsView.getSelection();
|
||||
if(selection.size() == 1)
|
||||
{
|
||||
emit openObjectProperties(*selection.begin(), tab);
|
||||
openObjectProperties(*selection.begin(), tab);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -618,7 +618,7 @@ void MapView::dropEvent(QDropEvent * event)
|
||||
{
|
||||
auto * obj = sc->selectionObjectsView.newObject;
|
||||
controller->commitObjectCreate(sc->level);
|
||||
emit openObjectProperties(obj, false);
|
||||
openObjectProperties(obj, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -736,13 +736,13 @@ void MapScene::updateViews()
|
||||
void MapScene::terrainSelected(bool anythingSelected)
|
||||
{
|
||||
isTerrainSelected = anythingSelected;
|
||||
emit selected(isTerrainSelected || isObjectSelected);
|
||||
selected(isTerrainSelected || isObjectSelected);
|
||||
}
|
||||
|
||||
void MapScene::objectSelected(bool anythingSelected)
|
||||
{
|
||||
isObjectSelected = anythingSelected;
|
||||
emit selected(isTerrainSelected || isObjectSelected);
|
||||
selected(isTerrainSelected || isObjectSelected);
|
||||
}
|
||||
|
||||
MinimapScene::MinimapScene(int lvl):
|
||||
|
@ -182,14 +182,14 @@ void ObjectPickerLayer::select(const CGObjectInstance * obj)
|
||||
if(obj && possibleObjects.count(obj))
|
||||
{
|
||||
clear();
|
||||
emit selectionMade(obj);
|
||||
selectionMade(obj);
|
||||
}
|
||||
}
|
||||
|
||||
void ObjectPickerLayer::discard()
|
||||
{
|
||||
clear();
|
||||
emit selectionMade(nullptr);
|
||||
selectionMade(nullptr);
|
||||
}
|
||||
|
||||
SelectionTerrainLayer::SelectionTerrainLayer(MapSceneBase * s): AbstractLayer(s)
|
||||
@ -277,7 +277,7 @@ const std::set<int3> & SelectionTerrainLayer::selection() const
|
||||
|
||||
void SelectionTerrainLayer::onSelection()
|
||||
{
|
||||
emit selectionMade(!area.empty());
|
||||
selectionMade(!area.empty());
|
||||
}
|
||||
|
||||
|
||||
@ -610,7 +610,7 @@ void SelectionObjectsLayer::clear()
|
||||
|
||||
void SelectionObjectsLayer::onSelection()
|
||||
{
|
||||
emit selectionMade(!selectedObjects.empty());
|
||||
selectionMade(!selectedObjects.empty());
|
||||
}
|
||||
|
||||
void SelectionObjectsLayer::setLockObject(const CGObjectInstance * object, bool lock)
|
||||
|
Loading…
x
Reference in New Issue
Block a user