Kaydet (Commit) 54409159 authored tarafından Pranav Kant's avatar Pranav Kant Kaydeden (comit) Miklos Vajna

lokdocview: Emit a warning after error

Change-Id: Id8e20e6561239096438d420c65d0da6dcc7f5e2e
Reviewed-on: https://gerrit.libreoffice.org/19474Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst c20f48ab
......@@ -55,6 +55,7 @@ void TileBuffer::setInvalid(int x, int y, float fZoom, GTask* task,
GThreadPool* lokThreadPool)
{
int index = x * m_nWidth + y;
GError* error = NULL;
if (m_mTiles.find(index) != m_mTiles.end())
{
m_mTiles[index].valid = false;
......@@ -64,7 +65,12 @@ void TileBuffer::setInvalid(int x, int y, float fZoom, GTask* task,
pLOEvent->m_nPaintTileY = y;
pLOEvent->m_fPaintTileZoom = fZoom;
g_task_set_task_data(task, pLOEvent, LOEvent::destroy);
g_thread_pool_push(lokThreadPool, g_object_ref(task), NULL);
g_thread_pool_push(lokThreadPool, g_object_ref(task), &error);
if (error != NULL)
{
g_warning("Unable to call LOK_PAINT_TILE: %s", error->message);
g_clear_error(&error);
}
}
}
......@@ -72,6 +78,7 @@ Tile& TileBuffer::getTile(int x, int y, float fZoom, GTask* task,
GThreadPool* lokThreadPool)
{
int index = x * m_nWidth + y;
GError* error = NULL;
if (m_mTiles.find(index) != m_mTiles.end() && !m_mTiles[index].valid)
{
......@@ -80,7 +87,12 @@ Tile& TileBuffer::getTile(int x, int y, float fZoom, GTask* task,
pLOEvent->m_nPaintTileY = y;
pLOEvent->m_fPaintTileZoom = fZoom;
g_task_set_task_data(task, pLOEvent, LOEvent::destroy);
g_thread_pool_push(lokThreadPool, g_object_ref(task), NULL);
g_thread_pool_push(lokThreadPool, g_object_ref(task), &error);
if (error != NULL)
{
g_warning("Unable to call LOK_PAINT_TILE: %s", error->message);
g_clear_error(&error);
}
return m_mTiles[index];
}
else if(m_mTiles.find(index) == m_mTiles.end())
......@@ -90,7 +102,12 @@ Tile& TileBuffer::getTile(int x, int y, float fZoom, GTask* task,
pLOEvent->m_nPaintTileY = y;
pLOEvent->m_fPaintTileZoom = fZoom;
g_task_set_task_data(task, pLOEvent, LOEvent::destroy);
g_thread_pool_push(lokThreadPool, g_object_ref(task), NULL);
g_thread_pool_push(lokThreadPool, g_object_ref(task), &error);
if (error != NULL)
{
g_warning("Unable to call LOK_PAINT_TILE: %s", error->message);
g_clear_error(&error);
}
return m_DummyTile;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment