- fix: files in network drive is opened in readonly mode
This commit is contained in:
parent
8d4411ee55
commit
829e73895b
1
NEWS.md
1
NEWS.md
|
@ -1,6 +1,7 @@
|
||||||
Red Panda C++ Version 1.2
|
Red Panda C++ Version 1.2
|
||||||
|
|
||||||
- enhancement: Portuguese Translation ( Thanks for crcpucmg@github)
|
- enhancement: Portuguese Translation ( Thanks for crcpucmg@github)
|
||||||
|
- fix: files in network drive is opened in readonly mode
|
||||||
|
|
||||||
Red Panda C++ Version 1.1.6
|
Red Panda C++ Version 1.1.6
|
||||||
|
|
||||||
|
|
|
@ -425,14 +425,15 @@ bool isSystemHeaderFile(const QString &fileName, const QSet<QString> &includePat
|
||||||
if (includePaths.isEmpty())
|
if (includePaths.isEmpty())
|
||||||
return false;
|
return false;
|
||||||
bool isFullName = false;
|
bool isFullName = false;
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
isFullName = fileName.length()>2 && fileName[1]==':';
|
isFullName = fileName.startsWith("/") || (fileName.length()>2 && fileName[1]==':');
|
||||||
#else
|
#else
|
||||||
isFullName = fileName.startsWith("/");
|
isFullName = fileName.startsWith("/");
|
||||||
#endif
|
#endif
|
||||||
if (isFullName) {
|
if (isFullName) {
|
||||||
// If it's a full file name, check if its directory is an include path
|
|
||||||
QFileInfo info(fileName);
|
QFileInfo info(fileName);
|
||||||
|
// If it's a full file name, check if its directory is an include path
|
||||||
if (info.exists()) { // full file name
|
if (info.exists()) { // full file name
|
||||||
QDir dir = info.dir();
|
QDir dir = info.dir();
|
||||||
QString absPath = includeTrailingPathDelimiter(dir.absolutePath());
|
QString absPath = includeTrailingPathDelimiter(dir.absolutePath());
|
||||||
|
|
Loading…
Reference in New Issue