From dfc109ac65e54b3c783b6783a0371a988c8e2dd7 Mon Sep 17 00:00:00 2001 From: Robert Bieber Date: Fri, 13 Aug 2010 19:14:54 +0000 Subject: Theme Editor: Added warning messages for missing resources git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27803 a1c6a512-1295-4272-9138-f99709370657 --- utils/themeeditor/graphics/rbfont.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'utils/themeeditor/graphics/rbfont.cpp') diff --git a/utils/themeeditor/graphics/rbfont.cpp b/utils/themeeditor/graphics/rbfont.cpp index 2379149..895e327 100644 --- a/utils/themeeditor/graphics/rbfont.cpp +++ b/utils/themeeditor/graphics/rbfont.cpp @@ -39,6 +39,8 @@ RBFont::RBFont(QString file) : valid(false), imageData(0), offsetData(0), widthData(0) { + bool badFile = false; + /* Attempting to locate the correct file name */ if(!QFile::exists(file)) { @@ -52,7 +54,11 @@ RBFont::RBFont(QString file) settings.endGroup(); if(!QFile::exists(file)) + { file = ":/fonts/08-Schumacher-Clean.fnt"; + + badFile = true; + } } header.insert("filename", file); @@ -65,6 +71,9 @@ RBFont::RBFont(QString file) widthData = cache->widthData; header = cache->header; + if(!badFile) + valid = true; + return; } @@ -162,6 +171,9 @@ RBFont::RBFont(QString file) cache->header = header; RBFontCache::insert(file, cache); + if(!badFile) + valid = true; + } RBFont::~RBFont() -- cgit v1.1