guck

Vim-like QtWebEngine-powered browser, written in C++
git clone git://git.deurzen.net/guck
Log | Files | Refs | LICENSE

text.cc (395B)


      1 #include "text.hh"
      2 
      3 void
      4 text_t::setText(const QString& text, bool temp)
      5 {
      6     (temp ? m_temp : m_perm) = text;
      7     if (!m_temp.isEmpty())
      8         textbase_t::setText(m_temp);
      9     else if (!m_perm.isEmpty())
     10         textbase_t::setText(m_perm);
     11     else
     12         textbase_t::setText("");
     13 }
     14 
     15 void
     16 text_t::check_reset(const QString& text)
     17 {
     18     if (!m_perm.compare(text))
     19         m_perm.clear();
     20 }