src/libraries.cpp

changeset 380
16f6717a218b
parent 300
3a4b132b8353
child 381
80bea7a6e84f
--- a/src/libraries.cpp	Wed Apr 12 01:53:42 2023 +0300
+++ b/src/libraries.cpp	Wed Apr 19 22:42:43 2023 +0300
@@ -34,9 +34,9 @@
  * @param fileName File to search for
  * @return Full path to the file, or empty string if not found.
  */
-QString LibrariesModel::findFile(QString fileName) const
+QFileInfo LibrariesModel::findFile(QString fileName) const
 {
-	QString path;
+	QFileInfo result;
 	fileName.replace("\\", "/");
 	bool found = false;
 	for (const Library& library : this->libraries)
@@ -48,7 +48,7 @@
 			QFileInfo fileInfo{directory.absoluteFilePath(fileName)};
 			if (fileInfo.exists() && fileInfo.isFile())
 			{
-				path = fileInfo.absoluteFilePath();
+				result = fileInfo;
 				found = true;
 				break;
 			}
@@ -58,7 +58,7 @@
 			break;
 		}
 	}
-	return path;
+	return result;
 }
 
 /**

mercurial