Skip to content

Commit 29dd5ae

Browse files
committed
Sky 1.6.0
1 parent d5ea110 commit 29dd5ae

File tree

5 files changed

+16
-9
lines changed

5 files changed

+16
-9
lines changed

Sky.pro

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ OTHER_FILES += 3rdparty.sh \
3737
dist/changes/1.3.0.md \
3838
dist/changes/1.4.0.md \
3939
dist/changes/1.5.0.md \
40-
dist/changes/1.5.1.md \
40+
dist/changes/1.6.0.md \

dist/changes/1.5.0.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
### Previous: [Changelog 1.4.0](1.4.0.html)
44

5-
### Next: [Changelog 1.5.1](1.5.1.html)
5+
### Next: [Changelog 1.6.0](1.6.0.html)
66

77
# [Sky kit](http://omega.gg/Sky)
88
---

dist/changes/1.5.1.md dist/changes/1.6.0.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [Changelog 1.5.1](http://omega.gg/Sky/changes/1.5.1.html)
1+
# [Changelog 1.6.0](http://omega.gg/Sky/changes/1.6.0.html)
22

33
### Previous: [Changelog 1.5.0](1.5.0.html)
44

src/SkCore/src/controllers/WControllerFile.cpp

+9-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ W_INIT_CONTROLLER(WControllerFile)
4242
//-------------------------------------------------------------------------------------------------
4343
// Static variables
4444

45-
static const int CONTROLLERFILE_TIMEOUT = 60000; // 1 minute
45+
static const int CONTROLLERFILE_TIMEOUT = 10000; // 10 seconds
4646

4747
//=================================================================================================
4848
// WControllerFileAction
@@ -950,13 +950,20 @@ WControllerFileReply * WControllerFile::startCreatePath(const QString & path)
950950
{
951951
QtLockedFile file(fileName);
952952

953-
if (WControllerFilePrivate::tryOpen(file))
953+
if (WControllerFilePrivate::tryOpen(file) == false)
954954
{
955955
qWarning("WControllerFile::writeFile: File is locked %s.", fileName.C_STR);
956956

957957
return false;
958958
}
959959

960+
if (file.open(QIODevice::WriteOnly) == false)
961+
{
962+
qWarning("WControllerFile::writeFile: Cannot open file %s.", fileName.C_STR);
963+
964+
return false;
965+
}
966+
960967
file.write(data);
961968

962969
return true;

src/SkCore/src/io/WCache.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -891,9 +891,9 @@ bool WCacheThread::writeFile(QNetworkReply * reply, WCacheJob * job)
891891

892892
if (file.open(QIODevice::WriteOnly) == false)
893893
{
894-
qWarning("WCacheThread::writeFile: Cannot write file %s.", urlCache.C_STR);
894+
qWarning("WCacheThread::writeFile: Cannot open file %s.", urlCache.C_STR);
895895

896-
QCoreApplication::postEvent(cache, new WCacheEventFailed(url, "Cannot write file"));
896+
QCoreApplication::postEvent(cache, new WCacheEventFailed(url, "Cannot open file"));
897897

898898
return false;
899899
}
@@ -949,11 +949,11 @@ void WCacheThread::writeData(const QString & url,
949949

950950
if (file.open(QIODevice::WriteOnly) == false)
951951
{
952-
qWarning("WCacheThread::writeData: Cannot write file %s.", urlCache.C_STR);
952+
qWarning("WCacheThread::writeData: Cannot open file %s.", urlCache.C_STR);
953953

954954
ids.removeOne(id);
955955

956-
QCoreApplication::postEvent(cache, new WCacheEventFailed(url, "Cannot write file"));
956+
QCoreApplication::postEvent(cache, new WCacheEventFailed(url, "Cannot open file"));
957957

958958
return;
959959
}

0 commit comments

Comments
 (0)