summaryrefslogtreecommitdiff
path: root/utils/rbutilqt/base
diff options
context:
space:
mode:
Diffstat (limited to 'utils/rbutilqt/base')
-rw-r--r--utils/rbutilqt/base/bootloaderinstallbase.cpp25
-rw-r--r--utils/rbutilqt/base/bootloaderinstallbase.h8
2 files changed, 20 insertions, 13 deletions
diff --git a/utils/rbutilqt/base/bootloaderinstallbase.cpp b/utils/rbutilqt/base/bootloaderinstallbase.cpp
index 36a15c9e1a..b49a9b933b 100644
--- a/utils/rbutilqt/base/bootloaderinstallbase.cpp
+++ b/utils/rbutilqt/base/bootloaderinstallbase.cpp
@@ -203,21 +203,28 @@ void BootloaderInstallBase::checkRemount()
203 203
204//! @brief set list of possible bootloader files and pick the existing one. 204//! @brief set list of possible bootloader files and pick the existing one.
205//! @param sl list of possible bootloader files. 205//! @param sl list of possible bootloader files.
206void BootloaderInstallBase::setBlFile(QStringList sl) 206void BootloaderInstallBase::setBlFile(const QString& mountpoint, const QStringList& sl)
207{ 207{
208 // figue which of the possible bootloader filenames is correct. 208 if(sl.size() == 0) {
209 for(int a = 0; a < sl.size(); a++) { 209 m_blfile = mountpoint;
210 if(!Utils::resolvePathCase(sl.at(a)).isEmpty()) {
211 m_blfile = sl.at(a);
212 }
213 } 210 }
214 if(m_blfile.isEmpty() && sl.size() > 0) { 211 else {
215 m_blfile = sl.at(0); 212 for(int a = 0; a < sl.size(); a++) {
213 QString filename = mountpoint + sl.at(a);
214 if(!Utils::resolvePathCase(filename).isEmpty()) {
215 m_blfile = filename;
216 break;
217 }
218 }
219 // figue which of the possible bootloader filenames is correct.
220 if(m_blfile.isEmpty() && sl.size() > 0) {
221 m_blfile = mountpoint + sl.at(0);
222 }
216 } 223 }
217} 224}
218 225
219 226
220bool BootloaderInstallBase::setOfFile(QString of, QStringList blfile) 227bool BootloaderInstallBase::setOfFile(QString& of, const QStringList& blfile)
221{ 228{
222 bool found = false; 229 bool found = false;
223 ArchiveUtil *util = nullptr; 230 ArchiveUtil *util = nullptr;
diff --git a/utils/rbutilqt/base/bootloaderinstallbase.h b/utils/rbutilqt/base/bootloaderinstallbase.h
index 567b4e9093..32ca637288 100644
--- a/utils/rbutilqt/base/bootloaderinstallbase.h
+++ b/utils/rbutilqt/base/bootloaderinstallbase.h
@@ -55,17 +55,17 @@ class BootloaderInstallBase : public QObject
55 bool backup(QString to); 55 bool backup(QString to);
56 56
57 //! set the different filenames and paths 57 //! set the different filenames and paths
58 void setBlFile(QStringList f); 58 void setBlFile(const QString& mountpoint, const QStringList& f);
59 void setBlUrl(QUrl u) 59 void setBlUrl(QUrl u)
60 { m_blurl = u; } 60 { m_blurl = u; }
61 void setLogfile(QString f) 61 void setLogfile(const QString& f)
62 { m_logfile = f; } 62 { m_logfile = f; }
63 bool setOfFile(QString of, QStringList blfile); 63 bool setOfFile(QString& of, const QStringList& blfile);
64 64
65 //! returns a port Install Hint or empty if there is none 65 //! returns a port Install Hint or empty if there is none
66 //! static and in the base class, so the installer classes dont need to 66 //! static and in the base class, so the installer classes dont need to
67 // be modified for new targets 67 // be modified for new targets
68 static QString postinstallHints(QString model); 68 static QString postinstallHints(const QString& model);
69 69
70 protected slots: 70 protected slots:
71 void downloadBlFinish(QNetworkReply::NetworkError error); 71 void downloadBlFinish(QNetworkReply::NetworkError error);