Commit ddb662f8 authored by Simon Depiets's avatar Simon Depiets
Browse files

Harmonize file open behavior for .pot

BUG: 402890
parent 8ce6b3d8
......@@ -170,6 +170,9 @@ public:
bool canFetchMore(const QModelIndex& parent) const override;
void fetchMore(const QModelIndex& parent) override;
QUrl poToPot(const QUrl& path) const;
QUrl potToPo(const QUrl& path) const;
QThreadPool* threadPool()
{
return m_threadPool;
......@@ -216,9 +219,6 @@ private:
QModelIndex indexForPotIndex(const QModelIndex& potIndex) const;
void generatePOTMapping(QVector<int> & result, const QModelIndex& poParent, const QModelIndex& potParent) const;
QUrl poToPot(const QUrl& path) const;
QUrl potToPo(const QUrl& path) const;
void enqueueNodeForMetadataUpdate(ProjectNode* node);
void deleteSubtree(ProjectNode* node);
......
......@@ -411,7 +411,10 @@ void ProjectTab::openFile()
while (--i >= 0) {
if (Catalog::extIsSupported(files.at(i))) {
emit fileOpenRequested(files.at(i), true);
if (files.at(i).endsWith(QLatin1String(".pot")))
emit fileOpenRequested(Project::instance()->model()->potToPo(files.at(i)).toLocalFile(), true);
else
emit fileOpenRequested(files.at(i), true);
}
}
}
......
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