summaryrefslogtreecommitdiffstats
path: root/src/core/download_manager_delegate_qt.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-04-09 13:50:17 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-04-09 13:50:17 +0200
commitc9a64fda178c32ac924977ac93bf83d7e47767fe (patch)
treebeaf8671ccbce36b3d4018ce57fe9de29d40d87f /src/core/download_manager_delegate_qt.cpp
parent10611866af8736a397371a38d6b5486ee8d28c62 (diff)
parent44303861fd116b3a279d26300147e89a0bf8121c (diff)
Merge branch '5.12' into 5.13
Conflicts: src/3rdparty src/core/renderer/user_resource_controller.cpp src/core/web_contents_adapter.cpp src/webengine/doc/src/qtwebengine-overview.qdoc Change-Id: I46be9d33b3b65d61dfa099ee72a3509afb9bd6a4
Diffstat (limited to 'src/core/download_manager_delegate_qt.cpp')
-rw-r--r--src/core/download_manager_delegate_qt.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/download_manager_delegate_qt.cpp b/src/core/download_manager_delegate_qt.cpp
index 724b33a7a..2af958068 100644
--- a/src/core/download_manager_delegate_qt.cpp
+++ b/src/core/download_manager_delegate_qt.cpp
@@ -175,8 +175,15 @@ bool DownloadManagerDelegateQt::DetermineDownloadTarget(download::DownloadItem*
int uniquifier = base::GetUniquePathNumber(tmpFilePath, base::FilePath::StringType());
if (uniquifier > 0)
suggestedFilePath = toQt(tmpFilePath.InsertBeforeExtensionASCII(base::StringPrintf(" (%d)", uniquifier)).AsUTF8Unsafe());
- else if (uniquifier == -1)
- suggestedFilePath = toQt(tmpFilePath.InsertBeforeExtensionASCII(base::StringPrintf(" - %s", base::TimeToISO8601(item->GetStartTime()).c_str())).AsUTF8Unsafe());
+ else if (uniquifier == -1) {
+ base::Time::Exploded exploded;
+ item->GetStartTime().LocalExplode(&exploded);
+ std::string suffix = base::StringPrintf(
+ " - %04d-%02d-%02dT%02d%02d%02d.%03d", exploded.year, exploded.month,
+ exploded.day_of_month, exploded.hour, exploded.minute,
+ exploded.second, exploded.millisecond);
+ suggestedFilePath = toQt(tmpFilePath.InsertBeforeExtensionASCII(suffix).AsUTF8Unsafe());
+ }
item->AddObserver(this);
QList<ProfileAdapterClient*> clients = m_profileAdapter->clients();