src/partDownloader.cc

changeset 850
a3d72b0e916d
parent 844
11587d419d2f
child 852
cbd89b33f70d
equal deleted inserted replaced
849:4af6f977d04b 850:a3d72b0e916d
28 #include "mainWindow.h" 28 #include "mainWindow.h"
29 #include "ldDocument.h" 29 #include "ldDocument.h"
30 #include "glRenderer.h" 30 #include "glRenderer.h"
31 #include "configDialog.h" 31 #include "configDialog.h"
32 32
33 CFGENTRY (String, downloadFilePath, ""); 33 CFGENTRY (String, DownloadFilePath, "");
34 CFGENTRY (Bool, guessDownloadPaths, true); 34 CFGENTRY (Bool, GuessDownloadPaths, true);
35 CFGENTRY (Bool, autoCloseDownloadDialog, true); 35 CFGENTRY (Bool, AutoCloseDownloadDialog, true);
36 36
37 const QString g_unofficialLibraryURL ("http://ldraw.org/library/unofficial/"); 37 const QString g_unofficialLibraryURL ("http://ldraw.org/library/unofficial/");
38 38
39 // ============================================================================= 39 // =============================================================================
40 // 40 //
57 57
58 // ============================================================================= 58 // =============================================================================
59 // 59 //
60 QString PartDownloader::getDownloadPath() 60 QString PartDownloader::getDownloadPath()
61 { 61 {
62 QString path = cfg::downloadFilePath; 62 QString path = cfg::DownloadFilePath;
63 63
64 if (DIRSLASH[0] != '/') 64 if (DIRSLASH[0] != '/')
65 path.replace (DIRSLASH, "/"); 65 path.replace (DIRSLASH, "/");
66 66
67 return path; 67 return path;
121 void PartDownloader::modifyDestination (QString& dest) const 121 void PartDownloader::modifyDestination (QString& dest) const
122 { 122 {
123 dest = dest.simplified(); 123 dest = dest.simplified();
124 124
125 // If the user doesn't want us to guess, stop right here. 125 // If the user doesn't want us to guess, stop right here.
126 if (not cfg::guessDownloadPaths) 126 if (not cfg::GuessDownloadPaths)
127 return; 127 return;
128 128
129 // Ensure .dat extension 129 // Ensure .dat extension
130 if (dest.right (4) != ".dat") 130 if (dest.right (4) != ".dat")
131 { 131 {
287 reloadAllSubfiles(); 287 reloadAllSubfiles();
288 g_win->doFullRefresh(); 288 g_win->doFullRefresh();
289 g_win->R()->resetAngles(); 289 g_win->R()->resetAngles();
290 } 290 }
291 291
292 if (cfg::autoCloseDownloadDialog and not failed) 292 if (cfg::AutoCloseDownloadDialog and not failed)
293 { 293 {
294 // Close automatically if desired. 294 // Close automatically if desired.
295 accept(); 295 accept();
296 } 296 }
297 else 297 else

mercurial