Commit d7ce65df authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use toStdString

parent 8e19cd18
Pipeline #31452 passed with stage
in 22 minutes and 18 seconds
......@@ -14,7 +14,7 @@ AkonotesIndexer::AkonotesIndexer(const QString &path)
: AbstractIndexer()
{
try {
m_db = new Xapian::WritableDatabase(path.toUtf8().constData(), Xapian::DB_CREATE_OR_OPEN);
m_db = new Xapian::WritableDatabase(path.toStdString(), Xapian::DB_CREATE_OR_OPEN);
} catch (const Xapian::DatabaseCorruptError &err) {
qCWarning(AKONADI_INDEXER_AGENT_LOG) << "Database Corrupted - What did you do?";
qCWarning(AKONADI_INDEXER_AGENT_LOG) << err.get_error_string();
......
......@@ -22,7 +22,7 @@ CollectionIndexer::CollectionIndexer(const QString &path)
Akonadi::AttributeFactory::registerAttribute<Akonadi::CollectionIdentificationAttribute>();
try {
m_db = new Xapian::WritableDatabase(path.toUtf8().constData(), Xapian::DB_CREATE_OR_OPEN);
m_db = new Xapian::WritableDatabase(path.toStdString(), Xapian::DB_CREATE_OR_OPEN);
} catch (const Xapian::DatabaseCorruptError &err) {
qCCritical(AKONADI_INDEXER_AGENT_LOG) << "Database Corrupted - What did you do?";
qCCritical(AKONADI_INDEXER_AGENT_LOG) << err.get_error_string();
......
......@@ -18,7 +18,7 @@ EmailIndexer::EmailIndexer(const QString &path, const QString &contactDbPath)
: AbstractIndexer()
{
try {
m_db = new Xapian::WritableDatabase(path.toUtf8().constData(), Xapian::DB_CREATE_OR_OPEN);
m_db = new Xapian::WritableDatabase(path.toStdString(), Xapian::DB_CREATE_OR_OPEN);
} catch (const Xapian::DatabaseCorruptError &err) {
qCWarning(AKONADI_INDEXER_AGENT_LOG) << "Database Corrupted - What did you do?";
qCWarning(AKONADI_INDEXER_AGENT_LOG) << err.get_error_string();
......@@ -29,7 +29,7 @@ EmailIndexer::EmailIndexer(const QString &path, const QString &contactDbPath)
}
try {
m_contactDb = new Xapian::WritableDatabase(contactDbPath.toUtf8().constData(), Xapian::DB_CREATE_OR_OPEN);
m_contactDb = new Xapian::WritableDatabase(contactDbPath.toStdString(), Xapian::DB_CREATE_OR_OPEN);
} catch (const Xapian::DatabaseCorruptError &err) {
qCWarning(AKONADI_INDEXER_AGENT_LOG) << "Database Corrupted - What did you do?";
qCWarning(AKONADI_INDEXER_AGENT_LOG) << err.get_error_string();
......
......@@ -24,7 +24,7 @@ XapianDatabase::XapianDatabase(const QString &path, bool writeOnly)
: m_writeOnly(writeOnly)
{
QDir().mkpath(path);
m_path = path.toUtf8().constData();
m_path = path.toStdString();
if (!writeOnly) {
try {
......
......@@ -39,7 +39,7 @@ void XapianSearchStore::setDbPath(const QString &path)
m_db = nullptr;
try {
m_db = new Xapian::Database(m_dbPath.toUtf8().constData());
m_db = new Xapian::Database(m_dbPath.toStdString());
} catch (const Xapian::DatabaseOpeningError &) {
qCWarning(AKONADI_SEARCH_XAPIAN_LOG) << "Xapian Database does not exist at " << m_dbPath;
} catch (const Xapian::DatabaseCorruptError &) {
......
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