summaryrefslogtreecommitdiff
path: root/utils/themeeditor/graphics/rbfont.cpp
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-08-13 19:14:54 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-08-13 19:14:54 +0000
commitdfc109ac65e54b3c783b6783a0371a988c8e2dd7 (patch)
tree7008fb3b956d5371e3f820b2e71090585a0e12ec /utils/themeeditor/graphics/rbfont.cpp
parente60de9e5bb8059eefc0a5b6330738188850c5a4e (diff)
downloadrockbox-dfc109ac65e54b3c783b6783a0371a988c8e2dd7.tar.gz
rockbox-dfc109ac65e54b3c783b6783a0371a988c8e2dd7.zip
Theme Editor: Added warning messages for missing resources
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27803 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/graphics/rbfont.cpp')
-rw-r--r--utils/themeeditor/graphics/rbfont.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/utils/themeeditor/graphics/rbfont.cpp b/utils/themeeditor/graphics/rbfont.cpp
index 23791497fd..895e32750e 100644
--- a/utils/themeeditor/graphics/rbfont.cpp
+++ b/utils/themeeditor/graphics/rbfont.cpp
@@ -39,6 +39,8 @@ RBFont::RBFont(QString file)
39 : valid(false), imageData(0), offsetData(0), widthData(0) 39 : valid(false), imageData(0), offsetData(0), widthData(0)
40{ 40{
41 41
42 bool badFile = false;
43
42 /* Attempting to locate the correct file name */ 44 /* Attempting to locate the correct file name */
43 if(!QFile::exists(file)) 45 if(!QFile::exists(file))
44 { 46 {
@@ -52,7 +54,11 @@ RBFont::RBFont(QString file)
52 settings.endGroup(); 54 settings.endGroup();
53 55
54 if(!QFile::exists(file)) 56 if(!QFile::exists(file))
57 {
55 file = ":/fonts/08-Schumacher-Clean.fnt"; 58 file = ":/fonts/08-Schumacher-Clean.fnt";
59
60 badFile = true;
61 }
56 } 62 }
57 header.insert("filename", file); 63 header.insert("filename", file);
58 64
@@ -65,6 +71,9 @@ RBFont::RBFont(QString file)
65 widthData = cache->widthData; 71 widthData = cache->widthData;
66 header = cache->header; 72 header = cache->header;
67 73
74 if(!badFile)
75 valid = true;
76
68 return; 77 return;
69 } 78 }
70 79
@@ -162,6 +171,9 @@ RBFont::RBFont(QString file)
162 cache->header = header; 171 cache->header = header;
163 RBFontCache::insert(file, cache); 172 RBFontCache::insert(file, cache);
164 173
174 if(!badFile)
175 valid = true;
176
165} 177}
166 178
167RBFont::~RBFont() 179RBFont::~RBFont()