forked from quickshell/quickshell
		
	core: only call QmlScanner::scanDir() on directories
Removes a bogus warning message.
This commit is contained in:
		
							parent
							
								
									4b35d7b51b
								
							
						
					
					
						commit
						1af08c0c52
					
				
					 1 changed files with 9 additions and 3 deletions
				
			
		| 
						 | 
					@ -65,8 +65,8 @@ void QmlScanner::scanDir(const QString& path) {
 | 
				
			||||||
				         || c == '_')
 | 
									         || c == '_')
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
				} else {
 | 
									} else {
 | 
				
			||||||
					qCWarning(logQmlScanner)
 | 
										qCWarning(logQmlScanner) << "Module path contains invalid characters for a module name: "
 | 
				
			||||||
					    << "Module path contains invalid characters for a module name: " << end;
 | 
										                         << path.sliced(this->rootPath.path().length());
 | 
				
			||||||
					goto skipadd;
 | 
										goto skipadd;
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
| 
						 | 
					@ -170,13 +170,19 @@ bool QmlScanner::scanQmlFile(const QString& path) {
 | 
				
			||||||
			ipath = currentdir.filePath(import);
 | 
								ipath = currentdir.filePath(import);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		auto cpath = QFileInfo(ipath).canonicalFilePath();
 | 
							auto pathInfo = QFileInfo(ipath);
 | 
				
			||||||
 | 
							auto cpath = pathInfo.canonicalFilePath();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (cpath.isEmpty()) {
 | 
							if (cpath.isEmpty()) {
 | 
				
			||||||
			qCWarning(logQmlScanner) << "Ignoring unresolvable import" << ipath << "from" << path;
 | 
								qCWarning(logQmlScanner) << "Ignoring unresolvable import" << ipath << "from" << path;
 | 
				
			||||||
			continue;
 | 
								continue;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (!pathInfo.isDir()) {
 | 
				
			||||||
 | 
								qCDebug(logQmlScanner) << "Ignoring non-directory import" << ipath << "from" << path;
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (import.endsWith(".js")) this->scannedFiles.push_back(cpath);
 | 
							if (import.endsWith(".js")) this->scannedFiles.push_back(cpath);
 | 
				
			||||||
		else this->scanDir(cpath);
 | 
							else this->scanDir(cpath);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue