summaryrefslogtreecommitdiffstats
path: root/shared
diff options
context:
space:
mode:
Diffstat (limited to 'shared')
-rw-r--r--shared/resource_bundle_qt.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/shared/resource_bundle_qt.cpp b/shared/resource_bundle_qt.cpp
index af26a488a..044d00511 100644
--- a/shared/resource_bundle_qt.cpp
+++ b/shared/resource_bundle_qt.cpp
@@ -43,6 +43,7 @@
#include "ui/base/resource/data_pack.h"
#include <QFile>
+#include <QStringList>
namespace ui {
@@ -135,13 +136,19 @@ class UI_EXPORT DataPackQt : public DataPack {
void ResourceBundle::LoadCommonResources()
{
- QFile pak_file(":/data/resources.pak");
- if (!pak_file.open(QIODevice::ReadOnly))
- return;
+ QStringList resources;
+ resources << ":/data/resources.pak" << ":/data/devtools.pak";
+ Q_FOREACH (const QString& pak, resources) {
+ QFile pak_file(pak);
+ if (!pak_file.open(QIODevice::ReadOnly)) {
+ qWarning("Resource file %s not loaded", qPrintable(pak));
+ continue;
+ }
- scoped_ptr<DataPackQt> data_pack(new DataPackQt(SCALE_FACTOR_100P));
- if (data_pack->LoadFromByteArray(pak_file.readAll()))
- AddDataPack(data_pack.release());
+ scoped_ptr<DataPackQt> data_pack(new DataPackQt(SCALE_FACTOR_100P));
+ if (data_pack->LoadFromByteArray(pak_file.readAll()))
+ AddDataPack(data_pack.release());
+ }
}
// As GetLocaleFilePath is excluded for Mac in resource_bundle.cc,