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 { |