Esempio n. 1
0
int MUtils::Translation::enumerate(QStringList &list)
{
	QReadLocker readLockTranslations(&g_translation_lock);

	if(g_translation_data.isNull())
	{
		list.clear();
		return -1;
	}

	list.swap(g_translation_data->keys());
	return list.count();
}
Esempio n. 2
0
/*
 * Clean-up *all* registered tools
 */
static void lamexp_tools_clean_up(void)
{
	QWriteLocker writeLock(&g_lamexp_tools_lock);
	qWarning("------------ lamexp_tools_clean_up ------------");

	if(!g_lamexp_tools_data.isNull())
	{
		const QStringList keys = g_lamexp_tools_data->keys();
		for(QStringList::ConstIterator iter = keys.constBegin(); iter != keys.constEnd(); iter++)
		{
			tool_data_t currentTool = (*g_lamexp_tools_data)[*iter];
			MUTILS_DELETE(currentTool.first);
		}
		g_lamexp_tools_data->clear();
	}
}