mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-07 14:44:01 +00:00
chore(CMakeLists.txt): deal with qt includes and Winsockapi
This commit is contained in:
parent
353398c72a
commit
b03787099a
2 changed files with 9 additions and 4 deletions
|
|
@ -63,6 +63,12 @@ endif()
|
|||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CUSTOM_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG")
|
||||
|
||||
# See: http://stackoverflow.com/a/1372836
|
||||
if(WIN32)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_WINSOCKAPI_")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_WINSOCKAPI_")
|
||||
endif()
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Define packages, libs, sources, headers, resources and languages.
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ void CallsListModel::addCall (const shared_ptr<linphone::Call> &linphoneCall) {
|
|||
|
||||
CallModel *call = new CallModel(linphoneCall);
|
||||
|
||||
qInfo() << "Add call:" << call;
|
||||
qInfo() << QStringLiteral("Add call:") << call;
|
||||
|
||||
App::getInstance()->getEngine()->setObjectOwnership(call, QQmlEngine::CppOwnership);
|
||||
|
||||
|
|
@ -188,16 +188,15 @@ void CallsListModel::addCall (const shared_ptr<linphone::Call> &linphoneCall) {
|
|||
}
|
||||
|
||||
void CallsListModel::removeCall (const shared_ptr<linphone::Call> &linphoneCall) {
|
||||
// TODO: It will be (maybe) necessary to use a single scheduled function in the future.
|
||||
QTimer::singleShot(
|
||||
DELAY_BEFORE_REMOVE_CALL, this, [this, linphoneCall]() {
|
||||
CallModel *call = &linphoneCall->getData<CallModel>("call-model");
|
||||
|
||||
qInfo() << "Removing call:" << call;
|
||||
qInfo() << QStringLiteral("Removing call:") << call;
|
||||
|
||||
int index = mList.indexOf(call);
|
||||
if (index == -1 || !removeRow(index))
|
||||
qWarning() << "Unable to remove call:" << call;
|
||||
qWarning() << QStringLiteral("Unable to remove call:") << call;
|
||||
|
||||
if (mList.empty())
|
||||
App::getInstance()->getCallsWindow()->close();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue