Hi Ingo, Am 03.07.2014 17:43, schrieb ingo_weinhold@xxxxxx:
diff --git a/src/kits/network/libnetapi/Url.cpp b/src/kits/network/libnetapi/Url.cpp index fb1d499..783e723 100644 --- a/src/kits/network/libnetapi/Url.cpp +++ b/src/kits/network/libnetapi/Url.cpp @@ -14,6 +14,9 @@
[...]
+status_t +BUrl::OpenWithPreferredApplication(bool onProblemAskUser) const +{ + if (!IsValid()) + return B_BAD_VALUE; + + BString urlString = UrlString(); + if (urlString.Length() > B_PATH_NAME_LENGTH) { + // TODO: BAlert + // if (onProblemAskUser) + // BAlert ... Too long URL!
onProblemAskUser? That looks like it belongs in another layer.
+BString +BUrl::_UrlMimeType() const +{ + BString mime; + mime << "application/x-vnd.Be.URL." << fProtocol; + + return BString(mime); +}
This looks like you could just return "mime" instead of wrapping it in another BString.
Best regards, -Stephan