示例#1
0
        public void TestSetFragment()
        {
            var baseUrl = new QUrl();

            baseUrl.Scheme = "ftp";
            baseUrl.SetAuthority("tray:[email protected]:2021");
            baseUrl.SetFragment("#question13");

            Assert.AreEqual("#question13", baseUrl.Fragment());
        }
示例#2
0
        public void TestSetFragment()
        {
            var baseUrl = new QUrl();
            baseUrl.Scheme = "ftp";
            baseUrl.SetAuthority("tray:[email protected]:2021");
            baseUrl.SetFragment("#question13");

            Assert.AreEqual("#question13", baseUrl.Fragment());
        }
示例#3
0
        void HandleLinkClicked(QUrl url)
        {
            // We don't open arbitrary links for security reasons.
            var validSchemes = new [] { "http", "https", "ftp", "xmpp" };

            if (validSchemes.Contains(url.Scheme().ToLower()))
            {
                Util.Open(url);
            }
            else if (url.Scheme().ToLower() == "xmpp")
            {
                // FIXME: Add xmpp: uri handler.
                QMessageBox.Information(this.TopLevelWidget(), "Not implenented", "xmpp: uris not yet supported.");

                // Ignore # urls.
            }
            else if (!url.HasFragment())
            {
                QMessageBox.Information(this.TopLevelWidget(), "Link Fragment", url.HasFragment() + " " + url.Fragment());
                QMessageBox.Information(this.TopLevelWidget(), "Link URL", url.ToString());
            }
        }
示例#4
0
        public void TestFragment()
        {
            var s = _qUrl.Fragment();

            Assert.IsNotNullOrEmpty(s);
        }